From 824a116aa58f054a33bf64ae2d97f99ba8bfc803 Mon Sep 17 00:00:00 2001 From: gfichtenholt Date: Fri, 28 Jan 2022 10:03:44 -0800 Subject: [PATCH 01/11] attempt #2 --- cmd/apprepository-controller/vendor/k8s.io/code-generator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/apprepository-controller/vendor/k8s.io/code-generator b/cmd/apprepository-controller/vendor/k8s.io/code-generator index b45d7156bce..9c63990c847 160000 --- a/cmd/apprepository-controller/vendor/k8s.io/code-generator +++ b/cmd/apprepository-controller/vendor/k8s.io/code-generator @@ -1 +1 @@ -Subproject commit b45d7156bcecd2b8c31486673c27e78dd36a8cb6 +Subproject commit 9c63990c847dce9e6dca44ad39f7cc4e547bd55f From 10381c18fb7e3ae60f4fc89ffe54a6f7a803232f Mon Sep 17 00:00:00 2001 From: gfichtenholt Date: Wed, 30 Mar 2022 00:04:37 -0700 Subject: [PATCH 02/11] minor fixes --- .../vendor/k8s.io/code-generator | 2 +- .../packages/v1alpha1/cache/chart_cache.go | 19 +++++++++++-------- .../packages/v1alpha1/cache/watcher_cache.go | 18 ++++++++++++++---- .../packages/v1alpha1/test_util_test.go | 1 + 4 files changed, 27 insertions(+), 13 deletions(-) diff --git a/cmd/apprepository-controller/vendor/k8s.io/code-generator b/cmd/apprepository-controller/vendor/k8s.io/code-generator index 9c63990c847..b45d7156bce 160000 --- a/cmd/apprepository-controller/vendor/k8s.io/code-generator +++ b/cmd/apprepository-controller/vendor/k8s.io/code-generator @@ -1 +1 @@ -Subproject commit 9c63990c847dce9e6dca44ad39f7cc4e547bd55f +Subproject commit b45d7156bcecd2b8c31486673c27e78dd36a8cb6 diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache/chart_cache.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache/chart_cache.go index e87196eb70a..b56868c88d9 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache/chart_cache.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache/chart_cache.go @@ -77,7 +77,7 @@ type ChartCache struct { // note that url and delete fields are mutually exclusive, you must either: // - set url to non-empty string or // - deleted flag to true -// setting both does not make sense +// setting both for a given entry does not make sense type chartCacheStoreEntry struct { namespace string id string @@ -117,7 +117,7 @@ func NewChartCache(name string, redisCli *redis.Client, stopCh <-chan struct{}) } // this func will enqueue work items into chart work queue and return. -// the charts will be synced by a worker thread running in the background +// the charts will be synced worker threads running in the background func (c *ChartCache) SyncCharts(charts []models.Chart, clientOptions *common.ClientOptions) error { log.Infof("+SyncCharts()") totalToSync := 0 @@ -251,8 +251,8 @@ func (c *ChartCache) processNextWorkItem(workerName string) bool { } func (c *ChartCache) DeleteChartsForRepo(repo *types.NamespacedName) error { - log.Infof("+DeleteChartsFor(%s)", repo) - defer log.Infof("-DeleteChartsFor(%s)", repo) + log.Infof("+DeleteChartsForRepo(%s)", repo) + defer log.Infof("-DeleteChartsForRepo(%s)", repo) // need to get a list of all charts/versions for this repo that are either: // a. already in the cache OR @@ -370,10 +370,13 @@ func (c *ChartCache) syncHandler(workerName, key string) error { if chart.deleted { // TODO: (gfichtenholt) DEL has the capability to delete multiple keys in one - // atomic operation. It would be nice to come up with a way to utilize that here - // the problem is the queue is designed to work on one item at a time. I think to - // be able to do this, we need to add a .GetAll() method to RateLimitingInterface, - // which will be a little tricky to make sure to get the logic right t be atomic and + // atomic operation. Ref https://www.redis.io/commands/del/ + // It would be nice to come up with a way to utilize that here + // the problem is the queue is designed to work on one item at a time. In other words, + // each queue entry has to be associated with some unique key. How to do that when + // you're trying to delete 50 keys at once? One way to solve + // it *might* be to add a .GetAll() method to RateLimitingInterface, + // which will be a little tricky to make sure to get the logic right to be atomic and // also when *SOME* of the items fail and some succeed keysRemoved, _ := c.redisCli.Del(c.redisCli.Context(), key).Result() log.Infof("Redis [DEL %s]: %d", key, keysRemoved) diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache/watcher_cache.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache/watcher_cache.go index e1d2cfdd343..4206ed39e99 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache/watcher_cache.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache/watcher_cache.go @@ -203,10 +203,20 @@ func (c *NamespacedResourceWatcherCache) isGvrValid() error { if crd, err := apiExt.ApiextensionsV1().CustomResourceDefinitions().Get(ctx, name, metav1.GetOptions{}); err != nil { return err } else { - for _, condition := range crd.Status.Conditions { - if condition.Type == apiextv1.Established && - condition.Status == apiextv1.ConditionTrue { - return nil + // check version + ok := false + for _, v := range crd.Status.StoredVersions { + if v == c.config.Gvr.Version { + ok = true + break + } + } + if ok { + for _, condition := range crd.Status.Conditions { + if condition.Type == apiextv1.Established && + condition.Status == apiextv1.ConditionTrue { + return nil + } } } } diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/test_util_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/test_util_test.go index d82f3eab64d..6d3b973ab1c 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/test_util_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/test_util_test.go @@ -369,6 +369,7 @@ var ( Status: apiextv1.ConditionStatus(metav1.ConditionTrue), }, }, + StoredVersions: []string{"v1beta2"}, }, } ) From 9894dbe209dee5fd901b632297bb4399dd614f96 Mon Sep 17 00:00:00 2001 From: gfichtenholt Date: Thu, 31 Mar 2022 01:48:07 -0700 Subject: [PATCH 03/11] minor clarification --- .../fluxv2/packages/v1alpha1/cache/rate_limiting_queue.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache/rate_limiting_queue.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache/rate_limiting_queue.go index c2d32aee7b3..4caf8264834 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache/rate_limiting_queue.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/cache/rate_limiting_queue.go @@ -18,7 +18,7 @@ import ( ) // Inspired by https://github.com/kubernetes/client-go/blob/master/util/workqueue/queue.go and -// by https://github.com/kubernetes/client-go/blob/v0.22.4/util/workqueue/rate_limiting_queue.go +// by https://github.com/kubernetes/client-go/blob/master/util/workqueue/rate_limiting_queue.go // but adds a few funcs, like Name(), ExpectAdd(), WaitUntilForgotten() and Reset() // RateLimitingInterface is an interface that rate limits items being added to the queue. From ab68316dcc7d2e52ce9719617e896093ff8e0dbc Mon Sep 17 00:00:00 2001 From: gfichtenholt Date: Fri, 28 Jan 2022 10:03:44 -0800 Subject: [PATCH 04/11] attempt #2 --- cmd/apprepository-controller/vendor/k8s.io/code-generator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/apprepository-controller/vendor/k8s.io/code-generator b/cmd/apprepository-controller/vendor/k8s.io/code-generator index b45d7156bce..9c63990c847 160000 --- a/cmd/apprepository-controller/vendor/k8s.io/code-generator +++ b/cmd/apprepository-controller/vendor/k8s.io/code-generator @@ -1 +1 @@ -Subproject commit b45d7156bcecd2b8c31486673c27e78dd36a8cb6 +Subproject commit 9c63990c847dce9e6dca44ad39f7cc4e547bd55f From 3d90ecd739913b07d72b8d35c4e7aa4fe3cc6a4a Mon Sep 17 00:00:00 2001 From: gfichtenholt Date: Fri, 28 Jan 2022 10:03:44 -0800 Subject: [PATCH 05/11] attempt #2 --- cmd/apprepository-controller/vendor/k8s.io/code-generator | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/apprepository-controller/vendor/k8s.io/code-generator b/cmd/apprepository-controller/vendor/k8s.io/code-generator index b45d7156bce..9c63990c847 160000 --- a/cmd/apprepository-controller/vendor/k8s.io/code-generator +++ b/cmd/apprepository-controller/vendor/k8s.io/code-generator @@ -1 +1 @@ -Subproject commit b45d7156bcecd2b8c31486673c27e78dd36a8cb6 +Subproject commit 9c63990c847dce9e6dca44ad39f7cc4e547bd55f From f9d6f9fe7f4d2a617d1616b7bfb3483ef1360fac Mon Sep 17 00:00:00 2001 From: gfichtenholt Date: Thu, 7 Apr 2022 20:39:48 -0700 Subject: [PATCH 06/11] 2nd step --- .../vendor/k8s.io/code-generator | 2 +- .../core/packages/v1alpha1/repositories.go | 33 + .../packages/v1alpha1/repositories_test.go | 82 + .../docs/kubeapps-apis.swagger.json | 642 +-- .../packages/v1alpha1/packages_grpc.pb.go | 4 - .../core/packages/v1alpha1/repositories.pb.go | 725 +++- .../packages/v1alpha1/repositories.pb.gw.go | 195 + .../packages/v1alpha1/repositories_grpc.pb.go | 40 +- .../core/plugins/v1alpha1/plugins_grpc.pb.go | 4 - .../fluxv2/packages/v1alpha1/fluxv2.pb.go | 734 ++-- .../fluxv2/packages/v1alpha1/fluxv2.pb.gw.go | 195 + .../packages/v1alpha1/fluxv2_grpc.pb.go | 78 +- .../helm/packages/v1alpha1/helm.pb.gw.go | 38 +- .../helm/packages/v1alpha1/helm_grpc.pb.go | 4 - .../v1alpha1/kapp_controller_grpc.pb.go | 4 - .../resources/v1alpha1/resources_grpc.pb.go | 4 - cmd/kubeapps-apis/plugin_test/mock_plugin.go | 13 + .../fluxv2/packages/v1alpha1/chart_test.go | 16 +- .../fluxv2/packages/v1alpha1/common/utils.go | 111 +- .../packages/v1alpha1/global_vars_test.go | 298 ++ .../fluxv2/packages/v1alpha1/release_test.go | 84 +- .../plugins/fluxv2/packages/v1alpha1/repo.go | 359 +- .../v1alpha1/repo_integration_test.go | 74 + .../fluxv2/packages/v1alpha1/repo_test.go | 351 +- .../fluxv2/packages/v1alpha1/server.go | 18 +- .../fluxv2/packages/v1alpha1/server_test.go | 135 +- .../core/packages/v1alpha1/repositories.proto | 42 + .../fluxv2/packages/v1alpha1/fluxv2.proto | 20 + dashboard/src/gen/google/api/annotations.ts | 2 +- dashboard/src/gen/google/api/http.ts | 304 +- dashboard/src/gen/google/protobuf/any.ts | 69 +- .../src/gen/google/protobuf/descriptor.ts | 3247 ++++++++++---- dashboard/src/gen/google/protobuf/struct.ts | 370 +- .../kubeappsapis/apidocs/v1alpha1/apidocs.ts | 2 +- .../core/packages/v1alpha1/packages.ts | 3838 +++++++++++------ .../core/packages/v1alpha1/repositories.ts | 2204 +++++++--- .../core/plugins/v1alpha1/plugins.ts | 203 +- .../fluxv2/packages/v1alpha1/fluxv2.ts | 821 ++-- .../plugins/helm/packages/v1alpha1/helm.ts | 730 ++-- .../packages/v1alpha1/kapp_controller.ts | 453 +- .../plugins/resources/v1alpha1/resources.ts | 1033 +++-- .../options/annotations.ts | 2 +- .../protoc-gen-openapiv2/options/openapiv2.ts | 3021 ++++++++----- script/makefiles/deploy-dev.mk | 2 +- 44 files changed, 14005 insertions(+), 6601 deletions(-) diff --git a/cmd/apprepository-controller/vendor/k8s.io/code-generator b/cmd/apprepository-controller/vendor/k8s.io/code-generator index 9c63990c847..b45d7156bce 160000 --- a/cmd/apprepository-controller/vendor/k8s.io/code-generator +++ b/cmd/apprepository-controller/vendor/k8s.io/code-generator @@ -1 +1 @@ -Subproject commit 9c63990c847dce9e6dca44ad39f7cc4e547bd55f +Subproject commit b45d7156bcecd2b8c31486673c27e78dd36a8cb6 diff --git a/cmd/kubeapps-apis/core/packages/v1alpha1/repositories.go b/cmd/kubeapps-apis/core/packages/v1alpha1/repositories.go index 2c93ca631d2..28e1184e10c 100644 --- a/cmd/kubeapps-apis/core/packages/v1alpha1/repositories.go +++ b/cmd/kubeapps-apis/core/packages/v1alpha1/repositories.go @@ -149,6 +149,39 @@ func (s repositoriesServer) GetPackageRepositorySummaries(ctx context.Context, r }, nil } +// UpdatePackageRepository updates a package repository using configured plugins. +func (s repositoriesServer) UpdatePackageRepository(ctx context.Context, request *packages.UpdatePackageRepositoryRequest) (*packages.UpdatePackageRepositoryResponse, error) { + contextMsg := fmt.Sprintf("(cluster=%q, namespace=%q, id=%q)", + request.GetPackageRepoRef().GetContext().GetCluster(), + request.GetPackageRepoRef().GetContext().GetNamespace(), + request.GetPackageRepoRef().GetIdentifier()) + log.Infof("+core UpdatePackageRepository %s", contextMsg) + + if request.GetPackageRepoRef().GetPlugin() == nil { + return nil, status.Errorf(codes.InvalidArgument, "Unable to retrieve the plugin (missing PackageRepoRef.Plugin)") + } + + // Retrieve the plugin with server matching the requested plugin name + pluginWithServer := s.getPluginWithServer(request.PackageRepoRef.Plugin) + if pluginWithServer == nil { + return nil, status.Errorf(codes.Internal, "Unable to get the plugin %v", request.PackageRepoRef.Plugin) + } + + // Get the response from the requested plugin + response, err := pluginWithServer.server.UpdatePackageRepository(ctx, request) + if err != nil { + return nil, status.Errorf(status.Convert(err).Code(), "Unable to update the package repository %q using the plugin %q: %v", + request.PackageRepoRef.Identifier, request.PackageRepoRef.Plugin.Name, err) + } + + // Validate the plugin response + if response.PackageRepoRef == nil { + return nil, status.Errorf(codes.Internal, "Invalid UpdatePackageRepository response from the plugin %v: %v", pluginWithServer.plugin.Name, err) + } + + return response, nil +} + // getPluginWithServer returns the *pkgPluginsWithServer from a given packagesServer // matching the plugin name func (s repositoriesServer) getPluginWithServer(plugin *v1alpha1.Plugin) *repoPluginsWithServer { diff --git a/cmd/kubeapps-apis/core/packages/v1alpha1/repositories_test.go b/cmd/kubeapps-apis/core/packages/v1alpha1/repositories_test.go index 75817192adc..274345c5caa 100644 --- a/cmd/kubeapps-apis/core/packages/v1alpha1/repositories_test.go +++ b/cmd/kubeapps-apis/core/packages/v1alpha1/repositories_test.go @@ -31,6 +31,7 @@ var ignoreUnexportedRepoOpts = cmpopts.IgnoreUnexported( corev1.PackageRepositoryStatus{}, corev1.GetPackageRepositorySummariesResponse{}, corev1.PackageRepositorySummary{}, + corev1.UpdatePackageRepositoryResponse{}, ) func makeDefaultTestRepositoriesPlugin(pluginName string) repoPluginsWithServer { @@ -286,3 +287,84 @@ func TestGetPackageRepositorySummaries(t *testing.T) { }) } } + +func TestUpdatePackageRepository(t *testing.T) { + + testCases := []struct { + name string + configuredPlugins []*plugins.Plugin + statusCode codes.Code + request *corev1.UpdatePackageRepositoryRequest + expectedResponse *corev1.UpdatePackageRepositoryResponse + }{ + { + name: "updates the package repository using the correct plugin", + configuredPlugins: []*plugins.Plugin{ + {Name: "plugin-1", Version: "v1alpha1"}, + {Name: "plugin-1", Version: "v1alpha2"}, + }, + statusCode: codes.OK, + request: &corev1.UpdatePackageRepositoryRequest{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Context: &corev1.Context{Cluster: "default", Namespace: "my-ns"}, + Identifier: "repo-1", + Plugin: &plugins.Plugin{Name: "plugin-1", Version: "v1alpha1"}, + }, + }, + expectedResponse: &corev1.UpdatePackageRepositoryResponse{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Context: &corev1.Context{Cluster: "default", Namespace: "my-ns"}, + Identifier: "repo-1", + Plugin: &plugins.Plugin{Name: "plugin-1", Version: "v1alpha1"}, + }, + }, + }, + { + name: "returns invalid argument if plugin not specified in request", + statusCode: codes.InvalidArgument, + request: &corev1.UpdatePackageRepositoryRequest{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Identifier: "repo-1", + }, + }, + }, + { + name: "returns internal error if unable to find the plugin", + statusCode: codes.Internal, + request: &corev1.UpdatePackageRepositoryRequest{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Identifier: "repo-1", + Plugin: &plugins.Plugin{Name: "plugin-1", Version: "v1alpha1"}, + }, + }, + }, + } + + for _, tc := range testCases { + t.Run(tc.name, func(t *testing.T) { + configuredPluginServers := []repoPluginsWithServer{} + for _, p := range tc.configuredPlugins { + configuredPluginServers = append(configuredPluginServers, repoPluginsWithServer{ + plugin: p, + server: plugin_test.TestRepositoriesPluginServer{Plugin: p}, + }) + } + + server := &repositoriesServer{ + pluginsWithServers: configuredPluginServers, + } + + updatedRepoResponse, err := server.UpdatePackageRepository(context.Background(), tc.request) + + if got, want := status.Code(err), tc.statusCode; got != want { + t.Fatalf("got: %+v, want: %+v, err: %+v", got, want, err) + } + + if tc.statusCode == codes.OK { + if got, want := updatedRepoResponse, tc.expectedResponse; !cmp.Equal(got, want, ignoreUnexportedRepoOpts) { + t.Errorf("mismatch (-want +got):\n%s", cmp.Diff(want, got, ignoreUnexportedRepoOpts)) + } + } + }) + } +} diff --git a/cmd/kubeapps-apis/docs/kubeapps-apis.swagger.json b/cmd/kubeapps-apis/docs/kubeapps-apis.swagger.json index 4ad0dc0b218..624bf5d73ab 100644 --- a/cmd/kubeapps-apis/docs/kubeapps-apis.swagger.json +++ b/cmd/kubeapps-apis/docs/kubeapps-apis.swagger.json @@ -73,28 +73,28 @@ "parameters": [ { "name": "context.cluster", - "description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", + "description": "Cluster. A cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", "in": "query", "required": false, "type": "string" }, { "name": "context.namespace", - "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", + "description": "Namespace. A namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", "in": "query", "required": false, "type": "string" }, { "name": "filterOptions.query", - "description": "Text query\n\nText query for the request", + "description": "Text query. Text query for the request", "in": "query", "required": false, "type": "string" }, { "name": "filterOptions.categories", - "description": "Categories\n\nCollection of categories for the request", + "description": "Categories. Collection of categories for the request", "in": "query", "required": false, "type": "array", @@ -105,7 +105,7 @@ }, { "name": "filterOptions.repositories", - "description": "Repositories\n\nCollection of repositories where the packages belong to", + "description": "Repositories. Collection of repositories where the packages belong to", "in": "query", "required": false, "type": "array", @@ -116,28 +116,28 @@ }, { "name": "filterOptions.pkgVersion", - "description": "Package version\n\nPackage version for the request", + "description": "Package version. Package version for the request", "in": "query", "required": false, "type": "string" }, { "name": "filterOptions.appVersion", - "description": "App version\n\nPackaged app version for the request", + "description": "App version. Packaged app version for the request", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageToken", - "description": "Page token\n\nThe client uses this field to request a specific page of the list results.", + "description": "Page token. The client uses this field to request a specific page of the list results.", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageSize", - "description": "Page size\n\nClients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", + "description": "Page size. Clients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", "in": "query", "required": false, "type": "integer", @@ -204,8 +204,7 @@ "description": "Available package identifier\n\nThe fully qualified identifier for the available package\n(ie. a unique name for the context). For some packaging systems\n(particularly those where an available package is backed by a CR) this\nwill just be the name, but for others such as those where an available\npackage is not backed by a CR (eg. standard helm) it may be necessary\nto include the repository in the name or even the repo namespace\nto ensure this is unique.\nFor example two helm repositories can define\nan \"apache\" chart that is available globally, the names would need to\nencode that to be unique (ie. \"repoA:apache\" and \"repoB:apache\").", "in": "path", "required": true, - "type": "string", - "pattern": ".+" + "type": "string" }, { "name": "pkgVersion", @@ -275,8 +274,7 @@ "description": "Available package identifier\n\nThe fully qualified identifier for the available package\n(ie. a unique name for the context). For some packaging systems\n(particularly those where an available package is backed by a CR) this\nwill just be the name, but for others such as those where an available\npackage is not backed by a CR (eg. standard helm) it may be necessary\nto include the repository in the name or even the repo namespace\nto ensure this is unique.\nFor example two helm repositories can define\nan \"apache\" chart that is available globally, the names would need to\nencode that to be unique (ie. \"repoA:apache\" and \"repoB:apache\").", "in": "path", "required": true, - "type": "string", - "pattern": ".+" + "type": "string" }, { "name": "pkgVersion", @@ -315,28 +313,28 @@ "parameters": [ { "name": "context.cluster", - "description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", + "description": "Cluster. A cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", "in": "query", "required": false, "type": "string" }, { "name": "context.namespace", - "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", + "description": "Namespace. A namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageToken", - "description": "Page token\n\nThe client uses this field to request a specific page of the list results.", + "description": "Page token. The client uses this field to request a specific page of the list results.", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageSize", - "description": "Page size\n\nClients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", + "description": "Page size. Clients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", "in": "query", "required": false, "type": "integer", @@ -566,43 +564,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "installedPackageRef": { - "type": "object", - "properties": { - "context": { - "type": "object", - "description": "The context (cluster/namespace) for the package.", - "title": "Installed package context" - }, - "plugin": { - "type": "object", - "example": { - "name": "kapp_controller.packages", - "version": "v1alpha1" - }, - "description": "The plugin used to identify and interact with the installed package.\nThis field can be omitted when the request is in the context of a specific plugin.", - "title": "The plugin used to identify and interact with the installed package.\nThis field can be omitted when the request is in the context of a specific plugin." - } - }, - "title": "A reference uniquely identifying the installed package being updated.\nRequired" - }, - "pkgVersionReference": { - "$ref": "#/definitions/v1alpha1VersionReference", - "title": "For helm this will be the exact version in VersionReference.version\nFor fluxv2 this could be any semver constraint expression\nFor other plugins we can extend the VersionReference as needed. Optional" - }, - "values": { - "type": "string", - "description": "An optional serialized values string to be included when templating a\npackage in the format expected by the plugin. Included when the backend\nformat doesn't use secrets or configmaps for values or supports both.\nThese values are layered on top of any values refs above, when\nrelevant." - }, - "reconciliationOptions": { - "$ref": "#/definitions/v1alpha1ReconciliationOptions", - "description": "An optional field for specifying data common to systems that reconcile\nthe package on the cluster." - } - }, - "description": "Request for UpdateInstalledPackage. The intent is to reach the desired state specified\nby the fields in the request, while leaving other fields intact. This is a whole\nobject \"Update\" semantics rather than \"Patch\" semantics. The caller will provide the\nvalues for the fields below, which will replace, or be overlayed onto, the\ncorresponding fields in the existing resource. For example, with the\nUpdateInstalledPackageRequest, it is not possible to change just the 'package version\nreference' without also specifying 'values' field. As a side effect, not specifying the\n'values' field in the request means there are no values specified in the desired state.\nSo the meaning of each field value is describing the desired state of the corresponding\nfield in the resource after the update operation has completed the renconciliation.", - "title": "UpdateInstalledPackageRequest" + "$ref": "#/definitions/v1alpha1UpdateInstalledPackageRequest" } } ], @@ -698,14 +660,14 @@ "parameters": [ { "name": "context.cluster", - "description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", + "description": "Cluster. A cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", "in": "query", "required": false, "type": "string" }, { "name": "context.namespace", - "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", + "description": "Namespace. A namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", "in": "query", "required": false, "type": "string" @@ -805,8 +767,76 @@ "description": "The fully qualified identifier for the repository\n(i.e. a unique name for the context).", "in": "path", "required": true, - "type": "string", - "pattern": ".+" + "type": "string" + } + ], + "tags": [ + "RepositoriesService" + ] + }, + "put": { + "operationId": "RepositoriesService_UpdatePackageRepository", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1UpdatePackageRepositoryResponse" + } + }, + "401": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "packageRepoRef.plugin.name", + "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "packageRepoRef.plugin.version", + "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "packageRepoRef.context.cluster", + "description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "packageRepoRef.context.namespace", + "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "packageRepoRef.identifier", + "description": "The fully qualified identifier for the repository\n(i.e. a unique name for the context).", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1UpdatePackageRepositoryRequest" + } } ], "tags": [ @@ -866,28 +896,28 @@ "parameters": [ { "name": "context.cluster", - "description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", + "description": "Cluster. A cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", "in": "query", "required": false, "type": "string" }, { "name": "context.namespace", - "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", + "description": "Namespace. A namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", "in": "query", "required": false, "type": "string" }, { "name": "filterOptions.query", - "description": "Text query\n\nText query for the request", + "description": "Text query. Text query for the request", "in": "query", "required": false, "type": "string" }, { "name": "filterOptions.categories", - "description": "Categories\n\nCollection of categories for the request", + "description": "Categories. Collection of categories for the request", "in": "query", "required": false, "type": "array", @@ -898,7 +928,7 @@ }, { "name": "filterOptions.repositories", - "description": "Repositories\n\nCollection of repositories where the packages belong to", + "description": "Repositories. Collection of repositories where the packages belong to", "in": "query", "required": false, "type": "array", @@ -909,28 +939,28 @@ }, { "name": "filterOptions.pkgVersion", - "description": "Package version\n\nPackage version for the request", + "description": "Package version. Package version for the request", "in": "query", "required": false, "type": "string" }, { "name": "filterOptions.appVersion", - "description": "App version\n\nPackaged app version for the request", + "description": "App version. Packaged app version for the request", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageToken", - "description": "Page token\n\nThe client uses this field to request a specific page of the list results.", + "description": "Page token. The client uses this field to request a specific page of the list results.", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageSize", - "description": "Page size\n\nClients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", + "description": "Page size. Clients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", "in": "query", "required": false, "type": "integer", @@ -984,19 +1014,18 @@ "description": "Available package identifier\n\nThe fully qualified identifier for the available package\n(ie. a unique name for the context). For some packaging systems\n(particularly those where an available package is backed by a CR) this\nwill just be the name, but for others such as those where an available\npackage is not backed by a CR (eg. standard helm) it may be necessary\nto include the repository in the name or even the repo namespace\nto ensure this is unique.\nFor example two helm repositories can define\nan \"apache\" chart that is available globally, the names would need to\nencode that to be unique (ie. \"repoA:apache\" and \"repoB:apache\").", "in": "path", "required": true, - "type": "string", - "pattern": ".+" + "type": "string" }, { "name": "availablePackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "availablePackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -1056,19 +1085,18 @@ "description": "Available package identifier\n\nThe fully qualified identifier for the available package\n(ie. a unique name for the context). For some packaging systems\n(particularly those where an available package is backed by a CR) this\nwill just be the name, but for others such as those where an available\npackage is not backed by a CR (eg. standard helm) it may be necessary\nto include the repository in the name or even the repo namespace\nto ensure this is unique.\nFor example two helm repositories can define\nan \"apache\" chart that is available globally, the names would need to\nencode that to be unique (ie. \"repoA:apache\" and \"repoB:apache\").", "in": "path", "required": true, - "type": "string", - "pattern": ".+" + "type": "string" }, { "name": "availablePackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "availablePackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -1111,28 +1139,28 @@ "parameters": [ { "name": "context.cluster", - "description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", + "description": "Cluster. A cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", "in": "query", "required": false, "type": "string" }, { "name": "context.namespace", - "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", + "description": "Namespace. A namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageToken", - "description": "Page token\n\nThe client uses this field to request a specific page of the list results.", + "description": "Page token. The client uses this field to request a specific page of the list results.", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageSize", - "description": "Page size\n\nClients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", + "description": "Page size. Clients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", "in": "query", "required": false, "type": "integer", @@ -1225,14 +1253,14 @@ }, { "name": "installedPackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "installedPackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -1287,14 +1315,14 @@ }, { "name": "installedPackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "installedPackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -1352,38 +1380,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "installedPackageRef": { - "type": "object", - "properties": { - "context": { - "type": "object", - "description": "The context (cluster/namespace) for the package.", - "title": "Installed package context" - }, - "plugin": { - "$ref": "#/definitions/v1alpha1Plugin", - "description": "The plugin used to identify and interact with the installed package.\nThis field can be omitted when the request is in the context of a specific plugin." - } - }, - "title": "A reference uniquely identifying the installed package being updated.\nRequired" - }, - "pkgVersionReference": { - "$ref": "#/definitions/v1alpha1VersionReference", - "title": "For helm this will be the exact version in VersionReference.version\nFor fluxv2 this could be any semver constraint expression\nFor other plugins we can extend the VersionReference as needed. Optional" - }, - "values": { - "type": "string", - "description": "An optional serialized values string to be included when templating a\npackage in the format expected by the plugin. Included when the backend\nformat doesn't use secrets or configmaps for values or supports both.\nThese values are layered on top of any values refs above, when\nrelevant." - }, - "reconciliationOptions": { - "$ref": "#/definitions/v1alpha1ReconciliationOptions", - "description": "An optional field for specifying data common to systems that reconcile\nthe package on the cluster." - } - }, - "description": "Request for UpdateInstalledPackage. The intent is to reach the desired state specified\nby the fields in the request, while leaving other fields intact. This is a whole\nobject \"Update\" semantics rather than \"Patch\" semantics. The caller will provide the\nvalues for the fields below, which will replace, or be overlayed onto, the\ncorresponding fields in the existing resource. For example, with the\nUpdateInstalledPackageRequest, it is not possible to change just the 'package version\nreference' without also specifying 'values' field. As a side effect, not specifying the\n'values' field in the request means there are no values specified in the desired state.\nSo the meaning of each field value is describing the desired state of the corresponding\nfield in the resource after the update operation has completed the renconciliation.", - "title": "UpdateInstalledPackageRequest" + "$ref": "#/definitions/v1alpha1UpdateInstalledPackageRequest" } } ], @@ -1438,14 +1435,14 @@ }, { "name": "installedPackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "installedPackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -1480,14 +1477,14 @@ "parameters": [ { "name": "context.cluster", - "description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", + "description": "Cluster. A cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", "in": "query", "required": false, "type": "string" }, { "name": "context.namespace", - "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", + "description": "Namespace. A namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", "in": "query", "required": false, "type": "string" @@ -1588,8 +1585,76 @@ "description": "The fully qualified identifier for the repository\n(i.e. a unique name for the context).", "in": "path", "required": true, - "type": "string", - "pattern": ".+" + "type": "string" + } + ], + "tags": [ + "FluxV2RepositoriesService" + ] + }, + "put": { + "operationId": "FluxV2RepositoriesService_UpdatePackageRepository", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/v1alpha1UpdatePackageRepositoryResponse" + } + }, + "401": { + "description": "Returned when the user does not have permission to access the resource.", + "schema": {} + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/rpcStatus" + } + } + }, + "parameters": [ + { + "name": "packageRepoRef.plugin.name", + "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "packageRepoRef.plugin.version", + "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "packageRepoRef.context.cluster", + "description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "packageRepoRef.context.namespace", + "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "packageRepoRef.identifier", + "description": "The fully qualified identifier for the repository\n(i.e. a unique name for the context).", + "in": "path", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/v1alpha1UpdatePackageRepositoryRequest" + } } ], "tags": [ @@ -1622,28 +1687,28 @@ "parameters": [ { "name": "context.cluster", - "description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", + "description": "Cluster. A cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", "in": "query", "required": false, "type": "string" }, { "name": "context.namespace", - "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", + "description": "Namespace. A namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", "in": "query", "required": false, "type": "string" }, { "name": "filterOptions.query", - "description": "Text query\n\nText query for the request", + "description": "Text query. Text query for the request", "in": "query", "required": false, "type": "string" }, { "name": "filterOptions.categories", - "description": "Categories\n\nCollection of categories for the request", + "description": "Categories. Collection of categories for the request", "in": "query", "required": false, "type": "array", @@ -1654,7 +1719,7 @@ }, { "name": "filterOptions.repositories", - "description": "Repositories\n\nCollection of repositories where the packages belong to", + "description": "Repositories. Collection of repositories where the packages belong to", "in": "query", "required": false, "type": "array", @@ -1665,28 +1730,28 @@ }, { "name": "filterOptions.pkgVersion", - "description": "Package version\n\nPackage version for the request", + "description": "Package version. Package version for the request", "in": "query", "required": false, "type": "string" }, { "name": "filterOptions.appVersion", - "description": "App version\n\nPackaged app version for the request", + "description": "App version. Packaged app version for the request", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageToken", - "description": "Page token\n\nThe client uses this field to request a specific page of the list results.", + "description": "Page token. The client uses this field to request a specific page of the list results.", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageSize", - "description": "Page size\n\nClients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", + "description": "Page size. Clients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", "in": "query", "required": false, "type": "integer", @@ -1740,19 +1805,18 @@ "description": "Available package identifier\n\nThe fully qualified identifier for the available package\n(ie. a unique name for the context). For some packaging systems\n(particularly those where an available package is backed by a CR) this\nwill just be the name, but for others such as those where an available\npackage is not backed by a CR (eg. standard helm) it may be necessary\nto include the repository in the name or even the repo namespace\nto ensure this is unique.\nFor example two helm repositories can define\nan \"apache\" chart that is available globally, the names would need to\nencode that to be unique (ie. \"repoA:apache\" and \"repoB:apache\").", "in": "path", "required": true, - "type": "string", - "pattern": ".+" + "type": "string" }, { "name": "availablePackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "availablePackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -1812,19 +1876,18 @@ "description": "Available package identifier\n\nThe fully qualified identifier for the available package\n(ie. a unique name for the context). For some packaging systems\n(particularly those where an available package is backed by a CR) this\nwill just be the name, but for others such as those where an available\npackage is not backed by a CR (eg. standard helm) it may be necessary\nto include the repository in the name or even the repo namespace\nto ensure this is unique.\nFor example two helm repositories can define\nan \"apache\" chart that is available globally, the names would need to\nencode that to be unique (ie. \"repoA:apache\" and \"repoB:apache\").", "in": "path", "required": true, - "type": "string", - "pattern": ".+" + "type": "string" }, { "name": "availablePackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "availablePackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -1867,28 +1930,28 @@ "parameters": [ { "name": "context.cluster", - "description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", + "description": "Cluster. A cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", "in": "query", "required": false, "type": "string" }, { "name": "context.namespace", - "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", + "description": "Namespace. A namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageToken", - "description": "Page token\n\nThe client uses this field to request a specific page of the list results.", + "description": "Page token. The client uses this field to request a specific page of the list results.", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageSize", - "description": "Page size\n\nClients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", + "description": "Page size. Clients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", "in": "query", "required": false, "type": "integer", @@ -1981,14 +2044,14 @@ }, { "name": "installedPackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "installedPackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -2043,14 +2106,14 @@ }, { "name": "installedPackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "installedPackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -2108,38 +2171,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "installedPackageRef": { - "type": "object", - "properties": { - "context": { - "type": "object", - "description": "The context (cluster/namespace) for the package.", - "title": "Installed package context" - }, - "plugin": { - "$ref": "#/definitions/v1alpha1Plugin", - "description": "The plugin used to identify and interact with the installed package.\nThis field can be omitted when the request is in the context of a specific plugin." - } - }, - "title": "A reference uniquely identifying the installed package being updated.\nRequired" - }, - "pkgVersionReference": { - "$ref": "#/definitions/v1alpha1VersionReference", - "title": "For helm this will be the exact version in VersionReference.version\nFor fluxv2 this could be any semver constraint expression\nFor other plugins we can extend the VersionReference as needed. Optional" - }, - "values": { - "type": "string", - "description": "An optional serialized values string to be included when templating a\npackage in the format expected by the plugin. Included when the backend\nformat doesn't use secrets or configmaps for values or supports both.\nThese values are layered on top of any values refs above, when\nrelevant." - }, - "reconciliationOptions": { - "$ref": "#/definitions/v1alpha1ReconciliationOptions", - "description": "An optional field for specifying data common to systems that reconcile\nthe package on the cluster." - } - }, - "description": "Request for UpdateInstalledPackage. The intent is to reach the desired state specified\nby the fields in the request, while leaving other fields intact. This is a whole\nobject \"Update\" semantics rather than \"Patch\" semantics. The caller will provide the\nvalues for the fields below, which will replace, or be overlayed onto, the\ncorresponding fields in the existing resource. For example, with the\nUpdateInstalledPackageRequest, it is not possible to change just the 'package version\nreference' without also specifying 'values' field. As a side effect, not specifying the\n'values' field in the request means there are no values specified in the desired state.\nSo the meaning of each field value is describing the desired state of the corresponding\nfield in the resource after the update operation has completed the renconciliation.", - "title": "UpdateInstalledPackageRequest" + "$ref": "#/definitions/v1alpha1UpdateInstalledPackageRequest" } } ], @@ -2194,14 +2226,14 @@ }, { "name": "installedPackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "installedPackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -2261,31 +2293,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "installedPackageRef": { - "type": "object", - "properties": { - "context": { - "type": "object", - "description": "The context (cluster/namespace) for the package.", - "title": "Installed package context" - }, - "plugin": { - "$ref": "#/definitions/v1alpha1Plugin", - "description": "The plugin used to identify and interact with the installed package.\nThis field can be omitted when the request is in the context of a specific plugin." - } - }, - "description": "A reference uniquely identifying the installed package.", - "title": "Installed package reference" - }, - "releaseRevision": { - "type": "integer", - "format": "int32", - "description": "A number identifying the Helm revision to which to rollback.", - "title": "ReleaseRevision" - } - } + "$ref": "#/definitions/v1alpha1RollbackInstalledPackageRequest" } } ], @@ -2319,28 +2327,28 @@ "parameters": [ { "name": "context.cluster", - "description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", + "description": "Cluster. A cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", "in": "query", "required": false, "type": "string" }, { "name": "context.namespace", - "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", + "description": "Namespace. A namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", "in": "query", "required": false, "type": "string" }, { "name": "filterOptions.query", - "description": "Text query\n\nText query for the request", + "description": "Text query. Text query for the request", "in": "query", "required": false, "type": "string" }, { "name": "filterOptions.categories", - "description": "Categories\n\nCollection of categories for the request", + "description": "Categories. Collection of categories for the request", "in": "query", "required": false, "type": "array", @@ -2351,7 +2359,7 @@ }, { "name": "filterOptions.repositories", - "description": "Repositories\n\nCollection of repositories where the packages belong to", + "description": "Repositories. Collection of repositories where the packages belong to", "in": "query", "required": false, "type": "array", @@ -2362,28 +2370,28 @@ }, { "name": "filterOptions.pkgVersion", - "description": "Package version\n\nPackage version for the request", + "description": "Package version. Package version for the request", "in": "query", "required": false, "type": "string" }, { "name": "filterOptions.appVersion", - "description": "App version\n\nPackaged app version for the request", + "description": "App version. Packaged app version for the request", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageToken", - "description": "Page token\n\nThe client uses this field to request a specific page of the list results.", + "description": "Page token. The client uses this field to request a specific page of the list results.", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageSize", - "description": "Page size\n\nClients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", + "description": "Page size. Clients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", "in": "query", "required": false, "type": "integer", @@ -2437,19 +2445,18 @@ "description": "Available package identifier\n\nThe fully qualified identifier for the available package\n(ie. a unique name for the context). For some packaging systems\n(particularly those where an available package is backed by a CR) this\nwill just be the name, but for others such as those where an available\npackage is not backed by a CR (eg. standard helm) it may be necessary\nto include the repository in the name or even the repo namespace\nto ensure this is unique.\nFor example two helm repositories can define\nan \"apache\" chart that is available globally, the names would need to\nencode that to be unique (ie. \"repoA:apache\" and \"repoB:apache\").", "in": "path", "required": true, - "type": "string", - "pattern": ".+" + "type": "string" }, { "name": "availablePackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "availablePackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -2509,19 +2516,18 @@ "description": "Available package identifier\n\nThe fully qualified identifier for the available package\n(ie. a unique name for the context). For some packaging systems\n(particularly those where an available package is backed by a CR) this\nwill just be the name, but for others such as those where an available\npackage is not backed by a CR (eg. standard helm) it may be necessary\nto include the repository in the name or even the repo namespace\nto ensure this is unique.\nFor example two helm repositories can define\nan \"apache\" chart that is available globally, the names would need to\nencode that to be unique (ie. \"repoA:apache\" and \"repoB:apache\").", "in": "path", "required": true, - "type": "string", - "pattern": ".+" + "type": "string" }, { "name": "availablePackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "availablePackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -2564,28 +2570,28 @@ "parameters": [ { "name": "context.cluster", - "description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", + "description": "Cluster. A cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", "in": "query", "required": false, "type": "string" }, { "name": "context.namespace", - "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", + "description": "Namespace. A namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageToken", - "description": "Page token\n\nThe client uses this field to request a specific page of the list results.", + "description": "Page token. The client uses this field to request a specific page of the list results.", "in": "query", "required": false, "type": "string" }, { "name": "paginationOptions.pageSize", - "description": "Page size\n\nClients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", + "description": "Page size. Clients use this field to specify the maximum number of results to be\nreturned by the server. The server may further constrain the maximum number\nof results returned in a single page. If the page_size is 0, the server\nwill decide the number of results to be returned.", "in": "query", "required": false, "type": "integer", @@ -2678,14 +2684,14 @@ }, { "name": "installedPackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "installedPackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -2740,14 +2746,14 @@ }, { "name": "installedPackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "installedPackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -2805,38 +2811,7 @@ "in": "body", "required": true, "schema": { - "type": "object", - "properties": { - "installedPackageRef": { - "type": "object", - "properties": { - "context": { - "type": "object", - "description": "The context (cluster/namespace) for the package.", - "title": "Installed package context" - }, - "plugin": { - "$ref": "#/definitions/v1alpha1Plugin", - "description": "The plugin used to identify and interact with the installed package.\nThis field can be omitted when the request is in the context of a specific plugin." - } - }, - "title": "A reference uniquely identifying the installed package being updated.\nRequired" - }, - "pkgVersionReference": { - "$ref": "#/definitions/v1alpha1VersionReference", - "title": "For helm this will be the exact version in VersionReference.version\nFor fluxv2 this could be any semver constraint expression\nFor other plugins we can extend the VersionReference as needed. Optional" - }, - "values": { - "type": "string", - "description": "An optional serialized values string to be included when templating a\npackage in the format expected by the plugin. Included when the backend\nformat doesn't use secrets or configmaps for values or supports both.\nThese values are layered on top of any values refs above, when\nrelevant." - }, - "reconciliationOptions": { - "$ref": "#/definitions/v1alpha1ReconciliationOptions", - "description": "An optional field for specifying data common to systems that reconcile\nthe package on the cluster." - } - }, - "description": "Request for UpdateInstalledPackage. The intent is to reach the desired state specified\nby the fields in the request, while leaving other fields intact. This is a whole\nobject \"Update\" semantics rather than \"Patch\" semantics. The caller will provide the\nvalues for the fields below, which will replace, or be overlayed onto, the\ncorresponding fields in the existing resource. For example, with the\nUpdateInstalledPackageRequest, it is not possible to change just the 'package version\nreference' without also specifying 'values' field. As a side effect, not specifying the\n'values' field in the request means there are no values specified in the desired state.\nSo the meaning of each field value is describing the desired state of the corresponding\nfield in the resource after the update operation has completed the renconciliation.", - "title": "UpdateInstalledPackageRequest" + "$ref": "#/definitions/v1alpha1UpdateInstalledPackageRequest" } } ], @@ -2891,14 +2866,14 @@ }, { "name": "installedPackageRef.plugin.name", - "description": "Plugin name\n\nThe name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", + "description": "Plugin name. The name of the plugin, such as `fluxv2.packages` or `kapp_controller.packages`.", "in": "query", "required": false, "type": "string" }, { "name": "installedPackageRef.plugin.version", - "description": "Plugin version\n\nThe version of the plugin, such as v1alpha1", + "description": "Plugin version. The version of the plugin, such as v1alpha1", "in": "query", "required": false, "type": "string" @@ -2934,14 +2909,14 @@ "parameters": [ { "name": "context.cluster", - "description": "Cluster\n\nA cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", + "description": "Cluster. A cluster name can be provided to target a specific cluster if multiple\nclusters are configured, otherwise all clusters will be assumed.", "in": "query", "required": false, "type": "string" }, { "name": "context.namespace", - "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", + "description": "Namespace. A namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", "in": "query", "required": false, "type": "string" @@ -3015,13 +2990,6 @@ "in": "path", "required": true, "type": "string" - }, - { - "name": "context.namespace", - "description": "Namespace\n\nA namespace must be provided if the context of the operation is for a resource\nor resources in a particular namespace.\nFor requests to list items, not including a namespace here implies that the context\nfor the request is everything the requesting user can read, though the result can\nbe filtered by any filtering options of the request. Plugins may choose to return\nUnimplemented for some queries for which we do not yet have a need.", - "in": "query", - "required": false, - "type": "string" } ], "tags": [ @@ -3148,31 +3116,6 @@ "in": "path", "required": true, "type": "string" - }, - { - "name": "type", - "description": "Type\n\nThe type of the secret. Valid values are defined by the Type enumeration.", - "in": "query", - "required": false, - "type": "string", - "enum": [ - "SECRET_TYPE_OPAQUE_UNSPECIFIED", - "SECRET_TYPE_SERVICE_ACCOUNT_TOKEN", - "SECRET_TYPE_DOCKER_CONFIG", - "SECRET_TYPE_DOCKER_CONFIG_JSON", - "SECRET_TYPE_BASIC_AUTH", - "SECRET_TYPE_SSH_AUTH", - "SECRET_TYPE_TLS", - "SECRET_TYPE_BOOTSTRAP_TOKEN" - ], - "default": "SECRET_TYPE_OPAQUE_UNSPECIFIED" - }, - { - "name": "name", - "description": "Name\n\nThe name of the secret.", - "in": "query", - "required": false, - "type": "string" } ], "tags": [ @@ -3290,7 +3233,7 @@ }, { "name": "watch", - "description": "Watch\n\nWhen true, this will cause the stream to remain open with updated\nresources being sent as events are received from the Kubernetes API\nserver.", + "description": "Watch. When true, this will cause the stream to remain open with updated\nresources being sent as events are received from the Kubernetes API\nserver.", "in": "query", "required": false, "type": "boolean" @@ -3318,12 +3261,16 @@ "protobufAny": { "type": "object", "properties": { - "@type": { + "typeUrl": { "type": "string", "description": "A URL/resource name that uniquely identifies the type of the serialized\nprotocol buffer message. This string must contain at least\none \"/\" character. The last segment of the URL's path must represent\nthe fully qualified name of the type (as in\n`path/google.protobuf.Duration`). The name should be in a canonical form\n(e.g., leading \".\" is not accepted).\n\nIn practice, teams usually precompile into the binary all types that they\nexpect it to use in the context of Any. However, for URLs which use the\nscheme `http`, `https`, or no scheme, one can optionally set up a type\nserver that maps type URLs to message definitions as follows:\n\n* If no scheme is provided, `https` is assumed.\n* An HTTP GET on the URL must yield a [google.protobuf.Type][]\n value in binary format, or produce an error.\n* Applications are allowed to cache lookup results based on the\n URL, or have them precompiled into a binary to avoid any\n lookup. Therefore, binary compatibility needs to be preserved\n on changes to types. (Use versioned type names to manage\n breaking changes.)\n\nNote: this functionality is not currently available in the official\nprotobuf release, and it is not used for type URLs beginning with\ntype.googleapis.com.\n\nSchemes other than `http`, `https` (or the empty scheme) might be\nused with implementation specific semantics." + }, + "value": { + "type": "string", + "format": "byte", + "description": "Must be a valid serialized protocol buffer of the above specified type." } }, - "additionalProperties": {}, "description": "`Any` contains an arbitrary serialized protocol buffer message along with a\nURL that describes the type of the serialized message.\n\nProtobuf library provides support to pack/unpack Any values in the form\nof utility functions or additional generated methods of the Any type.\n\nExample 1: Pack and unpack a message in C++.\n\n Foo foo = ...;\n Any any;\n any.PackFrom(foo);\n ...\n if (any.UnpackTo(\u0026foo)) {\n ...\n }\n\nExample 2: Pack and unpack a message in Java.\n\n Foo foo = ...;\n Any any = Any.pack(foo);\n ...\n if (any.is(Foo.class)) {\n foo = any.unpack(Foo.class);\n }\n\n Example 3: Pack and unpack a message in Python.\n\n foo = Foo(...)\n any = Any()\n any.Pack(foo)\n ...\n if any.Is(Foo.DESCRIPTOR):\n any.Unpack(foo)\n ...\n\n Example 4: Pack and unpack a message in Go\n\n foo := \u0026pb.Foo{...}\n any, err := anypb.New(foo)\n if err != nil {\n ...\n }\n ...\n foo := \u0026pb.Foo{}\n if err := any.UnmarshalTo(foo); err != nil {\n ...\n }\n\nThe pack methods provided by protobuf library will by default use\n'type.googleapis.com/full.type.name' as the type URL and the unpack\nmethods only use the fully qualified type name after the last '/'\nin the type URL, for example \"foo.bar.com/x/y.z\" will yield type\nname \"y.z\".\n\n\nJSON\n====\nThe JSON representation of an `Any` value uses the regular\nrepresentation of the deserialized, embedded message, with an\nadditional field `@type` which contains the type URL. Example:\n\n package google.profile;\n message Person {\n string first_name = 1;\n string last_name = 2;\n }\n\n {\n \"@type\": \"type.googleapis.com/google.profile.Person\",\n \"firstName\": \u003cstring\u003e,\n \"lastName\": \u003cstring\u003e\n }\n\nIf the embedded message type is well-known and has a custom JSON\nrepresentation, that representation will be embedded adding a field\n`value` which holds the custom JSON in addition to the `@type`\nfield. Example (for message [google.protobuf.Duration][]):\n\n {\n \"@type\": \"type.googleapis.com/google.protobuf.Duration\",\n \"value\": \"1.212s\"\n }" }, "rpcStatus": { @@ -4458,6 +4405,22 @@ "description": "A reference to a Kubernetes resource related to a specific installed package.\nThe context (cluster) for each resource is that of the related\ninstalled package.", "title": "Resource reference" }, + "v1alpha1RollbackInstalledPackageRequest": { + "type": "object", + "properties": { + "installedPackageRef": { + "$ref": "#/definitions/v1alpha1InstalledPackageReference", + "description": "A reference uniquely identifying the installed package.", + "title": "Installed package reference" + }, + "releaseRevision": { + "type": "integer", + "format": "int32", + "description": "A number identifying the Helm revision to which to rollback.", + "title": "ReleaseRevision" + } + } + }, "v1alpha1RollbackInstalledPackageResponse": { "type": "object", "properties": { @@ -4499,6 +4462,14 @@ "description": "The type of secret. Currently Kubeapps itself only deals with OPAQUE\nand docker config json secrets, but we define all so we can correctly\nlist the secret names with their types.\nSee https://kubernetes.io/docs/concepts/configuration/secret/#secret-types", "title": "SecretType" }, + "v1alpha1SetUserManagedSecretsResponse": { + "type": "object", + "properties": { + "value": { + "type": "boolean" + } + } + }, "v1alpha1TlsCertKey": { "type": "object", "properties": { @@ -4513,6 +4484,29 @@ }, "title": "TlsCertKey" }, + "v1alpha1UpdateInstalledPackageRequest": { + "type": "object", + "properties": { + "installedPackageRef": { + "$ref": "#/definitions/v1alpha1InstalledPackageReference", + "title": "A reference uniquely identifying the installed package being updated.\nRequired" + }, + "pkgVersionReference": { + "$ref": "#/definitions/v1alpha1VersionReference", + "title": "For helm this will be the exact version in VersionReference.version\nFor fluxv2 this could be any semver constraint expression\nFor other plugins we can extend the VersionReference as needed. Optional" + }, + "values": { + "type": "string", + "description": "An optional serialized values string to be included when templating a\npackage in the format expected by the plugin. Included when the backend\nformat doesn't use secrets or configmaps for values or supports both.\nThese values are layered on top of any values refs above, when\nrelevant." + }, + "reconciliationOptions": { + "$ref": "#/definitions/v1alpha1ReconciliationOptions", + "description": "An optional field for specifying data common to systems that reconcile\nthe package on the cluster." + } + }, + "description": "Request for UpdateInstalledPackage. The intent is to reach the desired state specified\nby the fields in the request, while leaving other fields intact. This is a whole\nobject \"Update\" semantics rather than \"Patch\" semantics. The caller will provide the\nvalues for the fields below, which will replace, or be overlayed onto, the\ncorresponding fields in the existing resource. For example, with the\nUpdateInstalledPackageRequest, it is not possible to change just the 'package version\nreference' without also specifying 'values' field. As a side effect, not specifying the\n'values' field in the request means there are no values specified in the desired state.\nSo the meaning of each field value is describing the desired state of the corresponding\nfield in the resource after the update operation has completed the renconciliation.", + "title": "UpdateInstalledPackageRequest" + }, "v1alpha1UpdateInstalledPackageResponse": { "type": "object", "properties": { @@ -4523,6 +4517,52 @@ "description": "Response for UpdateInstalledPackage", "title": "UpdateInstalledPackageResponse" }, + "v1alpha1UpdatePackageRepositoryRequest": { + "type": "object", + "properties": { + "packageRepoRef": { + "$ref": "#/definitions/v1alpha1PackageRepositoryReference", + "title": "A reference uniquely identifying the package repository being updated. \nThe only required field" + }, + "url": { + "type": "string", + "description": "URL identifying the package repository location." + }, + "description": { + "type": "string", + "description": "A user-provided description." + }, + "type": { + "type": "string", + "title": "Package storage type" + }, + "interval": { + "type": "integer", + "format": "int64", + "title": "The interval at which to check the upstream for updates (in seconds)\nOptional. Defaults to 10m if not specified" + }, + "tlsConfig": { + "$ref": "#/definitions/v1alpha1PackageRepositoryTlsConfig", + "title": "TLS-specific parameters for connecting to a repository. Optional" + }, + "auth": { + "$ref": "#/definitions/v1alpha1PackageRepositoryAuth", + "title": "authentication parameters for connecting to a repository. Optional" + } + }, + "description": "Request for UpdatePackageRepository", + "title": "UpdatePackageRepositoryRequest" + }, + "v1alpha1UpdatePackageRepositoryResponse": { + "type": "object", + "properties": { + "packageRepoRef": { + "$ref": "#/definitions/v1alpha1PackageRepositoryReference" + } + }, + "description": "Response for UpdatePackageRepository", + "title": "UpdatePackageRepositoryResponse" + }, "v1alpha1UsernamePassword": { "type": "object", "properties": { diff --git a/cmd/kubeapps-apis/gen/core/packages/v1alpha1/packages_grpc.pb.go b/cmd/kubeapps-apis/gen/core/packages/v1alpha1/packages_grpc.pb.go index f27e4b61ca2..f2e24a461b8 100644 --- a/cmd/kubeapps-apis/gen/core/packages/v1alpha1/packages_grpc.pb.go +++ b/cmd/kubeapps-apis/gen/core/packages/v1alpha1/packages_grpc.pb.go @@ -1,8 +1,4 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: kubeappsapis/core/packages/v1alpha1/packages.proto package v1alpha1 diff --git a/cmd/kubeapps-apis/gen/core/packages/v1alpha1/repositories.pb.go b/cmd/kubeapps-apis/gen/core/packages/v1alpha1/repositories.pb.go index 6a5aac73071..3cb10656420 100644 --- a/cmd/kubeapps-apis/gen/core/packages/v1alpha1/repositories.pb.go +++ b/cmd/kubeapps-apis/gen/core/packages/v1alpha1/repositories.pb.go @@ -138,7 +138,7 @@ func (x PackageRepositoryStatus_StatusReason) Number() protoreflect.EnumNumber { // Deprecated: Use PackageRepositoryStatus_StatusReason.Descriptor instead. func (PackageRepositoryStatus_StatusReason) EnumDescriptor() ([]byte, []int) { - return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{11, 0} + return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{12, 0} } // AddPackageRepositoryRequest @@ -941,6 +941,113 @@ func (x *GetPackageRepositorySummariesRequest) GetContext() *Context { return nil } +// UpdatePackageRepositoryRequest +// +// Request for UpdatePackageRepository +type UpdatePackageRepositoryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A reference uniquely identifying the package repository being updated. + // The only required field + PackageRepoRef *PackageRepositoryReference `protobuf:"bytes,1,opt,name=package_repo_ref,json=packageRepoRef,proto3" json:"package_repo_ref,omitempty"` + // URL identifying the package repository location. + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` + // A user-provided description. + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` + // Package storage type + Type string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"` + // The interval at which to check the upstream for updates (in seconds) + // Optional. Defaults to 10m if not specified + Interval uint32 `protobuf:"varint,5,opt,name=interval,proto3" json:"interval,omitempty"` + // TLS-specific parameters for connecting to a repository. Optional + TlsConfig *PackageRepositoryTlsConfig `protobuf:"bytes,6,opt,name=tls_config,json=tlsConfig,proto3" json:"tls_config,omitempty"` + // authentication parameters for connecting to a repository. Optional + Auth *PackageRepositoryAuth `protobuf:"bytes,7,opt,name=auth,proto3" json:"auth,omitempty"` +} + +func (x *UpdatePackageRepositoryRequest) Reset() { + *x = UpdatePackageRepositoryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdatePackageRepositoryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePackageRepositoryRequest) ProtoMessage() {} + +func (x *UpdatePackageRepositoryRequest) ProtoReflect() protoreflect.Message { + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePackageRepositoryRequest.ProtoReflect.Descriptor instead. +func (*UpdatePackageRepositoryRequest) Descriptor() ([]byte, []int) { + return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{9} +} + +func (x *UpdatePackageRepositoryRequest) GetPackageRepoRef() *PackageRepositoryReference { + if x != nil { + return x.PackageRepoRef + } + return nil +} + +func (x *UpdatePackageRepositoryRequest) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *UpdatePackageRepositoryRequest) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *UpdatePackageRepositoryRequest) GetType() string { + if x != nil { + return x.Type + } + return "" +} + +func (x *UpdatePackageRepositoryRequest) GetInterval() uint32 { + if x != nil { + return x.Interval + } + return 0 +} + +func (x *UpdatePackageRepositoryRequest) GetTlsConfig() *PackageRepositoryTlsConfig { + if x != nil { + return x.TlsConfig + } + return nil +} + +func (x *UpdatePackageRepositoryRequest) GetAuth() *PackageRepositoryAuth { + if x != nil { + return x.Auth + } + return nil +} + // PackageRepositoryReference // // A PackageRepositoryReference has the minimum information required to @@ -964,7 +1071,7 @@ type PackageRepositoryReference struct { func (x *PackageRepositoryReference) Reset() { *x = PackageRepositoryReference{} if protoimpl.UnsafeEnabled { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[9] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -977,7 +1084,7 @@ func (x *PackageRepositoryReference) String() string { func (*PackageRepositoryReference) ProtoMessage() {} func (x *PackageRepositoryReference) ProtoReflect() protoreflect.Message { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[9] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -990,7 +1097,7 @@ func (x *PackageRepositoryReference) ProtoReflect() protoreflect.Message { // Deprecated: Use PackageRepositoryReference.ProtoReflect.Descriptor instead. func (*PackageRepositoryReference) Descriptor() ([]byte, []int) { - return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{9} + return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{10} } func (x *PackageRepositoryReference) GetContext() *Context { @@ -1032,7 +1139,7 @@ type AddPackageRepositoryResponse struct { func (x *AddPackageRepositoryResponse) Reset() { *x = AddPackageRepositoryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[10] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1045,7 +1152,7 @@ func (x *AddPackageRepositoryResponse) String() string { func (*AddPackageRepositoryResponse) ProtoMessage() {} func (x *AddPackageRepositoryResponse) ProtoReflect() protoreflect.Message { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[10] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1058,7 +1165,7 @@ func (x *AddPackageRepositoryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AddPackageRepositoryResponse.ProtoReflect.Descriptor instead. func (*AddPackageRepositoryResponse) Descriptor() ([]byte, []int) { - return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{10} + return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{11} } func (x *AddPackageRepositoryResponse) GetPackageRepoRef() *PackageRepositoryReference { @@ -1093,7 +1200,7 @@ type PackageRepositoryStatus struct { func (x *PackageRepositoryStatus) Reset() { *x = PackageRepositoryStatus{} if protoimpl.UnsafeEnabled { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[11] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1106,7 +1213,7 @@ func (x *PackageRepositoryStatus) String() string { func (*PackageRepositoryStatus) ProtoMessage() {} func (x *PackageRepositoryStatus) ProtoReflect() protoreflect.Message { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[11] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1119,7 +1226,7 @@ func (x *PackageRepositoryStatus) ProtoReflect() protoreflect.Message { // Deprecated: Use PackageRepositoryStatus.ProtoReflect.Descriptor instead. func (*PackageRepositoryStatus) Descriptor() ([]byte, []int) { - return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{11} + return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{12} } func (x *PackageRepositoryStatus) GetReady() bool { @@ -1186,7 +1293,7 @@ type PackageRepositoryDetail struct { func (x *PackageRepositoryDetail) Reset() { *x = PackageRepositoryDetail{} if protoimpl.UnsafeEnabled { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[12] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1199,7 +1306,7 @@ func (x *PackageRepositoryDetail) String() string { func (*PackageRepositoryDetail) ProtoMessage() {} func (x *PackageRepositoryDetail) ProtoReflect() protoreflect.Message { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[12] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1212,7 +1319,7 @@ func (x *PackageRepositoryDetail) ProtoReflect() protoreflect.Message { // Deprecated: Use PackageRepositoryDetail.ProtoReflect.Descriptor instead. func (*PackageRepositoryDetail) Descriptor() ([]byte, []int) { - return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{12} + return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{13} } func (x *PackageRepositoryDetail) GetPackageRepoRef() *PackageRepositoryReference { @@ -1307,7 +1414,7 @@ type GetPackageRepositoryDetailResponse struct { func (x *GetPackageRepositoryDetailResponse) Reset() { *x = GetPackageRepositoryDetailResponse{} if protoimpl.UnsafeEnabled { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[13] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1320,7 +1427,7 @@ func (x *GetPackageRepositoryDetailResponse) String() string { func (*GetPackageRepositoryDetailResponse) ProtoMessage() {} func (x *GetPackageRepositoryDetailResponse) ProtoReflect() protoreflect.Message { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[13] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1333,7 +1440,7 @@ func (x *GetPackageRepositoryDetailResponse) ProtoReflect() protoreflect.Message // Deprecated: Use GetPackageRepositoryDetailResponse.ProtoReflect.Descriptor instead. func (*GetPackageRepositoryDetailResponse) Descriptor() ([]byte, []int) { - return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{13} + return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{14} } func (x *GetPackageRepositoryDetailResponse) GetDetail() *PackageRepositoryDetail { @@ -1370,7 +1477,7 @@ type PackageRepositorySummary struct { func (x *PackageRepositorySummary) Reset() { *x = PackageRepositorySummary{} if protoimpl.UnsafeEnabled { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[14] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1383,7 +1490,7 @@ func (x *PackageRepositorySummary) String() string { func (*PackageRepositorySummary) ProtoMessage() {} func (x *PackageRepositorySummary) ProtoReflect() protoreflect.Message { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[14] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1396,7 +1503,7 @@ func (x *PackageRepositorySummary) ProtoReflect() protoreflect.Message { // Deprecated: Use PackageRepositorySummary.ProtoReflect.Descriptor instead. func (*PackageRepositorySummary) Descriptor() ([]byte, []int) { - return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{14} + return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{15} } func (x *PackageRepositorySummary) GetPackageRepoRef() *PackageRepositoryReference { @@ -1463,7 +1570,7 @@ type GetPackageRepositorySummariesResponse struct { func (x *GetPackageRepositorySummariesResponse) Reset() { *x = GetPackageRepositorySummariesResponse{} if protoimpl.UnsafeEnabled { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[15] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1476,7 +1583,7 @@ func (x *GetPackageRepositorySummariesResponse) String() string { func (*GetPackageRepositorySummariesResponse) ProtoMessage() {} func (x *GetPackageRepositorySummariesResponse) ProtoReflect() protoreflect.Message { - mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[15] + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1489,7 +1596,7 @@ func (x *GetPackageRepositorySummariesResponse) ProtoReflect() protoreflect.Mess // Deprecated: Use GetPackageRepositorySummariesResponse.ProtoReflect.Descriptor instead. func (*GetPackageRepositorySummariesResponse) Descriptor() ([]byte, []int) { - return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{15} + return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{16} } func (x *GetPackageRepositorySummariesResponse) GetPackageRepositorySummaries() []*PackageRepositorySummary { @@ -1499,6 +1606,56 @@ func (x *GetPackageRepositorySummariesResponse) GetPackageRepositorySummaries() return nil } +// UpdatePackageRepositoryResponse +// +// Response for UpdatePackageRepository +type UpdatePackageRepositoryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + PackageRepoRef *PackageRepositoryReference `protobuf:"bytes,1,opt,name=package_repo_ref,json=packageRepoRef,proto3" json:"package_repo_ref,omitempty"` +} + +func (x *UpdatePackageRepositoryResponse) Reset() { + *x = UpdatePackageRepositoryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[17] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *UpdatePackageRepositoryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*UpdatePackageRepositoryResponse) ProtoMessage() {} + +func (x *UpdatePackageRepositoryResponse) ProtoReflect() protoreflect.Message { + mi := &file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[17] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use UpdatePackageRepositoryResponse.ProtoReflect.Descriptor instead. +func (*UpdatePackageRepositoryResponse) Descriptor() ([]byte, []int) { + return file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP(), []int{17} +} + +func (x *UpdatePackageRepositoryResponse) GetPackageRepoRef() *PackageRepositoryReference { + if x != nil { + return x.PackageRepoRef + } + return nil +} + var File_kubeappsapis_core_packages_v1alpha1_repositories_proto protoreflect.FileDescriptor var file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDesc = []byte{ @@ -1663,187 +1820,247 @@ var file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDesc = []byte 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, - 0x74, 0x22, 0xc8, 0x01, 0x0a, 0x1a, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, - 0x12, 0x46, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x2c, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, - 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, - 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, - 0x75, 0x67, 0x69, 0x6e, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x22, 0x89, 0x01, 0x0a, - 0x1c, 0x41, 0x64, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, - 0x10, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, - 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, - 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, - 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x52, 0x65, 0x66, 0x22, 0xb2, 0x02, 0x0a, 0x17, 0x50, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x12, 0x61, 0x0a, 0x06, 0x72, 0x65, - 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x49, 0x2e, 0x6b, 0x75, 0x62, - 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, - 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0x7d, - 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1d, - 0x0a, 0x19, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, - 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, - 0x15, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, - 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x41, 0x54, - 0x55, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, - 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x41, - 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x22, 0xe8, 0x04, - 0x0a, 0x17, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x69, 0x0a, 0x10, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, - 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, - 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, - 0x6f, 0x52, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, - 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x5e, 0x0a, 0x0a, 0x74, 0x6c, 0x73, 0x5f, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6b, 0x75, - 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, 0x74, 0x6c, - 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, - 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, - 0x68, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x12, 0x39, 0x0a, 0x0d, 0x63, 0x75, 0x73, 0x74, 0x6f, - 0x6d, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x12, 0x54, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, - 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x7a, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x50, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, - 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, + 0x74, 0x22, 0x9f, 0x03, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x69, 0x0a, 0x10, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, + 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x06, 0x64, 0x65, - 0x74, 0x61, 0x69, 0x6c, 0x22, 0xe2, 0x02, 0x0a, 0x18, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x79, 0x12, 0x69, 0x0a, 0x10, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, - 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6b, 0x75, - 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, - 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x52, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, - 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x12, 0x12, 0x0a, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x75, 0x72, 0x6c, 0x12, 0x54, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, + 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x52, 0x65, 0x66, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, + 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x76, 0x61, 0x6c, 0x12, 0x5e, 0x0a, 0x0a, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, + 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, + 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, 0x74, 0x6c, 0x73, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x04, 0x61, 0x75, 0x74, 0x68, 0x18, 0x07, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x3a, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x75, 0x74, 0x68, 0x52, 0x04, 0x61, + 0x75, 0x74, 0x68, 0x22, 0xc8, 0x01, 0x0a, 0x1a, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, + 0x63, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, - 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xa8, 0x01, 0x0a, 0x25, 0x47, 0x65, - 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x1c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6b, 0x75, 0x62, 0x65, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x42, 0x0a, 0x06, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x6b, 0x75, 0x62, + 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x22, 0x89, + 0x01, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x69, 0x0a, 0x10, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, + 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x1a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x69, 0x65, 0x73, 0x32, 0xe2, 0x06, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x69, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xcc, 0x01, 0x0a, - 0x14, 0x41, 0x64, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x40, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, - 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, + 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x52, 0x65, 0x66, 0x22, 0xb2, 0x02, 0x0a, 0x17, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x12, 0x61, 0x0a, 0x06, + 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x49, 0x2e, 0x6b, + 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, + 0x1f, 0x0a, 0x0b, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x22, 0x7d, 0x0a, 0x0c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x19, 0x0a, 0x15, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, + 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, + 0x45, 0x44, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x03, 0x22, + 0xe8, 0x04, 0x0a, 0x17, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x69, 0x0a, 0x10, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x52, 0x65, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1a, 0x0a, + 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x12, 0x5e, 0x0a, 0x0a, 0x74, 0x6c, 0x73, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, + 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09, + 0x74, 0x6c, 0x73, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x4e, 0x0a, 0x04, 0x61, 0x75, 0x74, + 0x68, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x64, - 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x29, 0x22, 0x24, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x94, 0x03, 0x0a, 0x1a, + 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x41, + 0x75, 0x74, 0x68, 0x52, 0x04, 0x61, 0x75, 0x74, 0x68, 0x12, 0x39, 0x0a, 0x0d, 0x63, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x5f, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x0c, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x12, 0x54, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x7a, 0x0a, 0x22, 0x47, 0x65, + 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x54, 0x0a, 0x06, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x3c, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x06, + 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x22, 0xe2, 0x02, 0x0a, 0x18, 0x50, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x12, 0x69, 0x0a, 0x10, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, + 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, + 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0e, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x52, 0x65, 0x66, 0x12, 0x12, + 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, + 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, + 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, + 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x64, 0x12, + 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, + 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x54, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3c, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0xa8, 0x01, 0x0a, 0x25, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x46, 0x2e, 0x6b, 0x75, 0x62, - 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x47, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, - 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, - 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe4, 0x01, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0xdd, 0x01, 0x12, 0xda, 0x01, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, - 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, - 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, - 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x63, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, - 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x73, 0x2f, 0x7b, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, - 0x72, 0x65, 0x66, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3d, 0x2a, - 0x2a, 0x7d, 0x12, 0xe4, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x69, 0x65, 0x73, 0x12, 0x49, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, + 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x1c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x73, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3d, 0x2e, 0x6b, 0x75, + 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x1a, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x22, 0x8c, 0x01, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x10, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x4a, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x52, 0x65, 0x66, 0x32, 0xf3, 0x09, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xcc, 0x01, + 0x0a, 0x14, 0x41, 0x64, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x40, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, + 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, + 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, + 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, + 0x64, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, + 0x93, 0x02, 0x29, 0x22, 0x24, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x42, 0x4f, 0x5a, 0x4d, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, - 0x61, 0x6e, 0x7a, 0x75, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x63, 0x6d, - 0x64, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x73, 0x2f, - 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x94, 0x03, 0x0a, + 0x1a, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x46, 0x2e, 0x6b, 0x75, + 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x47, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, + 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, + 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, + 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xe4, 0x01, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0xdd, 0x01, 0x12, 0xda, 0x01, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, + 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x6e, 0x61, + 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, + 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x63, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x73, 0x2f, 0x7b, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, + 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3d, + 0x2a, 0x2a, 0x7d, 0x12, 0xe4, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x49, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x4a, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x26, 0x12, 0x24, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x8e, 0x03, 0x0a, 0x17, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x43, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, + 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x44, 0x2e, 0x6b, 0x75, + 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0xe7, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xe0, 0x01, 0x1a, 0xda, 0x01, 0x2f, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x63, 0x2f, 0x7b, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x2f, + 0x6e, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, + 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x3d, 0x2a, 0x2a, 0x7d, 0x3a, 0x01, 0x2a, 0x42, 0x4f, 0x5a, 0x4d, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, + 0x2d, 0x74, 0x61, 0x6e, 0x7a, 0x75, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x2f, + 0x63, 0x6d, 0x64, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x2d, 0x61, 0x70, 0x69, + 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1859,7 +2076,7 @@ func file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDescGZIP() [ } var file_kubeappsapis_core_packages_v1alpha1_repositories_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes = make([]protoimpl.MessageInfo, 18) var file_kubeappsapis_core_packages_v1alpha1_repositories_proto_goTypes = []interface{}{ (PackageRepositoryAuth_PackageRepositoryAuthType)(0), // 0: kubeappsapis.core.packages.v1alpha1.PackageRepositoryAuth.PackageRepositoryAuthType (PackageRepositoryStatus_StatusReason)(0), // 1: kubeappsapis.core.packages.v1alpha1.PackageRepositoryStatus.StatusReason @@ -1872,55 +2089,63 @@ var file_kubeappsapis_core_packages_v1alpha1_repositories_proto_goTypes = []inte (*SecretKeyReference)(nil), // 8: kubeappsapis.core.packages.v1alpha1.SecretKeyReference (*GetPackageRepositoryDetailRequest)(nil), // 9: kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailRequest (*GetPackageRepositorySummariesRequest)(nil), // 10: kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesRequest - (*PackageRepositoryReference)(nil), // 11: kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference - (*AddPackageRepositoryResponse)(nil), // 12: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryResponse - (*PackageRepositoryStatus)(nil), // 13: kubeappsapis.core.packages.v1alpha1.PackageRepositoryStatus - (*PackageRepositoryDetail)(nil), // 14: kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail - (*GetPackageRepositoryDetailResponse)(nil), // 15: kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailResponse - (*PackageRepositorySummary)(nil), // 16: kubeappsapis.core.packages.v1alpha1.PackageRepositorySummary - (*GetPackageRepositorySummariesResponse)(nil), // 17: kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesResponse - (*Context)(nil), // 18: kubeappsapis.core.packages.v1alpha1.Context - (*v1alpha1.Plugin)(nil), // 19: kubeappsapis.core.plugins.v1alpha1.Plugin - (*anypb.Any)(nil), // 20: google.protobuf.Any + (*UpdatePackageRepositoryRequest)(nil), // 11: kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryRequest + (*PackageRepositoryReference)(nil), // 12: kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference + (*AddPackageRepositoryResponse)(nil), // 13: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryResponse + (*PackageRepositoryStatus)(nil), // 14: kubeappsapis.core.packages.v1alpha1.PackageRepositoryStatus + (*PackageRepositoryDetail)(nil), // 15: kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail + (*GetPackageRepositoryDetailResponse)(nil), // 16: kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailResponse + (*PackageRepositorySummary)(nil), // 17: kubeappsapis.core.packages.v1alpha1.PackageRepositorySummary + (*GetPackageRepositorySummariesResponse)(nil), // 18: kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesResponse + (*UpdatePackageRepositoryResponse)(nil), // 19: kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryResponse + (*Context)(nil), // 20: kubeappsapis.core.packages.v1alpha1.Context + (*v1alpha1.Plugin)(nil), // 21: kubeappsapis.core.plugins.v1alpha1.Plugin + (*anypb.Any)(nil), // 22: google.protobuf.Any } var file_kubeappsapis_core_packages_v1alpha1_repositories_proto_depIdxs = []int32{ - 18, // 0: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest.context:type_name -> kubeappsapis.core.packages.v1alpha1.Context + 20, // 0: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest.context:type_name -> kubeappsapis.core.packages.v1alpha1.Context 3, // 1: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest.tls_config:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryTlsConfig 4, // 2: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest.auth:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryAuth - 19, // 3: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest.plugin:type_name -> kubeappsapis.core.plugins.v1alpha1.Plugin - 20, // 4: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest.custom_detail:type_name -> google.protobuf.Any + 21, // 3: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest.plugin:type_name -> kubeappsapis.core.plugins.v1alpha1.Plugin + 22, // 4: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest.custom_detail:type_name -> google.protobuf.Any 8, // 5: kubeappsapis.core.packages.v1alpha1.PackageRepositoryTlsConfig.secret_ref:type_name -> kubeappsapis.core.packages.v1alpha1.SecretKeyReference 0, // 6: kubeappsapis.core.packages.v1alpha1.PackageRepositoryAuth.type:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryAuth.PackageRepositoryAuthType 5, // 7: kubeappsapis.core.packages.v1alpha1.PackageRepositoryAuth.username_password:type_name -> kubeappsapis.core.packages.v1alpha1.UsernamePassword 6, // 8: kubeappsapis.core.packages.v1alpha1.PackageRepositoryAuth.tls_cert_key:type_name -> kubeappsapis.core.packages.v1alpha1.TlsCertKey 7, // 9: kubeappsapis.core.packages.v1alpha1.PackageRepositoryAuth.docker_creds:type_name -> kubeappsapis.core.packages.v1alpha1.DockerCredentials 8, // 10: kubeappsapis.core.packages.v1alpha1.PackageRepositoryAuth.secret_ref:type_name -> kubeappsapis.core.packages.v1alpha1.SecretKeyReference - 11, // 11: kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailRequest.package_repo_ref:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference - 18, // 12: kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesRequest.context:type_name -> kubeappsapis.core.packages.v1alpha1.Context - 18, // 13: kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference.context:type_name -> kubeappsapis.core.packages.v1alpha1.Context - 19, // 14: kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference.plugin:type_name -> kubeappsapis.core.plugins.v1alpha1.Plugin - 11, // 15: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryResponse.package_repo_ref:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference - 1, // 16: kubeappsapis.core.packages.v1alpha1.PackageRepositoryStatus.reason:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryStatus.StatusReason - 11, // 17: kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail.package_repo_ref:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference - 3, // 18: kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail.tls_config:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryTlsConfig - 4, // 19: kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail.auth:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryAuth - 20, // 20: kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail.custom_detail:type_name -> google.protobuf.Any - 13, // 21: kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail.status:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryStatus - 14, // 22: kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailResponse.detail:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail - 11, // 23: kubeappsapis.core.packages.v1alpha1.PackageRepositorySummary.package_repo_ref:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference - 13, // 24: kubeappsapis.core.packages.v1alpha1.PackageRepositorySummary.status:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryStatus - 16, // 25: kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesResponse.package_repository_summaries:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositorySummary - 2, // 26: kubeappsapis.core.packages.v1alpha1.RepositoriesService.AddPackageRepository:input_type -> kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest - 9, // 27: kubeappsapis.core.packages.v1alpha1.RepositoriesService.GetPackageRepositoryDetail:input_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailRequest - 10, // 28: kubeappsapis.core.packages.v1alpha1.RepositoriesService.GetPackageRepositorySummaries:input_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesRequest - 12, // 29: kubeappsapis.core.packages.v1alpha1.RepositoriesService.AddPackageRepository:output_type -> kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryResponse - 15, // 30: kubeappsapis.core.packages.v1alpha1.RepositoriesService.GetPackageRepositoryDetail:output_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailResponse - 17, // 31: kubeappsapis.core.packages.v1alpha1.RepositoriesService.GetPackageRepositorySummaries:output_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesResponse - 29, // [29:32] is the sub-list for method output_type - 26, // [26:29] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 12, // 11: kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailRequest.package_repo_ref:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference + 20, // 12: kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesRequest.context:type_name -> kubeappsapis.core.packages.v1alpha1.Context + 12, // 13: kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryRequest.package_repo_ref:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference + 3, // 14: kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryRequest.tls_config:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryTlsConfig + 4, // 15: kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryRequest.auth:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryAuth + 20, // 16: kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference.context:type_name -> kubeappsapis.core.packages.v1alpha1.Context + 21, // 17: kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference.plugin:type_name -> kubeappsapis.core.plugins.v1alpha1.Plugin + 12, // 18: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryResponse.package_repo_ref:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference + 1, // 19: kubeappsapis.core.packages.v1alpha1.PackageRepositoryStatus.reason:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryStatus.StatusReason + 12, // 20: kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail.package_repo_ref:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference + 3, // 21: kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail.tls_config:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryTlsConfig + 4, // 22: kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail.auth:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryAuth + 22, // 23: kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail.custom_detail:type_name -> google.protobuf.Any + 14, // 24: kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail.status:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryStatus + 15, // 25: kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailResponse.detail:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryDetail + 12, // 26: kubeappsapis.core.packages.v1alpha1.PackageRepositorySummary.package_repo_ref:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference + 14, // 27: kubeappsapis.core.packages.v1alpha1.PackageRepositorySummary.status:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryStatus + 17, // 28: kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesResponse.package_repository_summaries:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositorySummary + 12, // 29: kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryResponse.package_repo_ref:type_name -> kubeappsapis.core.packages.v1alpha1.PackageRepositoryReference + 2, // 30: kubeappsapis.core.packages.v1alpha1.RepositoriesService.AddPackageRepository:input_type -> kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest + 9, // 31: kubeappsapis.core.packages.v1alpha1.RepositoriesService.GetPackageRepositoryDetail:input_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailRequest + 10, // 32: kubeappsapis.core.packages.v1alpha1.RepositoriesService.GetPackageRepositorySummaries:input_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesRequest + 11, // 33: kubeappsapis.core.packages.v1alpha1.RepositoriesService.UpdatePackageRepository:input_type -> kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryRequest + 13, // 34: kubeappsapis.core.packages.v1alpha1.RepositoriesService.AddPackageRepository:output_type -> kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryResponse + 16, // 35: kubeappsapis.core.packages.v1alpha1.RepositoriesService.GetPackageRepositoryDetail:output_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailResponse + 18, // 36: kubeappsapis.core.packages.v1alpha1.RepositoriesService.GetPackageRepositorySummaries:output_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesResponse + 19, // 37: kubeappsapis.core.packages.v1alpha1.RepositoriesService.UpdatePackageRepository:output_type -> kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryResponse + 34, // [34:38] is the sub-list for method output_type + 30, // [30:34] is the sub-list for method input_type + 30, // [30:30] is the sub-list for extension type_name + 30, // [30:30] is the sub-list for extension extendee + 0, // [0:30] is the sub-list for field type_name } func init() { file_kubeappsapis_core_packages_v1alpha1_repositories_proto_init() } @@ -2039,7 +2264,7 @@ func file_kubeappsapis_core_packages_v1alpha1_repositories_proto_init() { } } file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PackageRepositoryReference); i { + switch v := v.(*UpdatePackageRepositoryRequest); i { case 0: return &v.state case 1: @@ -2051,7 +2276,7 @@ func file_kubeappsapis_core_packages_v1alpha1_repositories_proto_init() { } } file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddPackageRepositoryResponse); i { + switch v := v.(*PackageRepositoryReference); i { case 0: return &v.state case 1: @@ -2063,7 +2288,7 @@ func file_kubeappsapis_core_packages_v1alpha1_repositories_proto_init() { } } file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PackageRepositoryStatus); i { + switch v := v.(*AddPackageRepositoryResponse); i { case 0: return &v.state case 1: @@ -2075,7 +2300,7 @@ func file_kubeappsapis_core_packages_v1alpha1_repositories_proto_init() { } } file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PackageRepositoryDetail); i { + switch v := v.(*PackageRepositoryStatus); i { case 0: return &v.state case 1: @@ -2087,7 +2312,7 @@ func file_kubeappsapis_core_packages_v1alpha1_repositories_proto_init() { } } file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetPackageRepositoryDetailResponse); i { + switch v := v.(*PackageRepositoryDetail); i { case 0: return &v.state case 1: @@ -2099,7 +2324,7 @@ func file_kubeappsapis_core_packages_v1alpha1_repositories_proto_init() { } } file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PackageRepositorySummary); i { + switch v := v.(*GetPackageRepositoryDetailResponse); i { case 0: return &v.state case 1: @@ -2111,6 +2336,18 @@ func file_kubeappsapis_core_packages_v1alpha1_repositories_proto_init() { } } file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PackageRepositorySummary); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GetPackageRepositorySummariesResponse); i { case 0: return &v.state @@ -2122,6 +2359,18 @@ func file_kubeappsapis_core_packages_v1alpha1_repositories_proto_init() { return nil } } + file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdatePackageRepositoryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_kubeappsapis_core_packages_v1alpha1_repositories_proto_msgTypes[1].OneofWrappers = []interface{}{ (*PackageRepositoryTlsConfig_CertAuthority)(nil), @@ -2140,7 +2389,7 @@ func file_kubeappsapis_core_packages_v1alpha1_repositories_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_kubeappsapis_core_packages_v1alpha1_repositories_proto_rawDesc, NumEnums: 2, - NumMessages: 16, + NumMessages: 18, NumExtensions: 0, NumServices: 1, }, diff --git a/cmd/kubeapps-apis/gen/core/packages/v1alpha1/repositories.pb.gw.go b/cmd/kubeapps-apis/gen/core/packages/v1alpha1/repositories.pb.gw.go index 113e6575e84..8907a151eeb 100644 --- a/cmd/kubeapps-apis/gen/core/packages/v1alpha1/repositories.pb.gw.go +++ b/cmd/kubeapps-apis/gen/core/packages/v1alpha1/repositories.pb.gw.go @@ -251,6 +251,154 @@ func local_request_RepositoriesService_GetPackageRepositorySummaries_0(ctx conte } +func request_RepositoriesService_UpdatePackageRepository_0(ctx context.Context, marshaler runtime.Marshaler, client RepositoriesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdatePackageRepositoryRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["package_repo_ref.plugin.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.plugin.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.plugin.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.plugin.name", err) + } + + val, ok = pathParams["package_repo_ref.plugin.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.plugin.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.plugin.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.plugin.version", err) + } + + val, ok = pathParams["package_repo_ref.context.cluster"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.context.cluster") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.context.cluster", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.context.cluster", err) + } + + val, ok = pathParams["package_repo_ref.context.namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.context.namespace") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.context.namespace", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.context.namespace", err) + } + + val, ok = pathParams["package_repo_ref.identifier"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.identifier") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.identifier", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.identifier", err) + } + + msg, err := client.UpdatePackageRepository(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_RepositoriesService_UpdatePackageRepository_0(ctx context.Context, marshaler runtime.Marshaler, server RepositoriesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq UpdatePackageRepositoryRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["package_repo_ref.plugin.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.plugin.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.plugin.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.plugin.name", err) + } + + val, ok = pathParams["package_repo_ref.plugin.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.plugin.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.plugin.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.plugin.version", err) + } + + val, ok = pathParams["package_repo_ref.context.cluster"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.context.cluster") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.context.cluster", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.context.cluster", err) + } + + val, ok = pathParams["package_repo_ref.context.namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.context.namespace") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.context.namespace", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.context.namespace", err) + } + + val, ok = pathParams["package_repo_ref.identifier"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.identifier") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.identifier", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.identifier", err) + } + + msg, err := server.UpdatePackageRepository(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterRepositoriesServiceHandlerServer registers the http handlers for service RepositoriesService to "mux". // UnaryRPC :call RepositoriesServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -326,6 +474,29 @@ func RegisterRepositoriesServiceHandlerServer(ctx context.Context, mux *runtime. }) + mux.Handle("PUT", pattern_RepositoriesService_UpdatePackageRepository_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeappsapis.core.packages.v1alpha1.RepositoriesService/UpdatePackageRepository", runtime.WithHTTPPathPattern("/core/packages/v1alpha1/repositories/plugin/{package_repo_ref.plugin.name}/{package_repo_ref.plugin.version}/c/{package_repo_ref.context.cluster}/ns/{package_repo_ref.context.namespace}/{package_repo_ref.identifier=**}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_RepositoriesService_UpdatePackageRepository_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RepositoriesService_UpdatePackageRepository_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -427,6 +598,26 @@ func RegisterRepositoriesServiceHandlerClient(ctx context.Context, mux *runtime. }) + mux.Handle("PUT", pattern_RepositoriesService_UpdatePackageRepository_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/kubeappsapis.core.packages.v1alpha1.RepositoriesService/UpdatePackageRepository", runtime.WithHTTPPathPattern("/core/packages/v1alpha1/repositories/plugin/{package_repo_ref.plugin.name}/{package_repo_ref.plugin.version}/c/{package_repo_ref.context.cluster}/ns/{package_repo_ref.context.namespace}/{package_repo_ref.identifier=**}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_RepositoriesService_UpdatePackageRepository_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_RepositoriesService_UpdatePackageRepository_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -436,6 +627,8 @@ var ( pattern_RepositoriesService_GetPackageRepositoryDetail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9, 1, 0, 4, 1, 5, 10, 3, 0, 4, 1, 5, 11}, []string{"core", "packages", "v1alpha1", "repositories", "plugin", "package_repo_ref.plugin.name", "package_repo_ref.plugin.version", "c", "package_repo_ref.context.cluster", "ns", "package_repo_ref.context.namespace", "package_repo_ref.identifier"}, "")) pattern_RepositoriesService_GetPackageRepositorySummaries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"core", "packages", "v1alpha1", "repositories"}, "")) + + pattern_RepositoriesService_UpdatePackageRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5, 1, 0, 4, 1, 5, 6, 2, 7, 1, 0, 4, 1, 5, 8, 2, 9, 1, 0, 4, 1, 5, 10, 3, 0, 4, 1, 5, 11}, []string{"core", "packages", "v1alpha1", "repositories", "plugin", "package_repo_ref.plugin.name", "package_repo_ref.plugin.version", "c", "package_repo_ref.context.cluster", "ns", "package_repo_ref.context.namespace", "package_repo_ref.identifier"}, "")) ) var ( @@ -444,4 +637,6 @@ var ( forward_RepositoriesService_GetPackageRepositoryDetail_0 = runtime.ForwardResponseMessage forward_RepositoriesService_GetPackageRepositorySummaries_0 = runtime.ForwardResponseMessage + + forward_RepositoriesService_UpdatePackageRepository_0 = runtime.ForwardResponseMessage ) diff --git a/cmd/kubeapps-apis/gen/core/packages/v1alpha1/repositories_grpc.pb.go b/cmd/kubeapps-apis/gen/core/packages/v1alpha1/repositories_grpc.pb.go index 51b61976f1f..30b46bfd9c7 100644 --- a/cmd/kubeapps-apis/gen/core/packages/v1alpha1/repositories_grpc.pb.go +++ b/cmd/kubeapps-apis/gen/core/packages/v1alpha1/repositories_grpc.pb.go @@ -1,8 +1,4 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: kubeappsapis/core/packages/v1alpha1/repositories.proto package v1alpha1 @@ -25,6 +21,7 @@ type RepositoriesServiceClient interface { AddPackageRepository(ctx context.Context, in *AddPackageRepositoryRequest, opts ...grpc.CallOption) (*AddPackageRepositoryResponse, error) GetPackageRepositoryDetail(ctx context.Context, in *GetPackageRepositoryDetailRequest, opts ...grpc.CallOption) (*GetPackageRepositoryDetailResponse, error) GetPackageRepositorySummaries(ctx context.Context, in *GetPackageRepositorySummariesRequest, opts ...grpc.CallOption) (*GetPackageRepositorySummariesResponse, error) + UpdatePackageRepository(ctx context.Context, in *UpdatePackageRepositoryRequest, opts ...grpc.CallOption) (*UpdatePackageRepositoryResponse, error) } type repositoriesServiceClient struct { @@ -62,6 +59,15 @@ func (c *repositoriesServiceClient) GetPackageRepositorySummaries(ctx context.Co return out, nil } +func (c *repositoriesServiceClient) UpdatePackageRepository(ctx context.Context, in *UpdatePackageRepositoryRequest, opts ...grpc.CallOption) (*UpdatePackageRepositoryResponse, error) { + out := new(UpdatePackageRepositoryResponse) + err := c.cc.Invoke(ctx, "/kubeappsapis.core.packages.v1alpha1.RepositoriesService/UpdatePackageRepository", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // RepositoriesServiceServer is the server API for RepositoriesService service. // All implementations should embed UnimplementedRepositoriesServiceServer // for forward compatibility @@ -69,6 +75,7 @@ type RepositoriesServiceServer interface { AddPackageRepository(context.Context, *AddPackageRepositoryRequest) (*AddPackageRepositoryResponse, error) GetPackageRepositoryDetail(context.Context, *GetPackageRepositoryDetailRequest) (*GetPackageRepositoryDetailResponse, error) GetPackageRepositorySummaries(context.Context, *GetPackageRepositorySummariesRequest) (*GetPackageRepositorySummariesResponse, error) + UpdatePackageRepository(context.Context, *UpdatePackageRepositoryRequest) (*UpdatePackageRepositoryResponse, error) } // UnimplementedRepositoriesServiceServer should be embedded to have forward compatible implementations. @@ -84,6 +91,9 @@ func (UnimplementedRepositoriesServiceServer) GetPackageRepositoryDetail(context func (UnimplementedRepositoriesServiceServer) GetPackageRepositorySummaries(context.Context, *GetPackageRepositorySummariesRequest) (*GetPackageRepositorySummariesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPackageRepositorySummaries not implemented") } +func (UnimplementedRepositoriesServiceServer) UpdatePackageRepository(context.Context, *UpdatePackageRepositoryRequest) (*UpdatePackageRepositoryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdatePackageRepository not implemented") +} // UnsafeRepositoriesServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to RepositoriesServiceServer will @@ -150,6 +160,24 @@ func _RepositoriesService_GetPackageRepositorySummaries_Handler(srv interface{}, return interceptor(ctx, in, info, handler) } +func _RepositoriesService_UpdatePackageRepository_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(UpdatePackageRepositoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(RepositoriesServiceServer).UpdatePackageRepository(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/kubeappsapis.core.packages.v1alpha1.RepositoriesService/UpdatePackageRepository", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(RepositoriesServiceServer).UpdatePackageRepository(ctx, req.(*UpdatePackageRepositoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + // RepositoriesService_ServiceDesc is the grpc.ServiceDesc for RepositoriesService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -169,6 +197,10 @@ var RepositoriesService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetPackageRepositorySummaries", Handler: _RepositoriesService_GetPackageRepositorySummaries_Handler, }, + { + MethodName: "UpdatePackageRepository", + Handler: _RepositoriesService_UpdatePackageRepository_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "kubeappsapis/core/packages/v1alpha1/repositories.proto", diff --git a/cmd/kubeapps-apis/gen/core/plugins/v1alpha1/plugins_grpc.pb.go b/cmd/kubeapps-apis/gen/core/plugins/v1alpha1/plugins_grpc.pb.go index c9f75647c0d..ed468e46510 100644 --- a/cmd/kubeapps-apis/gen/core/plugins/v1alpha1/plugins_grpc.pb.go +++ b/cmd/kubeapps-apis/gen/core/plugins/v1alpha1/plugins_grpc.pb.go @@ -1,8 +1,4 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: kubeappsapis/core/plugins/v1alpha1/plugins.proto package v1alpha1 diff --git a/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2.pb.go b/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2.pb.go index 7eeefa7e4ad..91f7b549e47 100644 --- a/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2.pb.go +++ b/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2.pb.go @@ -16,7 +16,9 @@ import ( _ "google.golang.org/genproto/googleapis/api/annotations" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" + _ "google.golang.org/protobuf/types/known/wrapperspb" reflect "reflect" + sync "sync" ) const ( @@ -26,6 +28,100 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type SetUserManagedSecretsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *SetUserManagedSecretsRequest) Reset() { + *x = SetUserManagedSecretsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetUserManagedSecretsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetUserManagedSecretsRequest) ProtoMessage() {} + +func (x *SetUserManagedSecretsRequest) ProtoReflect() protoreflect.Message { + mi := &file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetUserManagedSecretsRequest.ProtoReflect.Descriptor instead. +func (*SetUserManagedSecretsRequest) Descriptor() ([]byte, []int) { + return file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDescGZIP(), []int{0} +} + +func (x *SetUserManagedSecretsRequest) GetValue() bool { + if x != nil { + return x.Value + } + return false +} + +type SetUserManagedSecretsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Value bool `protobuf:"varint,1,opt,name=value,proto3" json:"value,omitempty"` +} + +func (x *SetUserManagedSecretsResponse) Reset() { + *x = SetUserManagedSecretsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SetUserManagedSecretsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SetUserManagedSecretsResponse) ProtoMessage() {} + +func (x *SetUserManagedSecretsResponse) ProtoReflect() protoreflect.Message { + mi := &file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SetUserManagedSecretsResponse.ProtoReflect.Descriptor instead. +func (*SetUserManagedSecretsResponse) Descriptor() ([]byte, []int) { + return file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDescGZIP(), []int{1} +} + +func (x *SetUserManagedSecretsResponse) GetValue() bool { + if x != nil { + return x.Value + } + return false +} + var File_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto protoreflect.FileDescriptor var file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDesc = []byte{ @@ -37,7 +133,9 @@ var file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDesc = [] 0x6e, 0x73, 0x2e, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x6b, 0x75, 0x62, 0x65, 0x61, + 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, + 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, + 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x32, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x36, 0x6b, @@ -50,97 +148,162 @@ var file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDesc = [] 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0xf0, 0x16, 0x0a, 0x15, 0x46, 0x6c, 0x75, 0x78, - 0x56, 0x32, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0xf0, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x34, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x55, 0x73, + 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x35, 0x0a, + 0x1d, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x53, + 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x32, 0xf0, 0x16, 0x0a, 0x15, 0x46, 0x6c, 0x75, 0x78, 0x56, 0x32, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xf0, + 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, + 0x48, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, - 0x65, 0x73, 0x12, 0x48, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, - 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x53, 0x75, 0x6d, 0x6d, - 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x49, 0x2e, 0x6b, - 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, - 0x33, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, - 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x73, 0x12, 0xe7, 0x02, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x12, 0x45, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, - 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, - 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, - 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x46, 0x2e, 0x6b, 0x75, 0x62, 0x65, + 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x49, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xba, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xb3, 0x01, 0x12, 0xb0, 0x01, 0x2f, 0x70, + 0x61, 0x67, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x73, 0x2f, 0x63, 0x2f, 0x7b, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, + 0x73, 0x12, 0xe7, 0x02, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, + 0x45, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, + 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x46, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, + 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, + 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xba, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xb3, 0x01, 0x12, 0xb0, 0x01, 0x2f, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x63, + 0x2f, 0x7b, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, + 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xf6, 0x02, 0x0a, 0x1b, + 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x47, 0x2e, 0x6b, 0x75, + 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, + 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x48, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, + 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc3, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xbc, 0x01, 0x12, 0xb9, 0x01, 0x2f, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x63, + 0x2f, 0x7b, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, + 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x73, 0x2f, 0x7b, 0x61, 0x76, 0x61, + 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, + 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3d, 0x2a, 0x2a, 0x7d, 0x2f, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xf0, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x48, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x49, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, + 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x35, 0x12, 0x33, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, + 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x70, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0xe4, 0x02, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x45, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, + 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x46, 0x2e, 0x6b, + 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb7, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xb0, 0x01, 0x12, 0xad, + 0x01, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, + 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x73, 0x2f, 0x63, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, + 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, + 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x6e, + 0x73, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, + 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, + 0x65, 0x66, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x7d, 0x12, 0xe1, + 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x42, 0x2e, 0x6b, 0x75, 0x62, 0x65, + 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, + 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x22, 0x33, 0x2f, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x3a, + 0x01, 0x2a, 0x12, 0xde, 0x02, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x42, 0x2e, + 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x43, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xba, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xb3, 0x01, + 0x1a, 0xad, 0x01, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, + 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x63, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, + 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, + 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, + 0x2f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x73, 0x2f, 0x7b, - 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, 0xf6, - 0x02, 0x0a, 0x1b, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x47, + 0x78, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x7d, + 0x3a, 0x01, 0x2a, 0x12, 0xdb, 0x02, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x42, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, - 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, - 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x48, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, - 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, - 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xc3, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xbc, 0x01, 0x12, 0xb9, 0x01, 0x2f, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, - 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x73, 0x2f, 0x63, 0x2f, 0x7b, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, - 0x78, 0x74, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x73, 0x2f, 0x7b, - 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, - 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3d, 0x2a, 0x2a, 0x7d, 0x2f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0xf0, 0x01, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x48, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, - 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x49, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x43, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x53, 0x75, 0x6d, 0x6d, - 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x35, 0x12, 0x33, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, - 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x65, 0x64, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0xe4, 0x02, 0x0a, 0x19, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x45, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, - 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x46, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb7, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xb0, - 0x01, 0x12, 0xad, 0x01, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, + 0x01, 0x2a, 0xad, 0x01, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x63, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, @@ -151,207 +314,207 @@ var file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDesc = [] 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, - 0x7d, 0x12, 0xe1, 0x01, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x42, 0x2e, 0x6b, - 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, - 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x43, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x38, 0x22, 0x33, 0x2f, - 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, - 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, - 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0xde, 0x02, 0x0a, 0x16, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x12, 0x42, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, - 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xba, 0x01, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0xb3, 0x01, 0x1a, 0xad, 0x01, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, - 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, - 0x64, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x63, 0x2f, 0x7b, 0x69, 0x6e, 0x73, - 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, - 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, - 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, - 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, - 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, - 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xdb, 0x02, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, - 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x12, 0x42, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, - 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, - 0x74, 0x65, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb7, 0x01, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0xb0, 0x01, 0x2a, 0xad, 0x01, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, - 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, - 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x65, 0x64, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x63, 0x2f, 0x7b, 0x69, 0x6e, - 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, - 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x63, 0x6c, 0x75, 0x73, - 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, - 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x7d, 0x12, 0x83, 0x03, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x73, 0x12, 0x4b, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, - 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x4c, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, + 0x7d, 0x12, 0x83, 0x03, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x52, 0x65, 0x66, 0x73, 0x12, 0x4b, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xc4, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xbd, 0x01, 0x12, 0xba, 0x01, - 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, - 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x70, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x73, 0x2f, 0x63, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, - 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, - 0x74, 0x65, 0x78, 0x74, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x73, - 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, - 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, - 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, - 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, - 0x66, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x7d, 0x2f, 0x72, 0x65, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x72, 0x65, 0x66, 0x73, 0x32, 0x86, 0x07, 0x0a, 0x19, 0x46, - 0x6c, 0x75, 0x78, 0x56, 0x32, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, - 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xd6, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, - 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x79, 0x12, 0x40, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, - 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, - 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, - 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, - 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x22, 0x2e, - 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, - 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, - 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x01, - 0x2a, 0x12, 0x9e, 0x03, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, - 0x12, 0x46, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, + 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x4c, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, + 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x52, 0x65, 0x66, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0xc4, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xbd, 0x01, 0x12, 0xba, 0x01, 0x2f, 0x70, 0x6c, + 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, + 0x2f, 0x63, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, + 0x74, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x73, 0x2f, 0x7b, 0x69, + 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 0x6c, + 0x65, 0x64, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x69, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x7d, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x72, 0x65, 0x66, 0x73, 0x32, 0xd8, 0x0b, 0x0a, 0x19, 0x46, 0x6c, 0x75, 0x78, + 0x56, 0x32, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xd6, 0x01, 0x0a, 0x14, 0x41, 0x64, 0x64, 0x50, 0x61, 0x63, + 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x40, + 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, + 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, + 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x41, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, - 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x47, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, - 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, - 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0xee, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xe7, 0x01, 0x12, 0xe4, 0x01, 0x2f, 0x70, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, - 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, - 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, - 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, - 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x63, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, - 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, - 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x73, 0x2f, 0x7b, 0x70, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, - 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, - 0x72, 0x65, 0x66, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3d, 0x2a, - 0x2a, 0x7d, 0x12, 0xee, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x69, 0x65, 0x73, 0x12, 0x49, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, - 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, - 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x4a, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, - 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, - 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x30, 0x12, 0x2e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, - 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, - 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, - 0x69, 0x65, 0x73, 0x42, 0x59, 0x5a, 0x57, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, 0x61, 0x6e, 0x7a, 0x75, 0x2f, 0x6b, - 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x6b, 0x75, 0x62, 0x65, - 0x61, 0x70, 0x70, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x6c, + 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x33, 0x22, 0x2e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, - 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x3a, 0x01, 0x2a, 0x12, 0x9e, + 0x03, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x12, 0x46, 0x2e, + 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x47, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, + 0x44, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xee, + 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xe7, 0x01, 0x12, 0xe4, 0x01, 0x2f, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, + 0x65, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, + 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, + 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x7d, 0x2f, 0x63, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, + 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x63, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x2f, 0x6e, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, + 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, + 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, + 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x3d, 0x2a, 0x2a, 0x7d, 0x12, + 0xee, 0x01, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, + 0x73, 0x12, 0x49, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x4a, 0x2e, 0x6b, + 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x36, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x30, + 0x12, 0x2e, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, + 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, + 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, + 0x12, 0x98, 0x03, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x43, 0x2e, 0x6b, + 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x72, 0x65, + 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x44, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, 0x73, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, + 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xf1, 0x01, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0xea, + 0x01, 0x1a, 0xe4, 0x01, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, + 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, + 0x65, 0x73, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, + 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, + 0x69, 0x6e, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, + 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x2e, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x2f, 0x63, 0x2f, 0x7b, 0x70, 0x61, + 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, + 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x2f, + 0x6e, 0x73, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, + 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x6e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x7d, 0x2f, 0x7b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, + 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x5f, 0x72, 0x65, 0x66, 0x2e, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x66, 0x69, 0x65, 0x72, 0x3d, 0x2a, 0x2a, 0x7d, 0x3a, 0x01, 0x2a, 0x12, 0xb4, 0x01, 0x0a, 0x15, + 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x64, 0x53, 0x65, + 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x4b, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, + 0x61, 0x70, 0x69, 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x66, 0x6c, 0x75, + 0x78, 0x76, 0x32, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, + 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x6e, + 0x61, 0x67, 0x65, 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x4c, 0x2e, 0x6b, 0x75, 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x61, 0x70, 0x69, + 0x73, 0x2e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, + 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, + 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, + 0x64, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x42, 0x59, 0x5a, 0x57, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x76, 0x6d, 0x77, 0x61, 0x72, 0x65, 0x2d, 0x74, 0x61, 0x6e, 0x7a, 0x75, 0x2f, 0x6b, 0x75, + 0x62, 0x65, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x63, 0x6d, 0x64, 0x2f, 0x6b, 0x75, 0x62, 0x65, 0x61, + 0x70, 0x70, 0x73, 0x2d, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x73, 0x2f, 0x66, 0x6c, 0x75, 0x78, 0x76, 0x32, 0x2f, 0x70, 0x61, 0x63, 0x6b, + 0x61, 0x67, 0x65, 0x73, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } +var ( + file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDescOnce sync.Once + file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDescData = file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDesc +) + +func file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDescGZIP() []byte { + file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDescOnce.Do(func() { + file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDescData = protoimpl.X.CompressGZIP(file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDescData) + }) + return file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDescData +} + +var file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_goTypes = []interface{}{ - (*v1alpha1.GetAvailablePackageSummariesRequest)(nil), // 0: kubeappsapis.core.packages.v1alpha1.GetAvailablePackageSummariesRequest - (*v1alpha1.GetAvailablePackageDetailRequest)(nil), // 1: kubeappsapis.core.packages.v1alpha1.GetAvailablePackageDetailRequest - (*v1alpha1.GetAvailablePackageVersionsRequest)(nil), // 2: kubeappsapis.core.packages.v1alpha1.GetAvailablePackageVersionsRequest - (*v1alpha1.GetInstalledPackageSummariesRequest)(nil), // 3: kubeappsapis.core.packages.v1alpha1.GetInstalledPackageSummariesRequest - (*v1alpha1.GetInstalledPackageDetailRequest)(nil), // 4: kubeappsapis.core.packages.v1alpha1.GetInstalledPackageDetailRequest - (*v1alpha1.CreateInstalledPackageRequest)(nil), // 5: kubeappsapis.core.packages.v1alpha1.CreateInstalledPackageRequest - (*v1alpha1.UpdateInstalledPackageRequest)(nil), // 6: kubeappsapis.core.packages.v1alpha1.UpdateInstalledPackageRequest - (*v1alpha1.DeleteInstalledPackageRequest)(nil), // 7: kubeappsapis.core.packages.v1alpha1.DeleteInstalledPackageRequest - (*v1alpha1.GetInstalledPackageResourceRefsRequest)(nil), // 8: kubeappsapis.core.packages.v1alpha1.GetInstalledPackageResourceRefsRequest - (*v1alpha1.AddPackageRepositoryRequest)(nil), // 9: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest - (*v1alpha1.GetPackageRepositoryDetailRequest)(nil), // 10: kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailRequest - (*v1alpha1.GetPackageRepositorySummariesRequest)(nil), // 11: kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesRequest - (*v1alpha1.GetAvailablePackageSummariesResponse)(nil), // 12: kubeappsapis.core.packages.v1alpha1.GetAvailablePackageSummariesResponse - (*v1alpha1.GetAvailablePackageDetailResponse)(nil), // 13: kubeappsapis.core.packages.v1alpha1.GetAvailablePackageDetailResponse - (*v1alpha1.GetAvailablePackageVersionsResponse)(nil), // 14: kubeappsapis.core.packages.v1alpha1.GetAvailablePackageVersionsResponse - (*v1alpha1.GetInstalledPackageSummariesResponse)(nil), // 15: kubeappsapis.core.packages.v1alpha1.GetInstalledPackageSummariesResponse - (*v1alpha1.GetInstalledPackageDetailResponse)(nil), // 16: kubeappsapis.core.packages.v1alpha1.GetInstalledPackageDetailResponse - (*v1alpha1.CreateInstalledPackageResponse)(nil), // 17: kubeappsapis.core.packages.v1alpha1.CreateInstalledPackageResponse - (*v1alpha1.UpdateInstalledPackageResponse)(nil), // 18: kubeappsapis.core.packages.v1alpha1.UpdateInstalledPackageResponse - (*v1alpha1.DeleteInstalledPackageResponse)(nil), // 19: kubeappsapis.core.packages.v1alpha1.DeleteInstalledPackageResponse - (*v1alpha1.GetInstalledPackageResourceRefsResponse)(nil), // 20: kubeappsapis.core.packages.v1alpha1.GetInstalledPackageResourceRefsResponse - (*v1alpha1.AddPackageRepositoryResponse)(nil), // 21: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryResponse - (*v1alpha1.GetPackageRepositoryDetailResponse)(nil), // 22: kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailResponse - (*v1alpha1.GetPackageRepositorySummariesResponse)(nil), // 23: kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesResponse + (*SetUserManagedSecretsRequest)(nil), // 0: kubeappsapis.plugins.fluxv2.packages.v1alpha1.SetUserManagedSecretsRequest + (*SetUserManagedSecretsResponse)(nil), // 1: kubeappsapis.plugins.fluxv2.packages.v1alpha1.SetUserManagedSecretsResponse + (*v1alpha1.GetAvailablePackageSummariesRequest)(nil), // 2: kubeappsapis.core.packages.v1alpha1.GetAvailablePackageSummariesRequest + (*v1alpha1.GetAvailablePackageDetailRequest)(nil), // 3: kubeappsapis.core.packages.v1alpha1.GetAvailablePackageDetailRequest + (*v1alpha1.GetAvailablePackageVersionsRequest)(nil), // 4: kubeappsapis.core.packages.v1alpha1.GetAvailablePackageVersionsRequest + (*v1alpha1.GetInstalledPackageSummariesRequest)(nil), // 5: kubeappsapis.core.packages.v1alpha1.GetInstalledPackageSummariesRequest + (*v1alpha1.GetInstalledPackageDetailRequest)(nil), // 6: kubeappsapis.core.packages.v1alpha1.GetInstalledPackageDetailRequest + (*v1alpha1.CreateInstalledPackageRequest)(nil), // 7: kubeappsapis.core.packages.v1alpha1.CreateInstalledPackageRequest + (*v1alpha1.UpdateInstalledPackageRequest)(nil), // 8: kubeappsapis.core.packages.v1alpha1.UpdateInstalledPackageRequest + (*v1alpha1.DeleteInstalledPackageRequest)(nil), // 9: kubeappsapis.core.packages.v1alpha1.DeleteInstalledPackageRequest + (*v1alpha1.GetInstalledPackageResourceRefsRequest)(nil), // 10: kubeappsapis.core.packages.v1alpha1.GetInstalledPackageResourceRefsRequest + (*v1alpha1.AddPackageRepositoryRequest)(nil), // 11: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest + (*v1alpha1.GetPackageRepositoryDetailRequest)(nil), // 12: kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailRequest + (*v1alpha1.GetPackageRepositorySummariesRequest)(nil), // 13: kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesRequest + (*v1alpha1.UpdatePackageRepositoryRequest)(nil), // 14: kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryRequest + (*v1alpha1.GetAvailablePackageSummariesResponse)(nil), // 15: kubeappsapis.core.packages.v1alpha1.GetAvailablePackageSummariesResponse + (*v1alpha1.GetAvailablePackageDetailResponse)(nil), // 16: kubeappsapis.core.packages.v1alpha1.GetAvailablePackageDetailResponse + (*v1alpha1.GetAvailablePackageVersionsResponse)(nil), // 17: kubeappsapis.core.packages.v1alpha1.GetAvailablePackageVersionsResponse + (*v1alpha1.GetInstalledPackageSummariesResponse)(nil), // 18: kubeappsapis.core.packages.v1alpha1.GetInstalledPackageSummariesResponse + (*v1alpha1.GetInstalledPackageDetailResponse)(nil), // 19: kubeappsapis.core.packages.v1alpha1.GetInstalledPackageDetailResponse + (*v1alpha1.CreateInstalledPackageResponse)(nil), // 20: kubeappsapis.core.packages.v1alpha1.CreateInstalledPackageResponse + (*v1alpha1.UpdateInstalledPackageResponse)(nil), // 21: kubeappsapis.core.packages.v1alpha1.UpdateInstalledPackageResponse + (*v1alpha1.DeleteInstalledPackageResponse)(nil), // 22: kubeappsapis.core.packages.v1alpha1.DeleteInstalledPackageResponse + (*v1alpha1.GetInstalledPackageResourceRefsResponse)(nil), // 23: kubeappsapis.core.packages.v1alpha1.GetInstalledPackageResourceRefsResponse + (*v1alpha1.AddPackageRepositoryResponse)(nil), // 24: kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryResponse + (*v1alpha1.GetPackageRepositoryDetailResponse)(nil), // 25: kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailResponse + (*v1alpha1.GetPackageRepositorySummariesResponse)(nil), // 26: kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesResponse + (*v1alpha1.UpdatePackageRepositoryResponse)(nil), // 27: kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryResponse } var file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_depIdxs = []int32{ - 0, // 0: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetAvailablePackageSummaries:input_type -> kubeappsapis.core.packages.v1alpha1.GetAvailablePackageSummariesRequest - 1, // 1: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetAvailablePackageDetail:input_type -> kubeappsapis.core.packages.v1alpha1.GetAvailablePackageDetailRequest - 2, // 2: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetAvailablePackageVersions:input_type -> kubeappsapis.core.packages.v1alpha1.GetAvailablePackageVersionsRequest - 3, // 3: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetInstalledPackageSummaries:input_type -> kubeappsapis.core.packages.v1alpha1.GetInstalledPackageSummariesRequest - 4, // 4: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetInstalledPackageDetail:input_type -> kubeappsapis.core.packages.v1alpha1.GetInstalledPackageDetailRequest - 5, // 5: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.CreateInstalledPackage:input_type -> kubeappsapis.core.packages.v1alpha1.CreateInstalledPackageRequest - 6, // 6: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.UpdateInstalledPackage:input_type -> kubeappsapis.core.packages.v1alpha1.UpdateInstalledPackageRequest - 7, // 7: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.DeleteInstalledPackage:input_type -> kubeappsapis.core.packages.v1alpha1.DeleteInstalledPackageRequest - 8, // 8: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetInstalledPackageResourceRefs:input_type -> kubeappsapis.core.packages.v1alpha1.GetInstalledPackageResourceRefsRequest - 9, // 9: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.AddPackageRepository:input_type -> kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest - 10, // 10: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.GetPackageRepositoryDetail:input_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailRequest - 11, // 11: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.GetPackageRepositorySummaries:input_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesRequest - 12, // 12: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetAvailablePackageSummaries:output_type -> kubeappsapis.core.packages.v1alpha1.GetAvailablePackageSummariesResponse - 13, // 13: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetAvailablePackageDetail:output_type -> kubeappsapis.core.packages.v1alpha1.GetAvailablePackageDetailResponse - 14, // 14: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetAvailablePackageVersions:output_type -> kubeappsapis.core.packages.v1alpha1.GetAvailablePackageVersionsResponse - 15, // 15: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetInstalledPackageSummaries:output_type -> kubeappsapis.core.packages.v1alpha1.GetInstalledPackageSummariesResponse - 16, // 16: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetInstalledPackageDetail:output_type -> kubeappsapis.core.packages.v1alpha1.GetInstalledPackageDetailResponse - 17, // 17: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.CreateInstalledPackage:output_type -> kubeappsapis.core.packages.v1alpha1.CreateInstalledPackageResponse - 18, // 18: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.UpdateInstalledPackage:output_type -> kubeappsapis.core.packages.v1alpha1.UpdateInstalledPackageResponse - 19, // 19: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.DeleteInstalledPackage:output_type -> kubeappsapis.core.packages.v1alpha1.DeleteInstalledPackageResponse - 20, // 20: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetInstalledPackageResourceRefs:output_type -> kubeappsapis.core.packages.v1alpha1.GetInstalledPackageResourceRefsResponse - 21, // 21: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.AddPackageRepository:output_type -> kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryResponse - 22, // 22: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.GetPackageRepositoryDetail:output_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailResponse - 23, // 23: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.GetPackageRepositorySummaries:output_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesResponse - 12, // [12:24] is the sub-list for method output_type - 0, // [0:12] is the sub-list for method input_type + 2, // 0: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetAvailablePackageSummaries:input_type -> kubeappsapis.core.packages.v1alpha1.GetAvailablePackageSummariesRequest + 3, // 1: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetAvailablePackageDetail:input_type -> kubeappsapis.core.packages.v1alpha1.GetAvailablePackageDetailRequest + 4, // 2: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetAvailablePackageVersions:input_type -> kubeappsapis.core.packages.v1alpha1.GetAvailablePackageVersionsRequest + 5, // 3: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetInstalledPackageSummaries:input_type -> kubeappsapis.core.packages.v1alpha1.GetInstalledPackageSummariesRequest + 6, // 4: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetInstalledPackageDetail:input_type -> kubeappsapis.core.packages.v1alpha1.GetInstalledPackageDetailRequest + 7, // 5: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.CreateInstalledPackage:input_type -> kubeappsapis.core.packages.v1alpha1.CreateInstalledPackageRequest + 8, // 6: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.UpdateInstalledPackage:input_type -> kubeappsapis.core.packages.v1alpha1.UpdateInstalledPackageRequest + 9, // 7: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.DeleteInstalledPackage:input_type -> kubeappsapis.core.packages.v1alpha1.DeleteInstalledPackageRequest + 10, // 8: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetInstalledPackageResourceRefs:input_type -> kubeappsapis.core.packages.v1alpha1.GetInstalledPackageResourceRefsRequest + 11, // 9: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.AddPackageRepository:input_type -> kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryRequest + 12, // 10: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.GetPackageRepositoryDetail:input_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailRequest + 13, // 11: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.GetPackageRepositorySummaries:input_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesRequest + 14, // 12: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.UpdatePackageRepository:input_type -> kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryRequest + 0, // 13: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.SetUserManagedSecrets:input_type -> kubeappsapis.plugins.fluxv2.packages.v1alpha1.SetUserManagedSecretsRequest + 15, // 14: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetAvailablePackageSummaries:output_type -> kubeappsapis.core.packages.v1alpha1.GetAvailablePackageSummariesResponse + 16, // 15: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetAvailablePackageDetail:output_type -> kubeappsapis.core.packages.v1alpha1.GetAvailablePackageDetailResponse + 17, // 16: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetAvailablePackageVersions:output_type -> kubeappsapis.core.packages.v1alpha1.GetAvailablePackageVersionsResponse + 18, // 17: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetInstalledPackageSummaries:output_type -> kubeappsapis.core.packages.v1alpha1.GetInstalledPackageSummariesResponse + 19, // 18: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetInstalledPackageDetail:output_type -> kubeappsapis.core.packages.v1alpha1.GetInstalledPackageDetailResponse + 20, // 19: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.CreateInstalledPackage:output_type -> kubeappsapis.core.packages.v1alpha1.CreateInstalledPackageResponse + 21, // 20: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.UpdateInstalledPackage:output_type -> kubeappsapis.core.packages.v1alpha1.UpdateInstalledPackageResponse + 22, // 21: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.DeleteInstalledPackage:output_type -> kubeappsapis.core.packages.v1alpha1.DeleteInstalledPackageResponse + 23, // 22: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService.GetInstalledPackageResourceRefs:output_type -> kubeappsapis.core.packages.v1alpha1.GetInstalledPackageResourceRefsResponse + 24, // 23: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.AddPackageRepository:output_type -> kubeappsapis.core.packages.v1alpha1.AddPackageRepositoryResponse + 25, // 24: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.GetPackageRepositoryDetail:output_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositoryDetailResponse + 26, // 25: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.GetPackageRepositorySummaries:output_type -> kubeappsapis.core.packages.v1alpha1.GetPackageRepositorySummariesResponse + 27, // 26: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.UpdatePackageRepository:output_type -> kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryResponse + 1, // 27: kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService.SetUserManagedSecrets:output_type -> kubeappsapis.plugins.fluxv2.packages.v1alpha1.SetUserManagedSecretsResponse + 14, // [14:28] is the sub-list for method output_type + 0, // [0:14] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name 0, // [0:0] is the sub-list for extension extendee 0, // [0:0] is the sub-list for field type_name @@ -362,18 +525,45 @@ func file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_init() { if File_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto != nil { return } + if !protoimpl.UnsafeEnabled { + file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetUserManagedSecretsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SetUserManagedSecretsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDesc, NumEnums: 0, - NumMessages: 0, + NumMessages: 2, NumExtensions: 0, NumServices: 2, }, GoTypes: file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_goTypes, DependencyIndexes: file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_depIdxs, + MessageInfos: file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_msgTypes, }.Build() File_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto = out.File file_kubeappsapis_plugins_fluxv2_packages_v1alpha1_fluxv2_proto_rawDesc = nil diff --git a/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2.pb.gw.go b/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2.pb.gw.go index 6bd45b24219..722025f96a7 100644 --- a/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2.pb.gw.go +++ b/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2.pb.gw.go @@ -1016,6 +1016,154 @@ func local_request_FluxV2RepositoriesService_GetPackageRepositorySummaries_0(ctx } +func request_FluxV2RepositoriesService_UpdatePackageRepository_0(ctx context.Context, marshaler runtime.Marshaler, client FluxV2RepositoriesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1alpha1_1.UpdatePackageRepositoryRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["package_repo_ref.plugin.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.plugin.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.plugin.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.plugin.name", err) + } + + val, ok = pathParams["package_repo_ref.plugin.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.plugin.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.plugin.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.plugin.version", err) + } + + val, ok = pathParams["package_repo_ref.context.cluster"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.context.cluster") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.context.cluster", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.context.cluster", err) + } + + val, ok = pathParams["package_repo_ref.context.namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.context.namespace") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.context.namespace", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.context.namespace", err) + } + + val, ok = pathParams["package_repo_ref.identifier"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.identifier") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.identifier", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.identifier", err) + } + + msg, err := client.UpdatePackageRepository(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_FluxV2RepositoriesService_UpdatePackageRepository_0(ctx context.Context, marshaler runtime.Marshaler, server FluxV2RepositoriesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq v1alpha1_1.UpdatePackageRepositoryRequest + var metadata runtime.ServerMetadata + + newReader, berr := utilities.IOReaderFactory(req.Body) + if berr != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", berr) + } + if err := marshaler.NewDecoder(newReader()).Decode(&protoReq); err != nil && err != io.EOF { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["package_repo_ref.plugin.name"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.plugin.name") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.plugin.name", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.plugin.name", err) + } + + val, ok = pathParams["package_repo_ref.plugin.version"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.plugin.version") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.plugin.version", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.plugin.version", err) + } + + val, ok = pathParams["package_repo_ref.context.cluster"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.context.cluster") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.context.cluster", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.context.cluster", err) + } + + val, ok = pathParams["package_repo_ref.context.namespace"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.context.namespace") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.context.namespace", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.context.namespace", err) + } + + val, ok = pathParams["package_repo_ref.identifier"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "package_repo_ref.identifier") + } + + err = runtime.PopulateFieldFromPath(&protoReq, "package_repo_ref.identifier", val) + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "package_repo_ref.identifier", err) + } + + msg, err := server.UpdatePackageRepository(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterFluxV2PackagesServiceHandlerServer registers the http handlers for service FluxV2PackagesService to "mux". // UnaryRPC :call FluxV2PackagesServiceServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -1307,6 +1455,29 @@ func RegisterFluxV2RepositoriesServiceHandlerServer(ctx context.Context, mux *ru }) + mux.Handle("PUT", pattern_FluxV2RepositoriesService_UpdatePackageRepository_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService/UpdatePackageRepository", runtime.WithHTTPPathPattern("/plugins/fluxv2/packages/v1alpha1/repositories/plugin/{package_repo_ref.plugin.name}/{package_repo_ref.plugin.version}/c/{package_repo_ref.context.cluster}/ns/{package_repo_ref.context.namespace}/{package_repo_ref.identifier=**}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_FluxV2RepositoriesService_UpdatePackageRepository_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_FluxV2RepositoriesService_UpdatePackageRepository_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1669,6 +1840,26 @@ func RegisterFluxV2RepositoriesServiceHandlerClient(ctx context.Context, mux *ru }) + mux.Handle("PUT", pattern_FluxV2RepositoriesService_UpdatePackageRepository_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService/UpdatePackageRepository", runtime.WithHTTPPathPattern("/plugins/fluxv2/packages/v1alpha1/repositories/plugin/{package_repo_ref.plugin.name}/{package_repo_ref.plugin.version}/c/{package_repo_ref.context.cluster}/ns/{package_repo_ref.context.namespace}/{package_repo_ref.identifier=**}")) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_FluxV2RepositoriesService_UpdatePackageRepository_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_FluxV2RepositoriesService_UpdatePackageRepository_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -1678,6 +1869,8 @@ var ( pattern_FluxV2RepositoriesService_GetPackageRepositoryDetail_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10, 1, 0, 4, 1, 5, 11, 3, 0, 4, 1, 5, 12}, []string{"plugins", "fluxv2", "packages", "v1alpha1", "repositories", "plugin", "package_repo_ref.plugin.name", "package_repo_ref.plugin.version", "c", "package_repo_ref.context.cluster", "ns", "package_repo_ref.context.namespace", "package_repo_ref.identifier"}, "")) pattern_FluxV2RepositoriesService_GetPackageRepositorySummaries_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"plugins", "fluxv2", "packages", "v1alpha1", "repositories"}, "")) + + pattern_FluxV2RepositoriesService_UpdatePackageRepository_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5, 1, 0, 4, 1, 5, 6, 1, 0, 4, 1, 5, 7, 2, 8, 1, 0, 4, 1, 5, 9, 2, 10, 1, 0, 4, 1, 5, 11, 3, 0, 4, 1, 5, 12}, []string{"plugins", "fluxv2", "packages", "v1alpha1", "repositories", "plugin", "package_repo_ref.plugin.name", "package_repo_ref.plugin.version", "c", "package_repo_ref.context.cluster", "ns", "package_repo_ref.context.namespace", "package_repo_ref.identifier"}, "")) ) var ( @@ -1686,4 +1879,6 @@ var ( forward_FluxV2RepositoriesService_GetPackageRepositoryDetail_0 = runtime.ForwardResponseMessage forward_FluxV2RepositoriesService_GetPackageRepositorySummaries_0 = runtime.ForwardResponseMessage + + forward_FluxV2RepositoriesService_UpdatePackageRepository_0 = runtime.ForwardResponseMessage ) diff --git a/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2_grpc.pb.go b/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2_grpc.pb.go index d2992a3ac2f..9066304ebe1 100644 --- a/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2_grpc.pb.go +++ b/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1/fluxv2_grpc.pb.go @@ -1,8 +1,4 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.proto package v1alpha1 @@ -420,6 +416,9 @@ type FluxV2RepositoriesServiceClient interface { AddPackageRepository(ctx context.Context, in *v1alpha1.AddPackageRepositoryRequest, opts ...grpc.CallOption) (*v1alpha1.AddPackageRepositoryResponse, error) GetPackageRepositoryDetail(ctx context.Context, in *v1alpha1.GetPackageRepositoryDetailRequest, opts ...grpc.CallOption) (*v1alpha1.GetPackageRepositoryDetailResponse, error) GetPackageRepositorySummaries(ctx context.Context, in *v1alpha1.GetPackageRepositorySummariesRequest, opts ...grpc.CallOption) (*v1alpha1.GetPackageRepositorySummariesResponse, error) + UpdatePackageRepository(ctx context.Context, in *v1alpha1.UpdatePackageRepositoryRequest, opts ...grpc.CallOption) (*v1alpha1.UpdatePackageRepositoryResponse, error) + // this endpoint only exists for the purpose of integration tests + SetUserManagedSecrets(ctx context.Context, in *SetUserManagedSecretsRequest, opts ...grpc.CallOption) (*SetUserManagedSecretsResponse, error) } type fluxV2RepositoriesServiceClient struct { @@ -457,6 +456,24 @@ func (c *fluxV2RepositoriesServiceClient) GetPackageRepositorySummaries(ctx cont return out, nil } +func (c *fluxV2RepositoriesServiceClient) UpdatePackageRepository(ctx context.Context, in *v1alpha1.UpdatePackageRepositoryRequest, opts ...grpc.CallOption) (*v1alpha1.UpdatePackageRepositoryResponse, error) { + out := new(v1alpha1.UpdatePackageRepositoryResponse) + err := c.cc.Invoke(ctx, "/kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService/UpdatePackageRepository", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *fluxV2RepositoriesServiceClient) SetUserManagedSecrets(ctx context.Context, in *SetUserManagedSecretsRequest, opts ...grpc.CallOption) (*SetUserManagedSecretsResponse, error) { + out := new(SetUserManagedSecretsResponse) + err := c.cc.Invoke(ctx, "/kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService/SetUserManagedSecrets", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // FluxV2RepositoriesServiceServer is the server API for FluxV2RepositoriesService service. // All implementations should embed UnimplementedFluxV2RepositoriesServiceServer // for forward compatibility @@ -466,6 +483,9 @@ type FluxV2RepositoriesServiceServer interface { AddPackageRepository(context.Context, *v1alpha1.AddPackageRepositoryRequest) (*v1alpha1.AddPackageRepositoryResponse, error) GetPackageRepositoryDetail(context.Context, *v1alpha1.GetPackageRepositoryDetailRequest) (*v1alpha1.GetPackageRepositoryDetailResponse, error) GetPackageRepositorySummaries(context.Context, *v1alpha1.GetPackageRepositorySummariesRequest) (*v1alpha1.GetPackageRepositorySummariesResponse, error) + UpdatePackageRepository(context.Context, *v1alpha1.UpdatePackageRepositoryRequest) (*v1alpha1.UpdatePackageRepositoryResponse, error) + // this endpoint only exists for the purpose of integration tests + SetUserManagedSecrets(context.Context, *SetUserManagedSecretsRequest) (*SetUserManagedSecretsResponse, error) } // UnimplementedFluxV2RepositoriesServiceServer should be embedded to have forward compatible implementations. @@ -481,6 +501,12 @@ func (UnimplementedFluxV2RepositoriesServiceServer) GetPackageRepositoryDetail(c func (UnimplementedFluxV2RepositoriesServiceServer) GetPackageRepositorySummaries(context.Context, *v1alpha1.GetPackageRepositorySummariesRequest) (*v1alpha1.GetPackageRepositorySummariesResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPackageRepositorySummaries not implemented") } +func (UnimplementedFluxV2RepositoriesServiceServer) UpdatePackageRepository(context.Context, *v1alpha1.UpdatePackageRepositoryRequest) (*v1alpha1.UpdatePackageRepositoryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdatePackageRepository not implemented") +} +func (UnimplementedFluxV2RepositoriesServiceServer) SetUserManagedSecrets(context.Context, *SetUserManagedSecretsRequest) (*SetUserManagedSecretsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SetUserManagedSecrets not implemented") +} // UnsafeFluxV2RepositoriesServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to FluxV2RepositoriesServiceServer will @@ -547,6 +573,42 @@ func _FluxV2RepositoriesService_GetPackageRepositorySummaries_Handler(srv interf return interceptor(ctx, in, info, handler) } +func _FluxV2RepositoriesService_UpdatePackageRepository_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(v1alpha1.UpdatePackageRepositoryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FluxV2RepositoriesServiceServer).UpdatePackageRepository(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService/UpdatePackageRepository", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FluxV2RepositoriesServiceServer).UpdatePackageRepository(ctx, req.(*v1alpha1.UpdatePackageRepositoryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _FluxV2RepositoriesService_SetUserManagedSecrets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetUserManagedSecretsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(FluxV2RepositoriesServiceServer).SetUserManagedSecrets(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService/SetUserManagedSecrets", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(FluxV2RepositoriesServiceServer).SetUserManagedSecrets(ctx, req.(*SetUserManagedSecretsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // FluxV2RepositoriesService_ServiceDesc is the grpc.ServiceDesc for FluxV2RepositoriesService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -566,6 +628,14 @@ var FluxV2RepositoriesService_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetPackageRepositorySummaries", Handler: _FluxV2RepositoriesService_GetPackageRepositorySummaries_Handler, }, + { + MethodName: "UpdatePackageRepository", + Handler: _FluxV2RepositoriesService_UpdatePackageRepository_Handler, + }, + { + MethodName: "SetUserManagedSecrets", + Handler: _FluxV2RepositoriesService_SetUserManagedSecrets_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.proto", diff --git a/cmd/kubeapps-apis/gen/plugins/helm/packages/v1alpha1/helm.pb.gw.go b/cmd/kubeapps-apis/gen/plugins/helm/packages/v1alpha1/helm.pb.gw.go index ded856ae3ba..1f799c25748 100644 --- a/cmd/kubeapps-apis/gen/plugins/helm/packages/v1alpha1/helm.pb.gw.go +++ b/cmd/kubeapps-apis/gen/plugins/helm/packages/v1alpha1/helm.pb.gw.go @@ -15,7 +15,7 @@ import ( "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" - v1alpha1_0 "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" + "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" @@ -37,7 +37,7 @@ var ( ) func request_HelmPackagesService_GetAvailablePackageSummaries_0(ctx context.Context, marshaler runtime.Marshaler, client HelmPackagesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.GetAvailablePackageSummariesRequest + var protoReq v1alpha1.GetAvailablePackageSummariesRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { @@ -53,7 +53,7 @@ func request_HelmPackagesService_GetAvailablePackageSummaries_0(ctx context.Cont } func local_request_HelmPackagesService_GetAvailablePackageSummaries_0(ctx context.Context, marshaler runtime.Marshaler, server HelmPackagesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.GetAvailablePackageSummariesRequest + var protoReq v1alpha1.GetAvailablePackageSummariesRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { @@ -73,7 +73,7 @@ var ( ) func request_HelmPackagesService_GetAvailablePackageDetail_0(ctx context.Context, marshaler runtime.Marshaler, client HelmPackagesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.GetAvailablePackageDetailRequest + var protoReq v1alpha1.GetAvailablePackageDetailRequest var metadata runtime.ServerMetadata var ( @@ -126,7 +126,7 @@ func request_HelmPackagesService_GetAvailablePackageDetail_0(ctx context.Context } func local_request_HelmPackagesService_GetAvailablePackageDetail_0(ctx context.Context, marshaler runtime.Marshaler, server HelmPackagesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.GetAvailablePackageDetailRequest + var protoReq v1alpha1.GetAvailablePackageDetailRequest var metadata runtime.ServerMetadata var ( @@ -183,7 +183,7 @@ var ( ) func request_HelmPackagesService_GetAvailablePackageVersions_0(ctx context.Context, marshaler runtime.Marshaler, client HelmPackagesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.GetAvailablePackageVersionsRequest + var protoReq v1alpha1.GetAvailablePackageVersionsRequest var metadata runtime.ServerMetadata var ( @@ -236,7 +236,7 @@ func request_HelmPackagesService_GetAvailablePackageVersions_0(ctx context.Conte } func local_request_HelmPackagesService_GetAvailablePackageVersions_0(ctx context.Context, marshaler runtime.Marshaler, server HelmPackagesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.GetAvailablePackageVersionsRequest + var protoReq v1alpha1.GetAvailablePackageVersionsRequest var metadata runtime.ServerMetadata var ( @@ -293,7 +293,7 @@ var ( ) func request_HelmPackagesService_GetInstalledPackageSummaries_0(ctx context.Context, marshaler runtime.Marshaler, client HelmPackagesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.GetInstalledPackageSummariesRequest + var protoReq v1alpha1.GetInstalledPackageSummariesRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { @@ -309,7 +309,7 @@ func request_HelmPackagesService_GetInstalledPackageSummaries_0(ctx context.Cont } func local_request_HelmPackagesService_GetInstalledPackageSummaries_0(ctx context.Context, marshaler runtime.Marshaler, server HelmPackagesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.GetInstalledPackageSummariesRequest + var protoReq v1alpha1.GetInstalledPackageSummariesRequest var metadata runtime.ServerMetadata if err := req.ParseForm(); err != nil { @@ -329,7 +329,7 @@ var ( ) func request_HelmPackagesService_GetInstalledPackageDetail_0(ctx context.Context, marshaler runtime.Marshaler, client HelmPackagesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.GetInstalledPackageDetailRequest + var protoReq v1alpha1.GetInstalledPackageDetailRequest var metadata runtime.ServerMetadata var ( @@ -382,7 +382,7 @@ func request_HelmPackagesService_GetInstalledPackageDetail_0(ctx context.Context } func local_request_HelmPackagesService_GetInstalledPackageDetail_0(ctx context.Context, marshaler runtime.Marshaler, server HelmPackagesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.GetInstalledPackageDetailRequest + var protoReq v1alpha1.GetInstalledPackageDetailRequest var metadata runtime.ServerMetadata var ( @@ -435,7 +435,7 @@ func local_request_HelmPackagesService_GetInstalledPackageDetail_0(ctx context.C } func request_HelmPackagesService_CreateInstalledPackage_0(ctx context.Context, marshaler runtime.Marshaler, client HelmPackagesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.CreateInstalledPackageRequest + var protoReq v1alpha1.CreateInstalledPackageRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -452,7 +452,7 @@ func request_HelmPackagesService_CreateInstalledPackage_0(ctx context.Context, m } func local_request_HelmPackagesService_CreateInstalledPackage_0(ctx context.Context, marshaler runtime.Marshaler, server HelmPackagesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.CreateInstalledPackageRequest + var protoReq v1alpha1.CreateInstalledPackageRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -469,7 +469,7 @@ func local_request_HelmPackagesService_CreateInstalledPackage_0(ctx context.Cont } func request_HelmPackagesService_UpdateInstalledPackage_0(ctx context.Context, marshaler runtime.Marshaler, client HelmPackagesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.UpdateInstalledPackageRequest + var protoReq v1alpha1.UpdateInstalledPackageRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -523,7 +523,7 @@ func request_HelmPackagesService_UpdateInstalledPackage_0(ctx context.Context, m } func local_request_HelmPackagesService_UpdateInstalledPackage_0(ctx context.Context, marshaler runtime.Marshaler, server HelmPackagesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.UpdateInstalledPackageRequest + var protoReq v1alpha1.UpdateInstalledPackageRequest var metadata runtime.ServerMetadata newReader, berr := utilities.IOReaderFactory(req.Body) @@ -581,7 +581,7 @@ var ( ) func request_HelmPackagesService_DeleteInstalledPackage_0(ctx context.Context, marshaler runtime.Marshaler, client HelmPackagesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.DeleteInstalledPackageRequest + var protoReq v1alpha1.DeleteInstalledPackageRequest var metadata runtime.ServerMetadata var ( @@ -634,7 +634,7 @@ func request_HelmPackagesService_DeleteInstalledPackage_0(ctx context.Context, m } func local_request_HelmPackagesService_DeleteInstalledPackage_0(ctx context.Context, marshaler runtime.Marshaler, server HelmPackagesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.DeleteInstalledPackageRequest + var protoReq v1alpha1.DeleteInstalledPackageRequest var metadata runtime.ServerMetadata var ( @@ -799,7 +799,7 @@ var ( ) func request_HelmPackagesService_GetInstalledPackageResourceRefs_0(ctx context.Context, marshaler runtime.Marshaler, client HelmPackagesServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.GetInstalledPackageResourceRefsRequest + var protoReq v1alpha1.GetInstalledPackageResourceRefsRequest var metadata runtime.ServerMetadata var ( @@ -852,7 +852,7 @@ func request_HelmPackagesService_GetInstalledPackageResourceRefs_0(ctx context.C } func local_request_HelmPackagesService_GetInstalledPackageResourceRefs_0(ctx context.Context, marshaler runtime.Marshaler, server HelmPackagesServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq v1alpha1_0.GetInstalledPackageResourceRefsRequest + var protoReq v1alpha1.GetInstalledPackageResourceRefsRequest var metadata runtime.ServerMetadata var ( diff --git a/cmd/kubeapps-apis/gen/plugins/helm/packages/v1alpha1/helm_grpc.pb.go b/cmd/kubeapps-apis/gen/plugins/helm/packages/v1alpha1/helm_grpc.pb.go index 61c8df4d6de..692335917f6 100644 --- a/cmd/kubeapps-apis/gen/plugins/helm/packages/v1alpha1/helm_grpc.pb.go +++ b/cmd/kubeapps-apis/gen/plugins/helm/packages/v1alpha1/helm_grpc.pb.go @@ -1,8 +1,4 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: kubeappsapis/plugins/helm/packages/v1alpha1/helm.proto package v1alpha1 diff --git a/cmd/kubeapps-apis/gen/plugins/kapp_controller/packages/v1alpha1/kapp_controller_grpc.pb.go b/cmd/kubeapps-apis/gen/plugins/kapp_controller/packages/v1alpha1/kapp_controller_grpc.pb.go index 546b885a4ed..ea49b2f0d89 100644 --- a/cmd/kubeapps-apis/gen/plugins/kapp_controller/packages/v1alpha1/kapp_controller_grpc.pb.go +++ b/cmd/kubeapps-apis/gen/plugins/kapp_controller/packages/v1alpha1/kapp_controller_grpc.pb.go @@ -1,8 +1,4 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: kubeappsapis/plugins/kapp_controller/packages/v1alpha1/kapp_controller.proto package v1alpha1 diff --git a/cmd/kubeapps-apis/gen/plugins/resources/v1alpha1/resources_grpc.pb.go b/cmd/kubeapps-apis/gen/plugins/resources/v1alpha1/resources_grpc.pb.go index ddc3ddad1bb..ee4cc9a791d 100644 --- a/cmd/kubeapps-apis/gen/plugins/resources/v1alpha1/resources_grpc.pb.go +++ b/cmd/kubeapps-apis/gen/plugins/resources/v1alpha1/resources_grpc.pb.go @@ -1,8 +1,4 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc (unknown) -// source: kubeappsapis/plugins/resources/v1alpha1/resources.proto package v1alpha1 diff --git a/cmd/kubeapps-apis/plugin_test/mock_plugin.go b/cmd/kubeapps-apis/plugin_test/mock_plugin.go index 200f9dd4502..acd607acf63 100644 --- a/cmd/kubeapps-apis/plugin_test/mock_plugin.go +++ b/cmd/kubeapps-apis/plugin_test/mock_plugin.go @@ -174,3 +174,16 @@ func (s TestRepositoriesPluginServer) GetPackageRepositorySummaries(ctx context. PackageRepositorySummaries: s.PackageRepositorySummaries, }, nil } + +func (s TestRepositoriesPluginServer) UpdatePackageRepository(ctx context.Context, request *corev1.UpdatePackageRepositoryRequest) (*corev1.UpdatePackageRepositoryResponse, error) { + if s.Status != codes.OK { + return nil, status.Errorf(s.Status, "Non-OK response") + } + return &corev1.UpdatePackageRepositoryResponse{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Context: request.GetPackageRepoRef().GetContext(), + Identifier: request.GetPackageRepoRef().GetIdentifier(), + Plugin: s.Plugin, + }, + }, nil +} diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_test.go index 2e9d8f2346b..e066a0d3914 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_test.go @@ -181,7 +181,7 @@ func TestGetAvailablePackageDetail(t *testing.T) { } defer ts2.Close() - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, secretObjs) + s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, secretObjs, false) if err != nil { t.Fatalf("%+v", err) } @@ -276,7 +276,7 @@ func TestTransientHttpFailuresAreRetriedForChartCache(t *testing.T) { } defer ts2.Close() - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil) + s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil, false) if err != nil { t.Fatalf("%+v", err) } @@ -342,7 +342,7 @@ func TestNegativeGetAvailablePackageDetail(t *testing.T) { // I don't need any repos/charts to test these scenarios for _, tc := range negativeTestCases { t.Run(tc.testName, func(t *testing.T) { - s, mock, err := newServerWithRepos(t, nil, nil, nil) + s, mock, err := newSimpleServerWithRepos(t, nil) if err != nil { t.Fatalf("%+v", err) } @@ -447,7 +447,7 @@ func TestNonExistingRepoOrInvalidPkgVersionGetAvailablePackageDetail(t *testing. } defer ts2.Close() - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil) + s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil, false) if err != nil { t.Fatalf("%+v", err) } @@ -533,7 +533,7 @@ func TestNegativeGetAvailablePackageVersions(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - s, mock, err := newServerWithRepos(t, nil, nil, nil) + s, mock, err := newSimpleServerWithRepos(t, nil) if err != nil { t.Fatalf("%+v", err) } @@ -626,7 +626,7 @@ func TestGetAvailablePackageVersions(t *testing.T) { } defer ts.Close() - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil) + s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil, false) if err != nil { t.Fatalf("%+v", err) } @@ -676,7 +676,7 @@ func TestChartCacheResyncNotIdle(t *testing.T) { // start with an empty server that only has an empty repo cache // passing in []testSpecChartWithUrl{} instead of nil will add support for chart cache - s, mock, err := newServerWithRepos(t, nil, []testSpecChartWithUrl{}, nil) + s, mock, err := newServerWithRepos(t, nil, []testSpecChartWithUrl{}, nil, false) if err != nil { t.Fatalf("error instantiating the server: %v", err) } @@ -899,7 +899,7 @@ func TestChartWithRelativeURL(t *testing.T) { chartUrl: ts.URL + "/charts/airflow-1.0.0.tgz", repoNamespace: repoNamespace, }, - }, nil) + }, nil, false) if err != nil { t.Fatal(err) } diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/common/utils.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/common/utils.go index a52a0d7df2f..869adc7453f 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/common/utils.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/common/utils.go @@ -20,6 +20,7 @@ import ( helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" "github.com/go-redis/redis/v8" + corev1 "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" plugins "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/gen/core/plugins/v1alpha1" "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/plugins/pkg/pkgutils" httpclient "github.com/vmware-tanzu/kubeapps/pkg/http-client" @@ -48,11 +49,10 @@ var ( pluginDetail plugins.Plugin // This version var is updated during the build (see the -ldflags option // in the cmd/kubeapps-apis/Dockerfile) - version = "devel" - DefaultPluginConfig FluxPluginConfig - repositoriesGvr schema.GroupVersionResource - chartsGvr schema.GroupVersionResource - releasesGvr schema.GroupVersionResource + version = "devel" + repositoriesGvr schema.GroupVersionResource + chartsGvr schema.GroupVersionResource + releasesGvr schema.GroupVersionResource ) func init() { @@ -60,13 +60,6 @@ func init() { Name: "fluxv2.packages", Version: "v1alpha1", } - // If no config is provided, we default to the existing values for backwards - // compatibility. - DefaultPluginConfig = FluxPluginConfig{ - VersionsInSummary: pkgutils.GetDefaultVersionsInSummary(), - TimeoutSeconds: int32(-1), - DefaultUpgradePolicy: pkgutils.UpgradePolicyNone, - } repositoriesGvr = schema.GroupVersionResource{ Group: sourcev1.GroupVersion.Group, @@ -90,6 +83,17 @@ func init() { // // miscellaneous utility funcs // +func NewDefaultPluginConfig() *FluxPluginConfig { + // If no config is provided, we default to the existing values for backwards + // compatibility. + return &FluxPluginConfig{ + VersionsInSummary: pkgutils.GetDefaultVersionsInSummary(), + TimeoutSeconds: int32(-1), + DefaultUpgradePolicy: pkgutils.UpgradePolicyNone, + UserManagedSecrets: false, + } +} + func PrettyPrint(o interface{}) string { prettyBytes, err := json.MarshalIndent(o, "", " ") if err != nil { @@ -335,6 +339,10 @@ type FluxPluginConfig struct { VersionsInSummary pkgutils.VersionsInSummary TimeoutSeconds int32 DefaultUpgradePolicy pkgutils.UpgradePolicy + // whether or not secrets are fully managed by user or kubeapps + // see comments in design spec under AddPackageRepository. + // false (i.e. kubeapps manages secrets) by default + UserManagedSecrets bool } // ParsePluginConfig parses the input plugin configuration json file and return the @@ -372,19 +380,18 @@ func ParsePluginConfig(pluginConfigPath string) (*FluxPluginConfig, error) { return nil, fmt.Errorf("unable to unmarshal plugin config: %q error: %w", string(pluginConfig), err) } - var defaultUpgradePolicy pkgutils.UpgradePolicy - defaultUpgradePolicy, err = pkgutils.UpgradePolicyFromString( - config.Flux.Packages.V1alpha1.DefaultUpgradePolicy) - if err != nil { + if defaultUpgradePolicy, err := pkgutils.UpgradePolicyFromString( + config.Flux.Packages.V1alpha1.DefaultUpgradePolicy); err != nil { return nil, err + } else { + // return configured value + return &FluxPluginConfig{ + VersionsInSummary: config.Core.Packages.V1alpha1.VersionsInSummary, + TimeoutSeconds: config.Core.Packages.V1alpha1.TimeoutSeconds, + DefaultUpgradePolicy: defaultUpgradePolicy, + UserManagedSecrets: false, + }, nil } - - // return configured value - return &FluxPluginConfig{ - VersionsInSummary: config.Core.Packages.V1alpha1.VersionsInSummary, - TimeoutSeconds: config.Core.Packages.V1alpha1.TimeoutSeconds, - DefaultUpgradePolicy: defaultUpgradePolicy, - }, nil } func GetRepositoriesGvr() schema.GroupVersionResource { @@ -398,3 +405,61 @@ func GetChartsGvr() schema.GroupVersionResource { func GetReleasesGvr() schema.GroupVersionResource { return releasesGvr } + +func DockerCredentialsToSecretData(dc *corev1.DockerCredentials) []byte { + // ref https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ + authStr := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", dc.Username, dc.Password))) + configStr := fmt.Sprintf("{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}", + dc.Server, dc.Username, dc.Password, dc.Email, authStr) + return []byte(base64.StdEncoding.EncodeToString([]byte(configStr))) +} + +func SecretDataToDockerCredentials(configStr string) (*corev1.DockerCredentials, error) { + decodedStr, err := base64.StdEncoding.DecodeString(string(configStr)) + if err != nil { + return nil, err + } + var configMap map[string]interface{} + err = json.Unmarshal(decodedStr, &configMap) + if err != nil { + return nil, err + } + auths, ok := configMap["auths"] + if !ok { + return nil, status.Errorf(codes.Internal, "secret data is not in expected format") + } + authsMap, ok := auths.(map[string]interface{}) + if !ok { + return nil, status.Errorf(codes.Internal, "secret data is not in expected format") + } + server := "" + for k := range authsMap { + server = k + break + } + if server == "" { + return nil, status.Errorf(codes.Internal, "secret data is not in expected format") + } + serverMap, ok := authsMap[server].(map[string]interface{}) + if !ok { + return nil, status.Errorf(codes.Internal, "secret data is not in expected format") + } + username, ok := serverMap["username"].(string) + if !ok { + return nil, status.Errorf(codes.Internal, "secret data is not in expected format") + } + password, ok := serverMap["password"].(string) + if !ok { + return nil, status.Errorf(codes.Internal, "secret data is not in expected format") + } + email, ok := serverMap["email"].(string) + if !ok { + return nil, status.Errorf(codes.Internal, "secret data is not in expected format") + } + return &corev1.DockerCredentials{ + Server: server, + Username: username, + Password: password, + Email: email, + }, nil +} diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go index b3f9660cdaf..7e9b8d2ea6e 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go @@ -1106,6 +1106,185 @@ var ( }, } + add_repo_req_1 = &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + NamespaceScoped: true, + } + + add_repo_req_2 = &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + Type: "foobar", + } + + add_repo_req_3 = &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + Type: "helm", + } + + add_repo_req_4 = &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + Type: "helm", + Url: "http://example.com", + TlsConfig: &corev1.PackageRepositoryTlsConfig{ + InsecureSkipVerify: true, + }, + } + + add_repo_req_5 = &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + Type: "helm", + Url: "http://example.com", + } + + add_repo_req_6 = func(ca []byte) *corev1.AddPackageRepositoryRequest { + return &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + Type: "helm", + Url: "http://example.com", + TlsConfig: &corev1.PackageRepositoryTlsConfig{ + PackageRepoTlsConfigOneOf: &corev1.PackageRepositoryTlsConfig_CertAuthority{ + CertAuthority: string(ca), + }, + }, + } + } + + add_repo_req_7 = &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + Type: "helm", + Url: "http://example.com", + TlsConfig: &corev1.PackageRepositoryTlsConfig{ + PackageRepoTlsConfigOneOf: &corev1.PackageRepositoryTlsConfig_SecretRef{ + SecretRef: &corev1.SecretKeyReference{ + Name: "secret-1", + }, + }, + }, + } + + add_repo_req_8 = &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + Type: "helm", + Url: "http://example.com", + Auth: &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_UsernamePassword{ + UsernamePassword: &corev1.UsernamePassword{ + Username: "baz", + Password: "zot", + }, + }, + PassCredentials: true, + }, + } + + add_repo_req_9 = func(pub, priv []byte) *corev1.AddPackageRepositoryRequest { + return &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + Type: "helm", + Url: "http://example.com", + Auth: &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_TLS, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_TlsCertKey{ + TlsCertKey: &corev1.TlsCertKey{ + Cert: string(pub), + Key: string(priv), + }, + }, + }, + } + } + + add_repo_req_10 = &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + Type: "helm", + Url: "http://example.com", + Auth: &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BEARER, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_Header{ + Header: "foobarzot", + }, + }, + } + + add_repo_req_11 = &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + Type: "helm", + Url: "http://example.com", + Auth: &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_CUSTOM, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_Header{ + Header: "foobarzot", + }, + }, + } + + add_repo_req_12 = &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + Type: "helm", + Url: "http://example.com", + Auth: &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_DOCKER_CONFIG_JSON, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_DockerCreds{ + DockerCreds: &corev1.DockerCredentials{ + Server: "your.private.registry.example.com", + Username: "janedoe", + Password: "xxxxxxxx", + Email: "jdoe@example.com", + }, + }, + }, + } + + add_repo_13 = &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + Type: "helm", + Url: "http://example.com", + Auth: &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_SecretRef{ + SecretRef: &corev1.SecretKeyReference{ + Name: "secret-1", + }, + }, + }, + } + + add_repo_14 = &corev1.AddPackageRepositoryRequest{ + Name: "bar", + Context: &corev1.Context{Namespace: "foo"}, + Type: "helm", + Url: "http://example.com", + Auth: &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_SecretRef{ + SecretRef: &corev1.SecretKeyReference{ + Name: "secret-1", + }, + }, + }, + TlsConfig: &corev1.PackageRepositoryTlsConfig{ + PackageRepoTlsConfigOneOf: &corev1.PackageRepositoryTlsConfig_SecretRef{ + SecretRef: &corev1.SecretKeyReference{ + Name: "secret-2", + }, + }, + }, + } + add_repo_expected_resp = &corev1.AddPackageRepositoryResponse{ PackageRepoRef: &corev1.PackageRepositoryReference{ Context: &corev1.Context{ @@ -2330,6 +2509,34 @@ var ( }, } + get_repo_detail_resp_6a = func(ca []byte) *corev1.GetPackageRepositoryDetailResponse { + return &corev1.GetPackageRepositoryDetailResponse{ + Detail: &corev1.PackageRepositoryDetail{ + PackageRepoRef: get_repo_detail_package_resp_ref, + Name: "repo-1", + Description: "", + NamespaceScoped: false, + Type: "helm", + Url: "https://example.repo.com/charts", + Interval: 60, + Auth: &corev1.PackageRepositoryAuth{ + PassCredentials: false, + }, + TlsConfig: &corev1.PackageRepositoryTlsConfig{ + InsecureSkipVerify: false, + PackageRepoTlsConfigOneOf: &corev1.PackageRepositoryTlsConfig_CertAuthority{ + CertAuthority: string(ca), + }, + }, + Status: &corev1.PackageRepositoryStatus{ + Ready: true, + Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, + UserReason: "Succeeded: stored artifact for revision '651f952130ea96823711d08345b85e82be011dc6'", + }, + }, + } + } + get_repo_detail_resp_7 = &corev1.GetPackageRepositoryDetailResponse{ Detail: &corev1.PackageRepositoryDetail{ PackageRepoRef: get_repo_detail_package_resp_ref, @@ -2396,6 +2603,35 @@ var ( }, } + get_repo_detail_resp_9a = func(pub, priv []byte) *corev1.GetPackageRepositoryDetailResponse { + return &corev1.GetPackageRepositoryDetailResponse{ + Detail: &corev1.PackageRepositoryDetail{ + PackageRepoRef: get_repo_detail_package_resp_ref, + Name: "repo-1", + Description: "", + NamespaceScoped: false, + Type: "helm", + Url: "https://example.repo.com/charts", + Interval: 60, + Auth: &corev1.PackageRepositoryAuth{ + PassCredentials: false, + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_TLS, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_TlsCertKey{ + TlsCertKey: &corev1.TlsCertKey{ + Cert: string(pub), + Key: string(priv), + }, + }, + }, + Status: &corev1.PackageRepositoryStatus{ + Ready: true, + Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, + UserReason: "Succeeded: stored artifact for revision '651f952130ea96823711d08345b85e82be011dc6'", + }, + }, + } + } + get_repo_detail_req_6 = &corev1.GetPackageRepositoryDetailRequest{ PackageRepoRef: &corev1.PackageRepositoryReference{ Context: &corev1.Context{ @@ -2432,6 +2668,33 @@ var ( }, } + get_repo_detail_resp_10a = &corev1.GetPackageRepositoryDetailResponse{ + Detail: &corev1.PackageRepositoryDetail{ + PackageRepoRef: get_repo_detail_package_resp_ref, + Name: "repo-1", + Description: "", + NamespaceScoped: false, + Type: "helm", + Url: "https://example.repo.com/charts", + Interval: 60, + Auth: &corev1.PackageRepositoryAuth{ + PassCredentials: false, + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_UsernamePassword{ + UsernamePassword: &corev1.UsernamePassword{ + Username: "foo", + Password: "bar", + }, + }, + }, + Status: &corev1.PackageRepositoryStatus{ + Ready: true, + Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, + UserReason: "Succeeded: stored artifact for revision '651f952130ea96823711d08345b85e82be011dc6'", + }, + }, + } + get_repo_detail_resp_11 = &corev1.GetPackageRepositoryDetailResponse{ Detail: &corev1.PackageRepositoryDetail{ PackageRepoRef: &corev1.PackageRepositoryReference{ @@ -2560,6 +2823,41 @@ var ( }, } + get_repo_detail_resp_14a = &corev1.GetPackageRepositoryDetailResponse{ + Detail: &corev1.PackageRepositoryDetail{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Context: &corev1.Context{ + Cluster: KubeappsCluster, + // will be set when scenario is run + Namespace: "TBD", + }, + Identifier: "my-podinfo-3", + Plugin: fluxPlugin, + }, + Name: "my-podinfo-3", + Description: "", + NamespaceScoped: false, + Type: "helm", + Url: podinfo_basic_auth_repo_url, + Interval: 600, + Auth: &corev1.PackageRepositoryAuth{ + PassCredentials: false, + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_UsernamePassword{ + UsernamePassword: &corev1.UsernamePassword{ + Username: "foo", + Password: "bar", + }, + }, + }, + Status: &corev1.PackageRepositoryStatus{ + Ready: true, + Reason: corev1.PackageRepositoryStatus_STATUS_REASON_SUCCESS, + UserReason: "Succeeded: stored artifact for revision '9d3ac1eb708dfaebae14d7c88fd46afce8b1e0f7aace790d91758575dc8ce518'", + }, + }, + } + get_repo_detail_req_8 = &corev1.GetPackageRepositoryDetailRequest{ PackageRepoRef: &corev1.PackageRepositoryReference{ Context: &corev1.Context{ diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_test.go index e3d6416be57..0111dc84c1a 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_test.go @@ -15,32 +15,19 @@ import ( helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" fluxmeta "github.com/fluxcd/pkg/apis/meta" sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" - redismock "github.com/go-redis/redismock/v8" "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" corev1 "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" plugins "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/gen/core/plugins/v1alpha1" - "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/plugins/pkg/clientgetter" "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/plugins/pkg/pkgutils" "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/plugins/pkg/resourcerefs/resourcerefstest" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "helm.sh/helm/v3/pkg/action" - "helm.sh/helm/v3/pkg/chart" - "helm.sh/helm/v3/pkg/chartutil" - kubefake "helm.sh/helm/v3/pkg/kube/fake" "helm.sh/helm/v3/pkg/release" - "helm.sh/helm/v3/pkg/storage" - "helm.sh/helm/v3/pkg/storage/driver" - authorizationv1 "k8s.io/api/authorization/v1" v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" - apiextfake "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" - typfake "k8s.io/client-go/kubernetes/fake" - k8stesting "k8s.io/client-go/testing" ) type testSpecGetInstalledPackages struct { @@ -645,7 +632,7 @@ func TestCreateInstalledPackage(t *testing.T) { } defer ts.Close() - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, nil, nil) + s, mock, err := newSimpleServerWithRepos(t, []sourcev1.HelmRepository{*repo}) if err != nil { t.Fatalf("%+v", err) } @@ -1258,72 +1245,3 @@ func newRelease(name string, namespace string, spec *helmv2.HelmReleaseSpec, sta } return helmRelease } - -func newServerWithChartsAndReleases(t *testing.T, actionConfig *action.Configuration, charts []sourcev1.HelmChart, releases []helmv2.HelmRelease) (*Server, redismock.ClientMock, error) { - typedClient := typfake.NewSimpleClientset() - // Creating an authorized clientGetter - typedClient.PrependReactor("create", "selfsubjectaccessreviews", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) { - return true, &authorizationv1.SelfSubjectAccessReview{ - Status: authorizationv1.SubjectAccessReviewStatus{Allowed: true}, - }, nil - }) - - apiextIfc := apiextfake.NewSimpleClientset(fluxHelmRepositoryCRD) - ctrlClient := newCtrlClient(nil, charts, releases) - clientGetter := func(context.Context, string) (clientgetter.ClientInterfaces, error) { - return clientgetter. - NewBuilder(). - WithApiExt(apiextIfc). - WithTyped(typedClient). - WithControllerRuntime(&ctrlClient). - Build(), nil - } - return newServer(t, clientGetter, actionConfig, nil, nil) -} - -// newHelmActionConfig returns an action.Configuration with fake clients and memory storage. -func newHelmActionConfig(t *testing.T, namespace string, rels []helmReleaseStub) *action.Configuration { - t.Helper() - - memDriver := driver.NewMemory() - - actionConfig := &action.Configuration{ - Releases: storage.Init(memDriver), - KubeClient: &kubefake.FailingKubeClient{PrintingKubeClient: kubefake.PrintingKubeClient{Out: ioutil.Discard}}, - Capabilities: chartutil.DefaultCapabilities, - Log: func(format string, v ...interface{}) { - t.Helper() - t.Logf(format, v...) - }, - } - - for _, r := range rels { - config := map[string]interface{}{} - rel := &release.Release{ - Name: r.name, - Namespace: r.namespace, - Info: &release.Info{ - Status: r.status, - Notes: r.notes, - }, - Chart: &chart.Chart{ - Metadata: &chart.Metadata{ - Version: r.chartVersion, - Icon: "https://example.com/icon.png", - AppVersion: "1.2.3", - }, - }, - Config: config, - Manifest: r.manifest, - } - err := actionConfig.Releases.Create(rel) - if err != nil { - t.Fatal(err) - } - } - // It is the namespace of the driver which determines the results. In the prod code, - // the actionConfigGetter sets this using StorageForSecrets(namespace, clientset). - memDriver.SetNamespace(namespace) - - return actionConfig -} diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo.go index 852fc1c1da2..60d88e9f7f0 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo.go @@ -6,7 +6,6 @@ package main import ( "bytes" "context" - "encoding/base64" "encoding/gob" "fmt" "reflect" @@ -203,95 +202,24 @@ func (s *Server) newRepo(ctx context.Context, targetName types.NamespacedName, u tlsConfig *corev1.PackageRepositoryTlsConfig, auth *corev1.PackageRepositoryAuth) (*corev1.PackageRepositoryReference, error) { if url == "" { return nil, status.Errorf(codes.InvalidArgument, "repository url may not be empty") + } else if tlsConfig != nil && tlsConfig.InsecureSkipVerify { + return nil, status.Errorf(codes.InvalidArgument, "TLS flag insecureSkipVerify is not supported") } - var secret *apiv1.Secret - if tlsConfig != nil { - if tlsConfig.InsecureSkipVerify { - return nil, status.Errorf(codes.Unimplemented, "TLS flag insecureSkipVerify is not supported") - } - caCert := tlsConfig.GetCertAuthority() - if caCert != "" { - secret = common.NewLocalOpaqueSecret(targetName.Name + "-") - secret.Data["caFile"] = []byte(caCert) - } - } - if auth != nil && auth.GetSecretRef() == nil { - if secret == nil { - secret = common.NewLocalOpaqueSecret(targetName.Name + "-") - } - switch auth.Type { - case corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH: - if unp := auth.GetUsernamePassword(); unp != nil { - secret.Data["username"] = []byte(unp.Username) - secret.Data["password"] = []byte(unp.Password) - } else { - return nil, status.Errorf(codes.Internal, "Username/Password configuration is missing") - } - case corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_TLS: - if ck := auth.GetTlsCertKey(); ck != nil { - secret.Data["certFile"] = []byte(ck.Cert) - secret.Data["keyFile"] = []byte(ck.Key) - } else { - return nil, status.Errorf(codes.Internal, "TLS Cert/Key configuration is missing") - } - case corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BEARER, corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_CUSTOM: - return nil, status.Errorf(codes.Unimplemented, "Package repository authentication type %q is not supported", auth.Type) - case corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_DOCKER_CONFIG_JSON: - if dc := auth.GetDockerCreds(); dc != nil { - secret.Type = apiv1.SecretTypeDockerConfigJson - // ref https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ - authStr := base64.StdEncoding.EncodeToString([]byte(fmt.Sprintf("%s:%s", dc.Username, dc.Password))) - configStr := fmt.Sprintf("{\"auths\":{\"%s\":{\"username\":\"%s\",\"password\":\"%s\",\"email\":\"%s\",\"auth\":\"%s\"}}}", - dc.Server, dc.Username, dc.Password, dc.Email, authStr) - secret.Data[".dockerconfigjson"] = []byte(base64.StdEncoding.EncodeToString([]byte(configStr))) - } else { - return nil, status.Errorf(codes.Internal, "Docker credentials configuration is missing") - } - default: - return nil, status.Errorf(codes.Internal, "Unexpected package repository authentication type: %q", auth.Type) - } - } - - passCredentials := auth != nil && auth.PassCredentials - - secretRef, checkSecret := "", false - if secret != nil { - // create a secret first, if applicable - if typedClient, err := s.clientGetter.Typed(ctx, s.kubeappsCluster); err != nil { + var secretRef string + var err error + if s.pluginConfig.UserManagedSecrets { + if secretRef, err = s.validateRepoUserManagedSecrets(ctx, targetName, tlsConfig, auth); err != nil { return nil, err - } else if secret, err = typedClient.CoreV1().Secrets(targetName.Namespace).Create(ctx, secret, metav1.CreateOptions{}); err != nil { - return nil, statuserror.FromK8sError("create", "secret", secret.GetName(), err) - } else { - secretRef = secret.GetName() } - } else if tlsConfig != nil && tlsConfig.GetSecretRef().GetName() != "" { - // check that the specified secret exists - secretRef, checkSecret = tlsConfig.GetSecretRef().GetName(), true - } else if auth != nil && auth.GetSecretRef().GetName() != "" { - secretRef, checkSecret = auth.GetSecretRef().GetName(), true - } - - if secretRef != "" && checkSecret { - // check that the specified secret exists - if typedClient, err := s.clientGetter.Typed(ctx, s.kubeappsCluster); err != nil { + } else { + if secretRef, err = s.setupRepoKubeappsManagedSecrets(ctx, targetName, tlsConfig, auth); err != nil { return nil, err - } else if _, err = typedClient.CoreV1().Secrets(targetName.Namespace).Get(ctx, secretRef, metav1.GetOptions{}); err != nil { - return nil, statuserror.FromK8sError("get", "secret", secretRef, err) } - // TODO (gfichtenholt) also check that the data in the opaque secret corresponds - // to specified auth type, e.g. if AuthType is - // PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, - // check that the secret has "username" and "password" fields, etc. - - // TODO (gfichtenholt) - // ref https://github.com/vmware-tanzu/kubeapps/pull/4353#discussion_r816332595 - // check whether flux supports typed secrets in addition to opaque secrets - // https://kubernetes.io/docs/concepts/configuration/secret/#secret-types - // If so, that cause certain validation to be done on the data (ie. ensuring that - // the "username" and "password" fields are present). } + passCredentials := auth != nil && auth.PassCredentials + if fluxRepo, err := s.newFluxHelmRepo(targetName, url, interval, secretRef, passCredentials); err != nil { return nil, err } else if client, err := s.getClient(ctx, targetName.Namespace); err != nil { @@ -355,10 +283,7 @@ func (s *Server) repoDetail(ctx context.Context, repoRef *corev1.PackageReposito } var tlsConfig *corev1.PackageRepositoryTlsConfig - auth := &corev1.PackageRepositoryAuth{ - Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_UNSPECIFIED, - PassCredentials: repo.Spec.PassCredentials, - } + var auth *corev1.PackageRepositoryAuth if repo.Spec.SecretRef != nil { secretName := repo.Spec.SecretRef.Name if s == nil || s.clientGetter == nil { @@ -372,42 +297,22 @@ func (s *Server) repoDetail(ctx context.Context, repoRef *corev1.PackageReposito if err != nil { return nil, statuserror.FromK8sError("get", "secret", secretName, err) } - if _, ok := secret.Data["caFile"]; ok { - tlsConfig = &corev1.PackageRepositoryTlsConfig{ - // flux plug in doesn't support this option - InsecureSkipVerify: false, - PackageRepoTlsConfigOneOf: &corev1.PackageRepositoryTlsConfig_SecretRef{ - SecretRef: &corev1.SecretKeyReference{ - Name: secretName, - Key: "caFile", - }, - }, - } - } - if _, ok := secret.Data["certFile"]; ok { - if _, ok = secret.Data["keyFile"]; ok { - auth.Type = corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_TLS - auth.PackageRepoAuthOneOf = &corev1.PackageRepositoryAuth_SecretRef{ - SecretRef: &corev1.SecretKeyReference{Name: secretName}, - } - } - } else if _, ok := secret.Data["username"]; ok { - if _, ok = secret.Data["password"]; ok { - auth.Type = corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH - auth.PackageRepoAuthOneOf = &corev1.PackageRepositoryAuth_SecretRef{ - SecretRef: &corev1.SecretKeyReference{Name: secretName}, - } - } - } else if _, ok := secret.Data[".dockerconfigjson"]; ok { - auth.Type = corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_DOCKER_CONFIG_JSON - auth.PackageRepoAuthOneOf = &corev1.PackageRepositoryAuth_SecretRef{ - SecretRef: &corev1.SecretKeyReference{Name: secretName}, + + if s.pluginConfig.UserManagedSecrets { + if tlsConfig, auth, err = s.getRepoTlsConfigAndAuthWithUserManagedSecrets(secret); err != nil { + return nil, err } } else { - log.Warning("Unrecognized type of secret [%s]", secretName) + if tlsConfig, auth, err = s.getRepoTlsConfigAndAuthWithKubeappsManagedSecrets(secret); err != nil { + return nil, err + } + } + } else { + auth = &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_UNSPECIFIED, } } - + auth.PassCredentials = repo.Spec.PassCredentials return &corev1.PackageRepositoryDetail{ PackageRepoRef: &corev1.PackageRepositoryReference{ Context: &corev1.Context{ @@ -477,6 +382,224 @@ func (s *Server) repoSummaries(ctx context.Context, namespace string) ([]*corev1 return summaries, nil } +func (s *Server) validateRepoUserManagedSecrets( + ctx context.Context, + repoName types.NamespacedName, + tlsConfig *corev1.PackageRepositoryTlsConfig, + auth *corev1.PackageRepositoryAuth) (string, error) { + var secretRefTls, secretRefAuth string + if tlsConfig != nil { + if tlsConfig.GetCertAuthority() != "" { + return "", status.Errorf(codes.InvalidArgument, "Secret Ref must be used with user managed secrets") + } else if tlsConfig.GetSecretRef().GetName() != "" { + secretRefTls = tlsConfig.GetSecretRef().GetName() + } + } + + if auth != nil { + if auth.GetDockerCreds() != nil || + auth.GetHeader() != "" || + auth.GetTlsCertKey() != nil || + auth.GetUsernamePassword() != nil { + return "", status.Errorf(codes.InvalidArgument, "Secret Ref must be used with user managed secrets") + } else if auth.GetSecretRef().GetName() != "" { + secretRefAuth = auth.GetSecretRef().GetName() + } + } + + var secretRef string + if secretRefTls != "" && secretRefAuth != "" && secretRefTls != secretRefAuth { + // flux repo spec only allows one secret per HelmRepository CRD + return "", status.Errorf( + codes.InvalidArgument, "TLS config secret and Auth secret must be the same") + } else if secretRefTls != "" { + secretRef = secretRefTls + } else if secretRefAuth != "" { + secretRef = secretRefAuth + } + + if secretRef != "" { + // check that the specified secret exists + if typedClient, err := s.clientGetter.Typed(ctx, s.kubeappsCluster); err != nil { + return "", err + } else if _, err = typedClient.CoreV1().Secrets(repoName.Namespace).Get(ctx, secretRef, metav1.GetOptions{}); err != nil { + return "", statuserror.FromK8sError("get", "secret", secretRef, err) + } + // TODO (gfichtenholt) also check that the data in the opaque secret corresponds + // to specified auth type, e.g. if AuthType is + // PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, + // check that the secret has "username" and "password" fields, etc. + + // TODO (gfichtenholt) + // ref https://github.com/vmware-tanzu/kubeapps/pull/4353#discussion_r816332595 + // check whether flux supports typed secrets in addition to opaque secrets + // https://kubernetes.io/docs/concepts/configuration/secret/#secret-types + // If so, that cause certain validation to be done on the data (ie. ensuring that + // the "username" and "password" fields are present). + } + return secretRef, nil +} + +func (s *Server) setupRepoKubeappsManagedSecrets( + ctx context.Context, + repoName types.NamespacedName, + tlsConfig *corev1.PackageRepositoryTlsConfig, + auth *corev1.PackageRepositoryAuth) (string, error) { + var secret *apiv1.Secret + if tlsConfig != nil { + if tlsConfig.GetSecretRef() != nil { + return "", status.Errorf(codes.InvalidArgument, "SecretRef may not be used with kubeapps managed secrets") + } + caCert := tlsConfig.GetCertAuthority() + if caCert != "" { + secret = common.NewLocalOpaqueSecret(repoName.Name + "-") + secret.Data["caFile"] = []byte(caCert) + } + } + if auth != nil { + if auth.GetSecretRef() != nil { + return "", status.Errorf(codes.InvalidArgument, "SecretRef may not be used with kubeapps managed secrets") + } + if secret == nil { + secret = common.NewLocalOpaqueSecret(repoName.Name + "-") + } + switch auth.Type { + case corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH: + if unp := auth.GetUsernamePassword(); unp != nil { + secret.Data["username"] = []byte(unp.Username) + secret.Data["password"] = []byte(unp.Password) + } else { + return "", status.Errorf(codes.Internal, "Username/Password configuration is missing") + } + case corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_TLS: + if ck := auth.GetTlsCertKey(); ck != nil { + secret.Data["certFile"] = []byte(ck.Cert) + secret.Data["keyFile"] = []byte(ck.Key) + } else { + return "", status.Errorf(codes.Internal, "TLS Cert/Key configuration is missing") + } + case corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BEARER, corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_CUSTOM: + return "", status.Errorf(codes.Unimplemented, "Package repository authentication type %q is not supported", auth.Type) + case corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_DOCKER_CONFIG_JSON: + if dc := auth.GetDockerCreds(); dc != nil { + secret.Type = apiv1.SecretTypeDockerConfigJson + secret.Data[".dockerconfigjson"] = common.DockerCredentialsToSecretData(dc) + } else { + return "", status.Errorf(codes.Internal, "Docker credentials configuration is missing") + } + default: + return "", status.Errorf(codes.Internal, "Unexpected package repository authentication type: %q", auth.Type) + } + } + + secretRef := "" + if secret != nil { + // create a secret first, if applicable + if typedClient, err := s.clientGetter.Typed(ctx, s.kubeappsCluster); err != nil { + return "", err + } else if secret, err = typedClient.CoreV1().Secrets(repoName.Namespace).Create(ctx, secret, metav1.CreateOptions{}); err != nil { + return "", statuserror.FromK8sError("create", "secret", secret.GetName(), err) + } else { + secretRef = secret.GetName() + } + } + return secretRef, nil +} + +func (s *Server) getRepoTlsConfigAndAuthWithUserManagedSecrets(secret *apiv1.Secret) (*corev1.PackageRepositoryTlsConfig, *corev1.PackageRepositoryAuth, error) { + var tlsConfig *corev1.PackageRepositoryTlsConfig + auth := &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_UNSPECIFIED, + } + + if _, ok := secret.Data["caFile"]; ok { + tlsConfig = &corev1.PackageRepositoryTlsConfig{ + // flux plug in doesn't support this option + InsecureSkipVerify: false, + PackageRepoTlsConfigOneOf: &corev1.PackageRepositoryTlsConfig_SecretRef{ + SecretRef: &corev1.SecretKeyReference{ + Name: secret.Name, + Key: "caFile", + }, + }, + } + } + if _, ok := secret.Data["certFile"]; ok { + if _, ok = secret.Data["keyFile"]; ok { + auth.Type = corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_TLS + auth.PackageRepoAuthOneOf = &corev1.PackageRepositoryAuth_SecretRef{ + SecretRef: &corev1.SecretKeyReference{Name: secret.Name}, + } + } + } else if _, ok := secret.Data["username"]; ok { + if _, ok = secret.Data["password"]; ok { + auth.Type = corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH + auth.PackageRepoAuthOneOf = &corev1.PackageRepositoryAuth_SecretRef{ + SecretRef: &corev1.SecretKeyReference{Name: secret.Name}, + } + } + } else if _, ok := secret.Data[".dockerconfigjson"]; ok { + auth.Type = corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_DOCKER_CONFIG_JSON + auth.PackageRepoAuthOneOf = &corev1.PackageRepositoryAuth_SecretRef{ + SecretRef: &corev1.SecretKeyReference{Name: secret.Name}, + } + } else { + log.Warning("Unrecognized type of secret [%s]", secret.Name) + } + return tlsConfig, auth, nil +} + +func (s *Server) getRepoTlsConfigAndAuthWithKubeappsManagedSecrets(secret *apiv1.Secret) (*corev1.PackageRepositoryTlsConfig, *corev1.PackageRepositoryAuth, error) { + var tlsConfig *corev1.PackageRepositoryTlsConfig + auth := &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_UNSPECIFIED, + } + + if caFile, ok := secret.Data["caFile"]; ok { + tlsConfig = &corev1.PackageRepositoryTlsConfig{ + // flux plug in doesn't support this option + InsecureSkipVerify: false, + PackageRepoTlsConfigOneOf: &corev1.PackageRepositoryTlsConfig_CertAuthority{ + CertAuthority: string(caFile), + }, + } + } + + if certFile, ok := secret.Data["certFile"]; ok { + if keyFile, ok := secret.Data["keyFile"]; ok { + auth.Type = corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_TLS + auth.PackageRepoAuthOneOf = &corev1.PackageRepositoryAuth_TlsCertKey{ + TlsCertKey: &corev1.TlsCertKey{ + Cert: string(certFile), + Key: string(keyFile), + }, + } + } + } else if username, ok := secret.Data["username"]; ok { + if pwd, ok := secret.Data["password"]; ok { + auth.Type = corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH + auth.PackageRepoAuthOneOf = &corev1.PackageRepositoryAuth_UsernamePassword{ + UsernamePassword: &corev1.UsernamePassword{ + Username: string(username), + Password: string(pwd), + }, + } + } + } else if configStr, ok := secret.Data[".dockerconfigjson"]; ok { + dc, err := common.SecretDataToDockerCredentials(string(configStr)) + if err != nil { + return nil, nil, err + } + auth.Type = corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_DOCKER_CONFIG_JSON + auth.PackageRepoAuthOneOf = &corev1.PackageRepositoryAuth_DockerCreds{ + DockerCreds: dc, + } + } else { + log.Warning("Unrecognized type of secret [%s]", secret.Name) + } + return tlsConfig, auth, nil +} + // // implements plug-in specific cache-related functionality // diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go index 5c8eae4abf4..4d33d13ec1b 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go @@ -13,6 +13,7 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" corev1 "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/gen/core/packages/v1alpha1" plugins "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/gen/core/plugins/v1alpha1" + "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" apiv1 "k8s.io/api/core/v1" @@ -186,6 +187,7 @@ func TestKindClusterAddPackageRepository(t *testing.T) { expectedResponse *corev1.AddPackageRepositoryResponse expectedStatusCode codes.Code expectedReconcileFailure bool + userManagedSecrets bool }{ { testName: "add repo test (simplest case)", @@ -294,6 +296,26 @@ func TestKindClusterAddPackageRepository(t *testing.T) { }, }, expectedStatusCode: codes.OK, + userManagedSecrets: true, + }, + { + testName: "package repository with basic auth and existing secret (kubeapps managed secrets)", + request: &corev1.AddPackageRepositoryRequest{ + Name: "my-podinfo-4", + Context: &corev1.Context{Namespace: "default"}, + Type: "helm", + Url: podinfo_basic_auth_repo_url, + Auth: &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_SecretRef{ + SecretRef: &corev1.SecretKeyReference{ + Name: "secret-1", + }, + }, + }, + }, + existingSecret: newBasicAuthSecret("secret-1", "default", "foo", "bar"), + expectedStatusCode: codes.InvalidArgument, }, { testName: "package repository with TLS", @@ -323,6 +345,26 @@ func TestKindClusterAddPackageRepository(t *testing.T) { }, }, expectedStatusCode: codes.OK, + userManagedSecrets: true, + }, + { + testName: "package repository with TLS (kubeapps managed secrets)", + request: &corev1.AddPackageRepositoryRequest{ + Name: "my-podinfo-4", + Context: &corev1.Context{Namespace: "default"}, + Type: "helm", + Url: podinfo_tls_repo_url, + Auth: &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_TLS, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_SecretRef{ + SecretRef: &corev1.SecretKeyReference{ + Name: "secret-2", + }, + }, + }, + }, + existingSecret: newTlsSecret("secret-2", "default", pub, priv, ca), + expectedStatusCode: codes.InvalidArgument, }, } @@ -346,6 +388,16 @@ func TestKindClusterAddPackageRepository(t *testing.T) { } }) } + oldValue, err := fluxPluginReposClient.SetUserManagedSecrets( + ctx, &v1alpha1.SetUserManagedSecretsRequest{Value: tc.userManagedSecrets}) + if err != nil { + t.Fatal(err) + } + t.Cleanup(func() { + fluxPluginReposClient.SetUserManagedSecrets( + ctx, &v1alpha1.SetUserManagedSecretsRequest{Value: oldValue.Value}) + }) + resp, err := fluxPluginReposClient.AddPackageRepository(ctx, tc.request) if tc.expectedStatusCode != codes.OK { if status.Code(err) != tc.expectedStatusCode { @@ -398,6 +450,7 @@ func TestKindClusterGetPackageRepositoryDetail(t *testing.T) { expectedResponse *corev1.GetPackageRepositoryDetailResponse expectedStatusCode codes.Code existingSecret *apiv1.Secret + userManagedSecrets bool }{ { testName: "gets detail for podinfo package repository", @@ -431,6 +484,16 @@ func TestKindClusterGetPackageRepositoryDetail(t *testing.T) { expectedStatusCode: codes.OK, expectedResponse: get_repo_detail_resp_14, existingSecret: newBasicAuthSecret("secret-1", "TBD", "foo", "bar"), + userManagedSecrets: true, + }, + { + testName: "get detail succeeds for podinfo basic auth package repository with creds (kubeapps managed secrets)", + request: get_repo_detail_req_10, + repoName: "my-podinfo-3", + repoUrl: podinfo_basic_auth_repo_url, + expectedStatusCode: codes.OK, + expectedResponse: get_repo_detail_resp_14a, + existingSecret: newBasicAuthSecret("secret-1", "TBD", "foo", "bar"), }, { testName: "get detail returns NotFound error for wrong repo", @@ -510,6 +573,16 @@ func TestKindClusterGetPackageRepositoryDetail(t *testing.T) { } defer cancel() + oldValue, err := fluxPluginReposClient.SetUserManagedSecrets( + grpcCtx, &v1alpha1.SetUserManagedSecretsRequest{Value: tc.userManagedSecrets}) + if err != nil { + t.Fatal(err) + } + t.Cleanup(func() { + fluxPluginReposClient.SetUserManagedSecrets( + grpcCtx, &v1alpha1.SetUserManagedSecretsRequest{Value: oldValue.Value}) + }) + var resp *corev1.GetPackageRepositoryDetailResponse for { resp, err = fluxPluginReposClient.GetPackageRepositoryDetail(grpcCtx, tc.request) @@ -538,6 +611,7 @@ func TestKindClusterGetPackageRepositoryDetail(t *testing.T) { corev1.PackageRepositoryAuth{}, corev1.PackageRepositoryTlsConfig{}, corev1.SecretKeyReference{}, + corev1.UsernamePassword{}, ) opts2 := cmpopts.IgnoreFields(corev1.PackageRepositoryStatus{}, "UserReason") diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_test.go index e6d03aceb66..f7bc50c7b19 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_test.go @@ -23,17 +23,12 @@ import ( "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/plugins/pkg/clientgetter" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - authorizationv1 "k8s.io/api/authorization/v1" apiv1 "k8s.io/api/core/v1" - apiextfake "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake" "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" - "k8s.io/apiserver/pkg/storage/names" - typfake "k8s.io/client-go/kubernetes/fake" - k8stesting "k8s.io/client-go/testing" ) type testSpecGetAvailablePackageSummaries struct { @@ -408,7 +403,7 @@ func TestGetAvailablePackageSummariesWithoutPagination(t *testing.T) { // the index.yaml will contain links to charts but for the purposes // of this test they do not matter - s, mock, err := newServerWithRepos(t, repos, nil, nil) + s, mock, err := newSimpleServerWithRepos(t, repos) if err != nil { t.Fatalf("error instantiating the server: %v", err) } @@ -466,7 +461,7 @@ func TestGetAvailablePackageSummariesWithPagination(t *testing.T) { // the index.yaml will contain links to charts but for the purposes // of this test they do not matter - s, mock, err := newServerWithRepos(t, repos, nil, nil) + s, mock, err := newSimpleServerWithRepos(t, repos) if err != nil { t.Fatalf("error instantiating the server: %v", err) } @@ -619,7 +614,7 @@ func TestGetAvailablePackageSummaryAfterRepoIndexUpdate(t *testing.T) { repoName := types.NamespacedName{Namespace: "ns2", Name: "testrepo"} repo := newRepo(repoName.Name, repoName.Namespace, repoSpec, repoStatus) - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{repo}, nil, nil) + s, mock, err := newSimpleServerWithRepos(t, []sourcev1.HelmRepository{repo}) if err != nil { t.Fatalf("error instantiating the server: %v", err) } @@ -742,7 +737,7 @@ func TestGetAvailablePackageSummaryAfterFluxHelmRepoDelete(t *testing.T) { } defer ts.Close() - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil) + s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil, false) if err != nil { t.Fatalf("%+v", err) } @@ -848,7 +843,7 @@ func TestGetAvailablePackageSummaryAfterCacheResync(t *testing.T) { } defer ts2.Close() - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, nil, nil) + s, mock, err := newSimpleServerWithRepos(t, []sourcev1.HelmRepository{*repo}) if err != nil { t.Fatalf("error instantiating the server: %v", err) } @@ -939,7 +934,7 @@ func TestGetAvailablePackageSummaryAfterCacheResync(t *testing.T) { func TestGetAvailablePackageSummariesAfterCacheResyncQueueNotIdle(t *testing.T) { t.Run("test that causes RetryWatcher to stop and the repo cache needs to resync", func(t *testing.T) { // start with an empty server that only has an empty repo cache - s, mock, err := newServerWithRepos(t, nil, nil, nil) + s, mock, err := newSimpleServerWithRepos(t, nil) if err != nil { t.Fatalf("error instantiating the server: %v", err) } @@ -1081,7 +1076,7 @@ func TestGetAvailablePackageSummariesAfterCacheResyncQueueNotIdle(t *testing.T) func TestGetAvailablePackageSummariesAfterCacheResyncQueueIdle(t *testing.T) { t.Run("test that causes RetryWatcher to stop and the repo cache needs to resync (idle queue)", func(t *testing.T) { // start with an empty server that only has an empty repo cache - s, mock, err := newServerWithRepos(t, nil, nil, nil) + s, mock, err := newSimpleServerWithRepos(t, nil) if err != nil { t.Fatalf("error instantiating the server: %v", err) } @@ -1198,6 +1193,7 @@ func TestAddPackageRepository(t *testing.T) { statusCode codes.Code existingSecret *apiv1.Secret expectedCreatedSecret *apiv1.Secret + userManagedSecrets bool }{ { name: "returns error if no namespace is provided", @@ -1210,233 +1206,123 @@ func TestAddPackageRepository(t *testing.T) { statusCode: codes.InvalidArgument, }, { - name: "returns error if namespaced scoped", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - NamespaceScoped: true, - }, + name: "returns error if namespaced scoped", + request: add_repo_req_1, statusCode: codes.Unimplemented, }, { - name: "returns error if wrong repository type", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - Type: "foobar", - }, + name: "returns error if wrong repository type", + request: add_repo_req_2, statusCode: codes.Unimplemented, }, { - name: "returns error if no url", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - Type: "helm", - }, + name: "returns error if no url", + request: add_repo_req_3, statusCode: codes.InvalidArgument, }, { - name: "returns error if insecureskipverify is set", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - Type: "helm", - Url: "http://example.com", - TlsConfig: &corev1.PackageRepositoryTlsConfig{ - InsecureSkipVerify: true, - }, - }, - statusCode: codes.Unimplemented, + name: "returns error if insecureskipverify is set", + request: add_repo_req_4, + statusCode: codes.InvalidArgument, }, { - name: "simple add package repository scenario", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - Type: "helm", - Url: "http://example.com", - }, + name: "simple add package repository scenario", + request: add_repo_req_5, expectedResponse: add_repo_expected_resp, expectedRepo: &add_repo_1, statusCode: codes.OK, }, { - name: "package repository with tls cert authority", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - Type: "helm", - Url: "http://example.com", - TlsConfig: &corev1.PackageRepositoryTlsConfig{ - PackageRepoTlsConfigOneOf: &corev1.PackageRepositoryTlsConfig_CertAuthority{ - CertAuthority: string(ca), - }, - }, - }, + name: "package repository with tls cert authority", + request: add_repo_req_6(ca), expectedResponse: add_repo_expected_resp, expectedRepo: &add_repo_2, expectedCreatedSecret: newTlsSecret("bar-", "foo", nil, nil, ca), statusCode: codes.OK, }, { - name: "package repository with secret key reference", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - Type: "helm", - Url: "http://example.com", - TlsConfig: &corev1.PackageRepositoryTlsConfig{ - PackageRepoTlsConfigOneOf: &corev1.PackageRepositoryTlsConfig_SecretRef{ - SecretRef: &corev1.SecretKeyReference{ - Name: "secret-1", - }, - }, - }, - }, - expectedResponse: add_repo_expected_resp, - expectedRepo: &add_repo_3, - statusCode: codes.OK, - existingSecret: newTlsSecret("secret-1", "foo", nil, nil, ca), + name: "errors when package repository with secret key reference (kubeapps managed secrets)", + request: add_repo_req_7, + statusCode: codes.InvalidArgument, }, { - name: "failes when package repository links to non-existing secret", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - Type: "helm", - Url: "http://example.com", - TlsConfig: &corev1.PackageRepositoryTlsConfig{ - PackageRepoTlsConfigOneOf: &corev1.PackageRepositoryTlsConfig_SecretRef{ - SecretRef: &corev1.SecretKeyReference{ - Name: "secret-1", - }, - }, - }, - }, - statusCode: codes.NotFound, + name: "package repository with secret key reference", + request: add_repo_req_7, + expectedResponse: add_repo_expected_resp, + expectedRepo: &add_repo_3, + statusCode: codes.OK, + existingSecret: newTlsSecret("secret-1", "foo", nil, nil, ca), + userManagedSecrets: true, }, { - name: "package repository with basic auth and pass_credentials flag", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - Type: "helm", - Url: "http://example.com", - Auth: &corev1.PackageRepositoryAuth{ - Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, - PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_UsernamePassword{ - UsernamePassword: &corev1.UsernamePassword{ - Username: "baz", - Password: "zot", - }, - }, - PassCredentials: true, - }, - }, + name: "failes when package repository links to non-existing secret", + request: add_repo_req_7, + statusCode: codes.NotFound, + userManagedSecrets: true, + }, + { + name: "failes when package repository links to non-existing secret (kubeapps managed secrets)", + request: add_repo_req_7, + statusCode: codes.InvalidArgument, + }, + { + name: "package repository with basic auth and pass_credentials flag", + request: add_repo_req_8, expectedResponse: add_repo_expected_resp, expectedRepo: &add_repo_4, expectedCreatedSecret: newBasicAuthSecret("bar-", "foo", "baz", "zot"), statusCode: codes.OK, }, { - name: "package repository with TLS authentication", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - Type: "helm", - Url: "http://example.com", - Auth: &corev1.PackageRepositoryAuth{ - Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_TLS, - PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_TlsCertKey{ - TlsCertKey: &corev1.TlsCertKey{ - Cert: string(pub), - Key: string(priv), - }, - }, - }, - }, + name: "package repository with TLS authentication", + request: add_repo_req_9(pub, priv), expectedResponse: add_repo_expected_resp, expectedRepo: &add_repo_2, expectedCreatedSecret: newTlsSecret("bar-", "foo", pub, priv, nil), statusCode: codes.OK, }, { - name: "errors for package repository with bearer token", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - Type: "helm", - Url: "http://example.com", - Auth: &corev1.PackageRepositoryAuth{ - Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BEARER, - PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_Header{ - Header: "foobarzot", - }, - }, - }, + name: "errors for package repository with bearer token", + request: add_repo_req_10, statusCode: codes.Unimplemented, }, { - name: "errors for package repository with custom auth token", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - Type: "helm", - Url: "http://example.com", - Auth: &corev1.PackageRepositoryAuth{ - Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_CUSTOM, - PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_Header{ - Header: "foobarzot", - }, - }, - }, + name: "errors for package repository with custom auth token", + request: add_repo_req_11, statusCode: codes.Unimplemented, }, { - name: "package repository with docker config JSON authentication", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - Type: "helm", - Url: "http://example.com", - Auth: &corev1.PackageRepositoryAuth{ - Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_DOCKER_CONFIG_JSON, - PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_DockerCreds{ - DockerCreds: &corev1.DockerCredentials{ - Server: "your.private.registry.example.com", - Username: "janedoe", - Password: "xxxxxxxx", - Email: "jdoe@example.com", - }, - }, - }, - }, + name: "package repository with docker config JSON authentication", + request: add_repo_req_12, expectedResponse: add_repo_expected_resp, expectedRepo: &add_repo_2, expectedCreatedSecret: newDockerConfigJSONSecret("bar-", "foo", "your.private.registry.example.com", "janedoe", "xxxxxxxx", "jdoe@example.com"), statusCode: codes.OK, }, { - name: "package repository with basic auth and existing secret", - request: &corev1.AddPackageRepositoryRequest{ - Name: "bar", - Context: &corev1.Context{Namespace: "foo"}, - Type: "helm", - Url: "http://example.com", - Auth: &corev1.PackageRepositoryAuth{ - Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, - PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_SecretRef{ - SecretRef: &corev1.SecretKeyReference{ - Name: "secret-1", - }, - }, - }, - }, - expectedResponse: add_repo_expected_resp, - expectedRepo: &add_repo_3, - existingSecret: newBasicAuthSecret("secret-1", "foo", "baz", "zot"), - statusCode: codes.OK, + name: "package repository with basic auth and existing secret", + request: add_repo_13, + expectedResponse: add_repo_expected_resp, + expectedRepo: &add_repo_3, + existingSecret: newBasicAuthSecret("secret-1", "foo", "baz", "zot"), + statusCode: codes.OK, + userManagedSecrets: true, + }, + { + name: "package repository with basic auth and existing secret (kubeapps managed secrets)", + request: add_repo_13, + statusCode: codes.InvalidArgument, + }, + { + name: "errors when package repository with 1 secret for TLS CA and a different secret for basic auth (kubeapps managed secrets)", + request: add_repo_14, + statusCode: codes.InvalidArgument, + }, + { + name: "errors when package repository with 1 secret for TLS CA and a different secret for basic auth", + request: add_repo_14, + statusCode: codes.InvalidArgument, + userManagedSecrets: true, }, } @@ -1446,7 +1332,7 @@ func TestAddPackageRepository(t *testing.T) { if tc.existingSecret != nil { secrets = append(secrets, tc.existingSecret) } - s, mock, err := newServerWithRepos(t, nil, nil, secrets) + s, mock, err := newServerWithRepos(t, nil, nil, secrets, tc.userManagedSecrets) if err != nil { t.Fatalf("error instantiating the server: %v", err) } @@ -1513,15 +1399,14 @@ func TestAddPackageRepository(t *testing.T) { t.Errorf("SecretRef [%s] was expected to start with [%s]", actualRepo.Spec.SecretRef.Name, tc.expectedRepo.Spec.SecretRef.Name) } - opt1 := cmpopts.IgnoreFields( - metav1.ObjectMeta{}, "Name", "GenerateName") + opt2 := cmpopts.IgnoreFields(metav1.ObjectMeta{}, "Name", "GenerateName") // check expected secret has been created if typedClient, err := s.clientGetter.Typed(ctx, s.kubeappsCluster); err != nil { t.Fatal(err) } else if secret, err := typedClient.CoreV1().Secrets(nsname.Namespace).Get(ctx, actualRepo.Spec.SecretRef.Name, metav1.GetOptions{}); err != nil { t.Fatal(err) - } else if got, want := secret, tc.expectedCreatedSecret; !cmp.Equal(want, got, opt1) { - t.Errorf("mismatch (-want +got):\n%s", cmp.Diff(want, got, opt1)) + } else if got, want := secret, tc.expectedCreatedSecret; !cmp.Equal(want, got, opt2) { + t.Errorf("mismatch (-want +got):\n%s", cmp.Diff(want, got, opt2)) } else if !strings.HasPrefix(secret.Name, tc.expectedCreatedSecret.Name) { t.Errorf("Secret Name [%s] was expected to start with [%s]", secret.Name, tc.expectedCreatedSecret.Name) @@ -1546,6 +1431,7 @@ func TestGetPackageRepositoryDetail(t *testing.T) { failed bool expectedStatusCode codes.Code expectedResponse *corev1.GetPackageRepositoryDetailResponse + userManagedSecrets bool }{ { name: "get package repository detail simplest case", @@ -1597,6 +1483,17 @@ func TestGetPackageRepositoryDetail(t *testing.T) { request: get_repo_detail_req_1, expectedStatusCode: codes.OK, expectedResponse: get_repo_detail_resp_6, + userManagedSecrets: true, + }, + { + name: "it returns package repository detail with TLS cert aurthority (kubeapps managed secrets)", + repoIndex: testYaml("valid-index.yaml"), + repoName: "repo-1", + repoNamespace: "namespace-1", + repoSecret: newTlsSecret("secret-1", "namespace-1", nil, nil, ca), + request: get_repo_detail_req_1, + expectedStatusCode: codes.OK, + expectedResponse: get_repo_detail_resp_6a(ca), }, { name: "get package repository with pending status", @@ -1627,6 +1524,17 @@ func TestGetPackageRepositoryDetail(t *testing.T) { request: get_repo_detail_req_1, expectedStatusCode: codes.OK, expectedResponse: get_repo_detail_resp_9, + userManagedSecrets: true, + }, + { + name: "it returns package repository detail with TLS cert authentication (kubeapps managed secrets)", + repoIndex: testYaml("valid-index.yaml"), + repoName: "repo-1", + repoNamespace: "namespace-1", + repoSecret: newTlsSecret("secret-1", "namespace-1", pub, priv, nil), + request: get_repo_detail_req_1, + expectedStatusCode: codes.OK, + expectedResponse: get_repo_detail_resp_9a(pub, priv), }, { name: "it returns package repository detail with basic authentication", @@ -1637,6 +1545,17 @@ func TestGetPackageRepositoryDetail(t *testing.T) { request: get_repo_detail_req_1, expectedStatusCode: codes.OK, expectedResponse: get_repo_detail_resp_10, + userManagedSecrets: true, + }, + { + name: "it returns package repository detail with basic authentication (kubeapps managed secrets)", + repoIndex: testYaml("valid-index.yaml"), + repoName: "repo-1", + repoNamespace: "namespace-1", + repoSecret: newBasicAuthSecret("secret-1", "namespace-1", "foo", "bar"), + request: get_repo_detail_req_1, + expectedStatusCode: codes.OK, + expectedResponse: get_repo_detail_resp_10a, }, } @@ -1697,7 +1616,7 @@ func TestGetPackageRepositoryDetail(t *testing.T) { // the index.yaml will contain links to charts but for the purposes // of this test they do not matter - s, _, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, nil, secrets) + s, _, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, nil, secrets, tc.userManagedSecrets) if err != nil { t.Fatalf("error instantiating the server: %v", err) } @@ -1722,6 +1641,8 @@ func TestGetPackageRepositoryDetail(t *testing.T) { corev1.PackageRepositoryAuth{}, corev1.PackageRepositoryTlsConfig{}, corev1.SecretKeyReference{}, + corev1.TlsCertKey{}, + corev1.UsernamePassword{}, ) if got, want := actualResp, tc.expectedResponse; !cmp.Equal(got, want, opt1) { t.Errorf("mismatch (-want +got):\n%s", cmp.Diff(want, got, opt1)) @@ -1795,7 +1716,7 @@ func TestGetPackageRepositorySummaries(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - s, mock, err := newServerWithRepos(t, tc.existingRepos, nil, nil) + s, mock, err := newSimpleServerWithRepos(t, tc.existingRepos) if err != nil { t.Fatalf("%+v", err) } @@ -1831,44 +1752,6 @@ func TestGetPackageRepositorySummaries(t *testing.T) { } } -func newServerWithRepos(t *testing.T, repos []sourcev1.HelmRepository, charts []testSpecChartWithUrl, secrets []runtime.Object) (*Server, redismock.ClientMock, error) { - typedClient := typfake.NewSimpleClientset(secrets...) - - // ref https://stackoverflow.com/questions/68794562/kubernetes-fake-client-doesnt-handle-generatename-in-objectmeta/68794563#68794563 - typedClient.PrependReactor( - "create", "*", - func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) { - ret = action.(k8stesting.CreateAction).GetObject() - meta, ok := ret.(metav1.Object) - if !ok { - return - } - if meta.GetName() == "" && meta.GetGenerateName() != "" { - meta.SetName(names.SimpleNameGenerator.GenerateName(meta.GetGenerateName())) - } - return - }) - - // Creating an authorized clientGetter - typedClient.PrependReactor("create", "selfsubjectaccessreviews", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) { - return true, &authorizationv1.SelfSubjectAccessReview{ - Status: authorizationv1.SubjectAccessReviewStatus{Allowed: true}, - }, nil - }) - - apiextIfc := apiextfake.NewSimpleClientset(fluxHelmRepositoryCRD) - ctrlClient := newCtrlClient(repos, nil, nil) - clientGetter := func(context.Context, string) (clientgetter.ClientInterfaces, error) { - return clientgetter. - NewBuilder(). - WithTyped(typedClient). - WithApiExt(apiextIfc). - WithControllerRuntime(&ctrlClient). - Build(), nil - } - return newServer(t, clientGetter, nil, repos, charts) -} - func newRepo(name string, namespace string, spec *sourcev1.HelmRepositorySpec, status *sourcev1.HelmRepositoryStatus) sourcev1.HelmRepository { helmRepository := sourcev1.HelmRepository{ TypeMeta: metav1.TypeMeta{ diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server.go index a91b814f693..a69c1a2e22f 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server.go @@ -72,7 +72,7 @@ func NewServer(configGetter core.KubernetesConfigGetter, kubeappsCluster string, } else if chartCache, err := cache.NewChartCache("chartCache", redisCli, stopCh); err != nil { return nil, err } else { - pluginConfig := &common.DefaultPluginConfig + pluginConfig := common.NewDefaultPluginConfig() if pluginConfigPath != "" { pluginConfig, err = common.ParsePluginConfig(pluginConfigPath) if err != nil { @@ -584,6 +584,22 @@ func (s *Server) GetPackageRepositorySummaries(ctx context.Context, request *cor } } +// UpdatePackageRepository updates a package repository based on the request. +func (s *Server) UpdatePackageRepository(ctx context.Context, request *corev1.UpdatePackageRepositoryRequest) (*corev1.UpdatePackageRepositoryResponse, error) { + // just a stub for now + return nil, nil +} + +// This endpoint exists only for integration unit tests +func (s *Server) SetUserManagedSecrets(ctx context.Context, request *v1alpha1.SetUserManagedSecretsRequest) (*v1alpha1.SetUserManagedSecretsResponse, error) { + log.Infof("+fluxv2 SetUserManagedSecrets [%t]", request.Value) + oldVal := s.pluginConfig.UserManagedSecrets + s.pluginConfig.UserManagedSecrets = request.Value + return &v1alpha1.SetUserManagedSecretsResponse{ + Value: oldVal, + }, nil +} + // convenience func mostly used by unit tests func (s *Server) newBackgroundClientGetter() clientgetter.BackgroundClientGetterFunc { return func(ctx context.Context) (clientgetter.ClientInterfaces, error) { diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server_test.go index b31f1a7d480..4edc4606648 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server_test.go @@ -5,11 +5,13 @@ package main import ( "context" + "io/ioutil" "reflect" "strings" "testing" "time" + helmv2 "github.com/fluxcd/helm-controller/api/v2beta1" fluxmeta "github.com/fluxcd/pkg/apis/meta" sourcev1 "github.com/fluxcd/source-controller/api/v1beta2" redismock "github.com/go-redis/redismock/v8" @@ -20,9 +22,21 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" "helm.sh/helm/v3/pkg/action" + "helm.sh/helm/v3/pkg/chart" + "helm.sh/helm/v3/pkg/chartutil" + kubefake "helm.sh/helm/v3/pkg/kube/fake" + "helm.sh/helm/v3/pkg/release" + "helm.sh/helm/v3/pkg/storage" + "helm.sh/helm/v3/pkg/storage/driver" + authorizationv1 "k8s.io/api/authorization/v1" + apiextfake "k8s.io/apiextensions-apiserver/pkg/client/clientset/clientset/fake" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/types" "k8s.io/apimachinery/pkg/util/sets" + "k8s.io/apiserver/pkg/storage/names" + typfake "k8s.io/client-go/kubernetes/fake" + k8stesting "k8s.io/client-go/testing" ctrlclient "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -137,7 +151,7 @@ func TestGetAvailablePackagesStatus(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{tc.repo}, nil, nil) + s, mock, err := newSimpleServerWithRepos(t, []sourcev1.HelmRepository{tc.repo}) if err != nil { t.Fatalf("error instantiating the server: %v", err) } @@ -188,6 +202,117 @@ type testSpecChartWithUrl struct { numRetries int } +func newSimpleServerWithRepos(t *testing.T, repos []sourcev1.HelmRepository) (*Server, redismock.ClientMock, error) { + return newServerWithRepos(t, repos, nil, nil, false) +} + +func newServerWithRepos(t *testing.T, repos []sourcev1.HelmRepository, charts []testSpecChartWithUrl, secrets []runtime.Object, userManagedSecrets bool) (*Server, redismock.ClientMock, error) { + typedClient := typfake.NewSimpleClientset(secrets...) + + // ref https://stackoverflow.com/questions/68794562/kubernetes-fake-client-doesnt-handle-generatename-in-objectmeta/68794563#68794563 + typedClient.PrependReactor( + "create", "*", + func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) { + ret = action.(k8stesting.CreateAction).GetObject() + meta, ok := ret.(metav1.Object) + if !ok { + return + } + if meta.GetName() == "" && meta.GetGenerateName() != "" { + meta.SetName(names.SimpleNameGenerator.GenerateName(meta.GetGenerateName())) + } + return + }) + + // Creating an authorized clientGetter + typedClient.PrependReactor("create", "selfsubjectaccessreviews", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) { + return true, &authorizationv1.SelfSubjectAccessReview{ + Status: authorizationv1.SubjectAccessReviewStatus{Allowed: true}, + }, nil + }) + + apiextIfc := apiextfake.NewSimpleClientset(fluxHelmRepositoryCRD) + ctrlClient := newCtrlClient(repos, nil, nil) + clientGetter := func(context.Context, string) (clientgetter.ClientInterfaces, error) { + return clientgetter. + NewBuilder(). + WithTyped(typedClient). + WithApiExt(apiextIfc). + WithControllerRuntime(&ctrlClient). + Build(), nil + } + return newServer(t, clientGetter, nil, repos, charts, userManagedSecrets) +} + +func newServerWithChartsAndReleases(t *testing.T, actionConfig *action.Configuration, charts []sourcev1.HelmChart, releases []helmv2.HelmRelease) (*Server, redismock.ClientMock, error) { + typedClient := typfake.NewSimpleClientset() + // Creating an authorized clientGetter + typedClient.PrependReactor("create", "selfsubjectaccessreviews", func(action k8stesting.Action) (handled bool, ret runtime.Object, err error) { + return true, &authorizationv1.SelfSubjectAccessReview{ + Status: authorizationv1.SubjectAccessReviewStatus{Allowed: true}, + }, nil + }) + + apiextIfc := apiextfake.NewSimpleClientset(fluxHelmRepositoryCRD) + ctrlClient := newCtrlClient(nil, charts, releases) + clientGetter := func(context.Context, string) (clientgetter.ClientInterfaces, error) { + return clientgetter. + NewBuilder(). + WithApiExt(apiextIfc). + WithTyped(typedClient). + WithControllerRuntime(&ctrlClient). + Build(), nil + } + return newServer(t, clientGetter, actionConfig, nil, nil, false) +} + +// newHelmActionConfig returns an action.Configuration with fake clients and memory storage. +func newHelmActionConfig(t *testing.T, namespace string, rels []helmReleaseStub) *action.Configuration { + t.Helper() + + memDriver := driver.NewMemory() + + actionConfig := &action.Configuration{ + Releases: storage.Init(memDriver), + KubeClient: &kubefake.FailingKubeClient{PrintingKubeClient: kubefake.PrintingKubeClient{Out: ioutil.Discard}}, + Capabilities: chartutil.DefaultCapabilities, + Log: func(format string, v ...interface{}) { + t.Helper() + t.Logf(format, v...) + }, + } + + for _, r := range rels { + config := map[string]interface{}{} + rel := &release.Release{ + Name: r.name, + Namespace: r.namespace, + Info: &release.Info{ + Status: r.status, + Notes: r.notes, + }, + Chart: &chart.Chart{ + Metadata: &chart.Metadata{ + Version: r.chartVersion, + Icon: "https://example.com/icon.png", + AppVersion: "1.2.3", + }, + }, + Config: config, + Manifest: r.manifest, + } + err := actionConfig.Releases.Create(rel) + if err != nil { + t.Fatal(err) + } + } + // It is the namespace of the driver which determines the results. In the prod code, + // the actionConfigGetter sets this using StorageForSecrets(namespace, clientset). + memDriver.SetNamespace(namespace) + + return actionConfig +} + // This func does not create a kubernetes dynamic client. It is meant to work in conjunction with // a call to fake.NewSimpleDynamicClientWithCustomListKinds. The reason for argument repos // (unlike charts or releases) is that repos are treated special because @@ -196,7 +321,8 @@ func newServer(t *testing.T, clientGetter clientgetter.ClientGetterFunc, actionConfig *action.Configuration, repos []sourcev1.HelmRepository, - charts []testSpecChartWithUrl) (*Server, redismock.ClientMock, error) { + charts []testSpecChartWithUrl, + userManagedSecrets bool) (*Server, redismock.ClientMock, error) { stopCh := make(chan struct{}) t.Cleanup(func() { close(stopCh) }) @@ -331,6 +457,9 @@ func newServer(t *testing.T, return nil, mock, err } + pluginConfig := common.NewDefaultPluginConfig() + pluginConfig.UserManagedSecrets = userManagedSecrets + s := &Server{ clientGetter: clientGetter, serviceAccountClientGetter: backgroundClientGetter, @@ -340,7 +469,7 @@ func newServer(t *testing.T, repoCache: repoCache, chartCache: chartCache, kubeappsCluster: KubeappsCluster, - pluginConfig: &common.DefaultPluginConfig, + pluginConfig: pluginConfig, } return s, mock, nil } diff --git a/cmd/kubeapps-apis/proto/kubeappsapis/core/packages/v1alpha1/repositories.proto b/cmd/kubeapps-apis/proto/kubeappsapis/core/packages/v1alpha1/repositories.proto index 54122319b4a..f9ea07d0c3f 100644 --- a/cmd/kubeapps-apis/proto/kubeappsapis/core/packages/v1alpha1/repositories.proto +++ b/cmd/kubeapps-apis/proto/kubeappsapis/core/packages/v1alpha1/repositories.proto @@ -35,6 +35,13 @@ service RepositoriesService { get: "/core/packages/v1alpha1/repositories" }; } + + rpc UpdatePackageRepository(UpdatePackageRepositoryRequest) returns (UpdatePackageRepositoryResponse) { + option (google.api.http) = { + put: "/core/packages/v1alpha1/repositories/plugin/{package_repo_ref.plugin.name}/{package_repo_ref.plugin.version}/c/{package_repo_ref.context.cluster}/ns/{package_repo_ref.context.namespace}/{package_repo_ref.identifier=**}" + body: "*" + }; + } } // Standard request and response messages for each required function are defined @@ -248,6 +255,34 @@ message GetPackageRepositorySummariesRequest { Context context = 1; } +// UpdatePackageRepositoryRequest +// +// Request for UpdatePackageRepository +message UpdatePackageRepositoryRequest { + // A reference uniquely identifying the package repository being updated. + // The only required field + PackageRepositoryReference package_repo_ref = 1; + + // URL identifying the package repository location. + string url = 2; + + // A user-provided description. + string description = 3; + + // Package storage type + string type = 4; + + // The interval at which to check the upstream for updates (in seconds) + // Optional. Defaults to 10m if not specified + uint32 interval = 5; + + // TLS-specific parameters for connecting to a repository. Optional + PackageRepositoryTlsConfig tls_config = 6; + + // authentication parameters for connecting to a repository. Optional + PackageRepositoryAuth auth = 7; +} + // -- Start definitions of the response messages -- // PackageRepositoryReference @@ -397,3 +432,10 @@ message GetPackageRepositorySummariesResponse { // List of PackageRepositorySummary repeated PackageRepositorySummary package_repository_summaries = 1; } + +// UpdatePackageRepositoryResponse +// +// Response for UpdatePackageRepository +message UpdatePackageRepositoryResponse { + PackageRepositoryReference package_repo_ref = 1; +} \ No newline at end of file diff --git a/cmd/kubeapps-apis/proto/kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.proto b/cmd/kubeapps-apis/proto/kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.proto index c7c6e5b4c70..2236a49e8a4 100644 --- a/cmd/kubeapps-apis/proto/kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.proto +++ b/cmd/kubeapps-apis/proto/kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.proto @@ -6,6 +6,7 @@ package kubeappsapis.plugins.fluxv2.packages.v1alpha1; option go_package = "github.com/vmware-tanzu/kubeapps/cmd/kubeapps-apis/gen/plugins/fluxv2/packages/v1alpha1"; import "google/api/annotations.proto"; +import "google/protobuf/wrappers.proto"; import "kubeappsapis/core/packages/v1alpha1/packages.proto"; import "kubeappsapis/core/packages/v1alpha1/repositories.proto"; import "kubeappsapis/core/plugins/v1alpha1/plugins.proto"; @@ -100,4 +101,23 @@ service FluxV2RepositoriesService { get: "/plugins/fluxv2/packages/v1alpha1/repositories" }; } + + rpc UpdatePackageRepository(kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryRequest) returns (kubeappsapis.core.packages.v1alpha1.UpdatePackageRepositoryResponse) { + option (google.api.http) = { + put: "/plugins/fluxv2/packages/v1alpha1/repositories/plugin/{package_repo_ref.plugin.name}/{package_repo_ref.plugin.version}/c/{package_repo_ref.context.cluster}/ns/{package_repo_ref.context.namespace}/{package_repo_ref.identifier=**}" + body: "*" + }; + } + + // this endpoint only exists for the purpose of integration tests + rpc SetUserManagedSecrets(SetUserManagedSecretsRequest) returns (SetUserManagedSecretsResponse) { + } +} + +message SetUserManagedSecretsRequest { + bool value = 1; } + +message SetUserManagedSecretsResponse { + bool value = 1; +} \ No newline at end of file diff --git a/dashboard/src/gen/google/api/annotations.ts b/dashboard/src/gen/google/api/annotations.ts index 6e6ca01470c..b0b6729f484 100644 --- a/dashboard/src/gen/google/api/annotations.ts +++ b/dashboard/src/gen/google/api/annotations.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import Long from "long"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; export const protobufPackage = "google.api"; diff --git a/dashboard/src/gen/google/api/http.ts b/dashboard/src/gen/google/api/http.ts index 1cd83268bde..06d19d94ef7 100644 --- a/dashboard/src/gen/google/api/http.ts +++ b/dashboard/src/gen/google/api/http.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import Long from "long"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; export const protobufPackage = "google.api"; @@ -359,9 +359,7 @@ export interface CustomHttpPattern { path: string; } -function createBaseHttp(): Http { - return { rules: [], fullyDecodeReservedExpansion: false }; -} +const baseHttp: object = { fullyDecodeReservedExpansion: false }; export const Http = { encode(message: Http, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { @@ -377,7 +375,8 @@ export const Http = { decode(input: _m0.Reader | Uint8Array, length?: number): Http { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHttp(); + const message = { ...baseHttp } as Http; + message.rules = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -396,18 +395,32 @@ export const Http = { }, fromJSON(object: any): Http { - return { - rules: Array.isArray(object?.rules) ? object.rules.map((e: any) => HttpRule.fromJSON(e)) : [], - fullyDecodeReservedExpansion: isSet(object.fullyDecodeReservedExpansion) - ? Boolean(object.fullyDecodeReservedExpansion) - : false, - }; + const message = { ...baseHttp } as Http; + message.rules = []; + if (object.rules !== undefined && object.rules !== null) { + for (const e of object.rules) { + message.rules.push(HttpRule.fromJSON(e)); + } + } + if ( + object.fullyDecodeReservedExpansion !== undefined && + object.fullyDecodeReservedExpansion !== null + ) { + message.fullyDecodeReservedExpansion = Boolean( + object.fullyDecodeReservedExpansion + ); + } else { + message.fullyDecodeReservedExpansion = false; + } + return message; }, toJSON(message: Http): unknown { const obj: any = {}; if (message.rules) { - obj.rules = message.rules.map(e => (e ? HttpRule.toJSON(e) : undefined)); + obj.rules = message.rules.map((e) => + e ? HttpRule.toJSON(e) : undefined + ); } else { obj.rules = []; } @@ -416,31 +429,34 @@ export const Http = { return obj; }, - fromPartial, I>>(object: I): Http { - const message = createBaseHttp(); - message.rules = object.rules?.map(e => HttpRule.fromPartial(e)) || []; - message.fullyDecodeReservedExpansion = object.fullyDecodeReservedExpansion ?? false; + fromPartial(object: DeepPartial): Http { + const message = { ...baseHttp } as Http; + message.rules = []; + if (object.rules !== undefined && object.rules !== null) { + for (const e of object.rules) { + message.rules.push(HttpRule.fromPartial(e)); + } + } + if ( + object.fullyDecodeReservedExpansion !== undefined && + object.fullyDecodeReservedExpansion !== null + ) { + message.fullyDecodeReservedExpansion = + object.fullyDecodeReservedExpansion; + } else { + message.fullyDecodeReservedExpansion = false; + } return message; }, }; -function createBaseHttpRule(): HttpRule { - return { - selector: "", - get: undefined, - put: undefined, - post: undefined, - delete: undefined, - patch: undefined, - custom: undefined, - body: "", - responseBody: "", - additionalBindings: [], - }; -} +const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; export const HttpRule = { - encode(message: HttpRule, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: HttpRule, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.selector !== "") { writer.uint32(10).string(message.selector); } @@ -460,7 +476,10 @@ export const HttpRule = { writer.uint32(50).string(message.patch); } if (message.custom !== undefined) { - CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); + CustomHttpPattern.encode( + message.custom, + writer.uint32(66).fork() + ).ldelim(); } if (message.body !== "") { writer.uint32(58).string(message.body); @@ -477,7 +496,8 @@ export const HttpRule = { decode(input: _m0.Reader | Uint8Array, length?: number): HttpRule { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHttpRule(); + const message = { ...baseHttpRule } as HttpRule; + message.additionalBindings = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -509,7 +529,9 @@ export const HttpRule = { message.responseBody = reader.string(); break; case 11: - message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); + message.additionalBindings.push( + HttpRule.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -520,20 +542,62 @@ export const HttpRule = { }, fromJSON(object: any): HttpRule { - return { - selector: isSet(object.selector) ? String(object.selector) : "", - get: isSet(object.get) ? String(object.get) : undefined, - put: isSet(object.put) ? String(object.put) : undefined, - post: isSet(object.post) ? String(object.post) : undefined, - delete: isSet(object.delete) ? String(object.delete) : undefined, - patch: isSet(object.patch) ? String(object.patch) : undefined, - custom: isSet(object.custom) ? CustomHttpPattern.fromJSON(object.custom) : undefined, - body: isSet(object.body) ? String(object.body) : "", - responseBody: isSet(object.responseBody) ? String(object.responseBody) : "", - additionalBindings: Array.isArray(object?.additionalBindings) - ? object.additionalBindings.map((e: any) => HttpRule.fromJSON(e)) - : [], - }; + const message = { ...baseHttpRule } as HttpRule; + message.additionalBindings = []; + if (object.selector !== undefined && object.selector !== null) { + message.selector = String(object.selector); + } else { + message.selector = ""; + } + if (object.get !== undefined && object.get !== null) { + message.get = String(object.get); + } else { + message.get = undefined; + } + if (object.put !== undefined && object.put !== null) { + message.put = String(object.put); + } else { + message.put = undefined; + } + if (object.post !== undefined && object.post !== null) { + message.post = String(object.post); + } else { + message.post = undefined; + } + if (object.delete !== undefined && object.delete !== null) { + message.delete = String(object.delete); + } else { + message.delete = undefined; + } + if (object.patch !== undefined && object.patch !== null) { + message.patch = String(object.patch); + } else { + message.patch = undefined; + } + if (object.custom !== undefined && object.custom !== null) { + message.custom = CustomHttpPattern.fromJSON(object.custom); + } else { + message.custom = undefined; + } + if (object.body !== undefined && object.body !== null) { + message.body = String(object.body); + } else { + message.body = ""; + } + if (object.responseBody !== undefined && object.responseBody !== null) { + message.responseBody = String(object.responseBody); + } else { + message.responseBody = ""; + } + if ( + object.additionalBindings !== undefined && + object.additionalBindings !== null + ) { + for (const e of object.additionalBindings) { + message.additionalBindings.push(HttpRule.fromJSON(e)); + } + } + return message; }, toJSON(message: HttpRule): unknown { @@ -545,12 +609,15 @@ export const HttpRule = { message.delete !== undefined && (obj.delete = message.delete); message.patch !== undefined && (obj.patch = message.patch); message.custom !== undefined && - (obj.custom = message.custom ? CustomHttpPattern.toJSON(message.custom) : undefined); + (obj.custom = message.custom + ? CustomHttpPattern.toJSON(message.custom) + : undefined); message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && (obj.responseBody = message.responseBody); + message.responseBody !== undefined && + (obj.responseBody = message.responseBody); if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map(e => - e ? HttpRule.toJSON(e) : undefined, + obj.additionalBindings = message.additionalBindings.map((e) => + e ? HttpRule.toJSON(e) : undefined ); } else { obj.additionalBindings = []; @@ -558,31 +625,73 @@ export const HttpRule = { return obj; }, - fromPartial, I>>(object: I): HttpRule { - const message = createBaseHttpRule(); - message.selector = object.selector ?? ""; - message.get = object.get ?? undefined; - message.put = object.put ?? undefined; - message.post = object.post ?? undefined; - message.delete = object.delete ?? undefined; - message.patch = object.patch ?? undefined; - message.custom = - object.custom !== undefined && object.custom !== null - ? CustomHttpPattern.fromPartial(object.custom) - : undefined; - message.body = object.body ?? ""; - message.responseBody = object.responseBody ?? ""; - message.additionalBindings = object.additionalBindings?.map(e => HttpRule.fromPartial(e)) || []; + fromPartial(object: DeepPartial): HttpRule { + const message = { ...baseHttpRule } as HttpRule; + message.additionalBindings = []; + if (object.selector !== undefined && object.selector !== null) { + message.selector = object.selector; + } else { + message.selector = ""; + } + if (object.get !== undefined && object.get !== null) { + message.get = object.get; + } else { + message.get = undefined; + } + if (object.put !== undefined && object.put !== null) { + message.put = object.put; + } else { + message.put = undefined; + } + if (object.post !== undefined && object.post !== null) { + message.post = object.post; + } else { + message.post = undefined; + } + if (object.delete !== undefined && object.delete !== null) { + message.delete = object.delete; + } else { + message.delete = undefined; + } + if (object.patch !== undefined && object.patch !== null) { + message.patch = object.patch; + } else { + message.patch = undefined; + } + if (object.custom !== undefined && object.custom !== null) { + message.custom = CustomHttpPattern.fromPartial(object.custom); + } else { + message.custom = undefined; + } + if (object.body !== undefined && object.body !== null) { + message.body = object.body; + } else { + message.body = ""; + } + if (object.responseBody !== undefined && object.responseBody !== null) { + message.responseBody = object.responseBody; + } else { + message.responseBody = ""; + } + if ( + object.additionalBindings !== undefined && + object.additionalBindings !== null + ) { + for (const e of object.additionalBindings) { + message.additionalBindings.push(HttpRule.fromPartial(e)); + } + } return message; }, }; -function createBaseCustomHttpPattern(): CustomHttpPattern { - return { kind: "", path: "" }; -} +const baseCustomHttpPattern: object = { kind: "", path: "" }; export const CustomHttpPattern = { - encode(message: CustomHttpPattern, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: CustomHttpPattern, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.kind !== "") { writer.uint32(10).string(message.kind); } @@ -595,7 +704,7 @@ export const CustomHttpPattern = { decode(input: _m0.Reader | Uint8Array, length?: number): CustomHttpPattern { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCustomHttpPattern(); + const message = { ...baseCustomHttpPattern } as CustomHttpPattern; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -614,10 +723,18 @@ export const CustomHttpPattern = { }, fromJSON(object: any): CustomHttpPattern { - return { - kind: isSet(object.kind) ? String(object.kind) : "", - path: isSet(object.path) ? String(object.path) : "", - }; + const message = { ...baseCustomHttpPattern } as CustomHttpPattern; + if (object.kind !== undefined && object.kind !== null) { + message.kind = String(object.kind); + } else { + message.kind = ""; + } + if (object.path !== undefined && object.path !== null) { + message.path = String(object.path); + } else { + message.path = ""; + } + return message; }, toJSON(message: CustomHttpPattern): unknown { @@ -627,16 +744,30 @@ export const CustomHttpPattern = { return obj; }, - fromPartial, I>>(object: I): CustomHttpPattern { - const message = createBaseCustomHttpPattern(); - message.kind = object.kind ?? ""; - message.path = object.path ?? ""; + fromPartial(object: DeepPartial): CustomHttpPattern { + const message = { ...baseCustomHttpPattern } as CustomHttpPattern; + if (object.kind !== undefined && object.kind !== null) { + message.kind = object.kind; + } else { + message.kind = ""; + } + if (object.path !== undefined && object.path !== null) { + message.path = object.path; + } else { + message.path = ""; + } return message; }, }; -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array @@ -647,16 +778,7 @@ export type DeepPartial = T extends Builtin ? { [K in keyof T]?: DeepPartial } : Partial; -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record>, never>; - if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; _m0.configure(); } - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/dashboard/src/gen/google/protobuf/any.ts b/dashboard/src/gen/google/protobuf/any.ts index 10c07c66d45..9bd0cd5595e 100644 --- a/dashboard/src/gen/google/protobuf/any.ts +++ b/dashboard/src/gen/google/protobuf/any.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import Long from "long"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; export const protobufPackage = "google.protobuf"; @@ -123,9 +123,7 @@ export interface Any { value: Uint8Array; } -function createBaseAny(): Any { - return { typeUrl: "", value: new Uint8Array() }; -} +const baseAny: object = { typeUrl: "" }; export const Any = { encode(message: Any, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { @@ -141,7 +139,8 @@ export const Any = { decode(input: _m0.Reader | Uint8Array, length?: number): Any { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAny(); + const message = { ...baseAny } as Any; + message.value = new Uint8Array(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -160,24 +159,41 @@ export const Any = { }, fromJSON(object: any): Any { - return { - typeUrl: isSet(object.typeUrl) ? String(object.typeUrl) : "", - value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(), - }; + const message = { ...baseAny } as Any; + message.value = new Uint8Array(); + if (object.typeUrl !== undefined && object.typeUrl !== null) { + message.typeUrl = String(object.typeUrl); + } else { + message.typeUrl = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = bytesFromBase64(object.value); + } + return message; }, toJSON(message: Any): unknown { const obj: any = {}; message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); message.value !== undefined && - (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); + (obj.value = base64FromBytes( + message.value !== undefined ? message.value : new Uint8Array() + )); return obj; }, - fromPartial, I>>(object: I): Any { - const message = createBaseAny(); - message.typeUrl = object.typeUrl ?? ""; - message.value = object.value ?? new Uint8Array(); + fromPartial(object: DeepPartial): Any { + const message = { ...baseAny } as Any; + if (object.typeUrl !== undefined && object.typeUrl !== null) { + message.typeUrl = object.typeUrl; + } else { + message.typeUrl = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = new Uint8Array(); + } return message; }, }; @@ -194,7 +210,8 @@ var globalThis: any = (() => { })(); const atob: (b64: string) => string = - globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); + globalThis.atob || + ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -205,7 +222,8 @@ function bytesFromBase64(b64: string): Uint8Array { } const btoa: (bin: string) => string = - globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); + globalThis.btoa || + ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; for (const byte of arr) { @@ -214,8 +232,14 @@ function base64FromBytes(arr: Uint8Array): string { return btoa(bin.join("")); } -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array @@ -226,16 +250,7 @@ export type DeepPartial = T extends Builtin ? { [K in keyof T]?: DeepPartial } : Partial; -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record>, never>; - if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; _m0.configure(); } - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/dashboard/src/gen/google/protobuf/descriptor.ts b/dashboard/src/gen/google/protobuf/descriptor.ts index 572d5a7c028..fce6f9d004d 100644 --- a/dashboard/src/gen/google/protobuf/descriptor.ts +++ b/dashboard/src/gen/google/protobuf/descriptor.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import Long from "long"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; export const protobufPackage = "google.protobuf"; @@ -204,7 +204,9 @@ export enum FieldDescriptorProto_Type { UNRECOGNIZED = -1, } -export function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type { +export function fieldDescriptorProto_TypeFromJSON( + object: any +): FieldDescriptorProto_Type { switch (object) { case 1: case "TYPE_DOUBLE": @@ -267,7 +269,9 @@ export function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorP } } -export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string { +export function fieldDescriptorProto_TypeToJSON( + object: FieldDescriptorProto_Type +): string { switch (object) { case FieldDescriptorProto_Type.TYPE_DOUBLE: return "TYPE_DOUBLE"; @@ -318,7 +322,9 @@ export enum FieldDescriptorProto_Label { UNRECOGNIZED = -1, } -export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label { +export function fieldDescriptorProto_LabelFromJSON( + object: any +): FieldDescriptorProto_Label { switch (object) { case 1: case "LABEL_OPTIONAL": @@ -336,7 +342,9 @@ export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptor } } -export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string { +export function fieldDescriptorProto_LabelToJSON( + object: FieldDescriptorProto_Label +): string { switch (object) { case FieldDescriptorProto_Label.LABEL_OPTIONAL: return "LABEL_OPTIONAL"; @@ -550,7 +558,9 @@ export enum FileOptions_OptimizeMode { UNRECOGNIZED = -1, } -export function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode { +export function fileOptions_OptimizeModeFromJSON( + object: any +): FileOptions_OptimizeMode { switch (object) { case 1: case "SPEED": @@ -568,7 +578,9 @@ export function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_Optim } } -export function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string { +export function fileOptions_OptimizeModeToJSON( + object: FileOptions_OptimizeMode +): string { switch (object) { case FileOptions_OptimizeMode.SPEED: return "SPEED"; @@ -872,7 +884,7 @@ export enum MethodOptions_IdempotencyLevel { } export function methodOptions_IdempotencyLevelFromJSON( - object: any, + object: any ): MethodOptions_IdempotencyLevel { switch (object) { case 0: @@ -892,7 +904,7 @@ export function methodOptions_IdempotencyLevelFromJSON( } export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel, + object: MethodOptions_IdempotencyLevel ): string { switch (object) { case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: @@ -1116,12 +1128,13 @@ export interface GeneratedCodeInfo_Annotation { end: number; } -function createBaseFileDescriptorSet(): FileDescriptorSet { - return { file: [] }; -} +const baseFileDescriptorSet: object = {}; export const FileDescriptorSet = { - encode(message: FileDescriptorSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: FileDescriptorSet, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { for (const v of message.file) { FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -1131,12 +1144,15 @@ export const FileDescriptorSet = { decode(input: _m0.Reader | Uint8Array, length?: number): FileDescriptorSet { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileDescriptorSet(); + const message = { ...baseFileDescriptorSet } as FileDescriptorSet; + message.file = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); + message.file.push( + FileDescriptorProto.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -1147,49 +1163,54 @@ export const FileDescriptorSet = { }, fromJSON(object: any): FileDescriptorSet { - return { - file: Array.isArray(object?.file) - ? object.file.map((e: any) => FileDescriptorProto.fromJSON(e)) - : [], - }; + const message = { ...baseFileDescriptorSet } as FileDescriptorSet; + message.file = []; + if (object.file !== undefined && object.file !== null) { + for (const e of object.file) { + message.file.push(FileDescriptorProto.fromJSON(e)); + } + } + return message; }, toJSON(message: FileDescriptorSet): unknown { const obj: any = {}; if (message.file) { - obj.file = message.file.map(e => (e ? FileDescriptorProto.toJSON(e) : undefined)); + obj.file = message.file.map((e) => + e ? FileDescriptorProto.toJSON(e) : undefined + ); } else { obj.file = []; } return obj; }, - fromPartial, I>>(object: I): FileDescriptorSet { - const message = createBaseFileDescriptorSet(); - message.file = object.file?.map(e => FileDescriptorProto.fromPartial(e)) || []; + fromPartial(object: DeepPartial): FileDescriptorSet { + const message = { ...baseFileDescriptorSet } as FileDescriptorSet; + message.file = []; + if (object.file !== undefined && object.file !== null) { + for (const e of object.file) { + message.file.push(FileDescriptorProto.fromPartial(e)); + } + } return message; }, }; -function createBaseFileDescriptorProto(): FileDescriptorProto { - return { - name: "", - package: "", - dependency: [], - publicDependency: [], - weakDependency: [], - messageType: [], - enumType: [], - service: [], - extension: [], - options: undefined, - sourceCodeInfo: undefined, - syntax: "", - }; -} +const baseFileDescriptorProto: object = { + name: "", + package: "", + dependency: "", + publicDependency: 0, + weakDependency: 0, + syntax: "", +}; export const FileDescriptorProto = { - encode(message: FileDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: FileDescriptorProto, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -1225,7 +1246,10 @@ export const FileDescriptorProto = { FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); } if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); + SourceCodeInfo.encode( + message.sourceCodeInfo, + writer.uint32(74).fork() + ).ldelim(); } if (message.syntax !== "") { writer.uint32(98).string(message.syntax); @@ -1236,7 +1260,14 @@ export const FileDescriptorProto = { decode(input: _m0.Reader | Uint8Array, length?: number): FileDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileDescriptorProto(); + const message = { ...baseFileDescriptorProto } as FileDescriptorProto; + message.dependency = []; + message.publicDependency = []; + message.weakDependency = []; + message.messageType = []; + message.enumType = []; + message.service = []; + message.extension = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1270,22 +1301,33 @@ export const FileDescriptorProto = { } break; case 4: - message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); + message.messageType.push( + DescriptorProto.decode(reader, reader.uint32()) + ); break; case 5: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); + message.enumType.push( + EnumDescriptorProto.decode(reader, reader.uint32()) + ); break; case 6: - message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); + message.service.push( + ServiceDescriptorProto.decode(reader, reader.uint32()) + ); break; case 7: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); + message.extension.push( + FieldDescriptorProto.decode(reader, reader.uint32()) + ); break; case 8: message.options = FileOptions.decode(reader, reader.uint32()); break; case 9: - message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); + message.sourceCodeInfo = SourceCodeInfo.decode( + reader, + reader.uint32() + ); break; case 12: message.syntax = reader.string(); @@ -1299,36 +1341,78 @@ export const FileDescriptorProto = { }, fromJSON(object: any): FileDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - package: isSet(object.package) ? String(object.package) : "", - dependency: Array.isArray(object?.dependency) - ? object.dependency.map((e: any) => String(e)) - : [], - publicDependency: Array.isArray(object?.publicDependency) - ? object.publicDependency.map((e: any) => Number(e)) - : [], - weakDependency: Array.isArray(object?.weakDependency) - ? object.weakDependency.map((e: any) => Number(e)) - : [], - messageType: Array.isArray(object?.messageType) - ? object.messageType.map((e: any) => DescriptorProto.fromJSON(e)) - : [], - enumType: Array.isArray(object?.enumType) - ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) - : [], - service: Array.isArray(object?.service) - ? object.service.map((e: any) => ServiceDescriptorProto.fromJSON(e)) - : [], - extension: Array.isArray(object?.extension) - ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e)) - : [], - options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined, - sourceCodeInfo: isSet(object.sourceCodeInfo) - ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) - : undefined, - syntax: isSet(object.syntax) ? String(object.syntax) : "", - }; + const message = { ...baseFileDescriptorProto } as FileDescriptorProto; + message.dependency = []; + message.publicDependency = []; + message.weakDependency = []; + message.messageType = []; + message.enumType = []; + message.service = []; + message.extension = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.package !== undefined && object.package !== null) { + message.package = String(object.package); + } else { + message.package = ""; + } + if (object.dependency !== undefined && object.dependency !== null) { + for (const e of object.dependency) { + message.dependency.push(String(e)); + } + } + if ( + object.publicDependency !== undefined && + object.publicDependency !== null + ) { + for (const e of object.publicDependency) { + message.publicDependency.push(Number(e)); + } + } + if (object.weakDependency !== undefined && object.weakDependency !== null) { + for (const e of object.weakDependency) { + message.weakDependency.push(Number(e)); + } + } + if (object.messageType !== undefined && object.messageType !== null) { + for (const e of object.messageType) { + message.messageType.push(DescriptorProto.fromJSON(e)); + } + } + if (object.enumType !== undefined && object.enumType !== null) { + for (const e of object.enumType) { + message.enumType.push(EnumDescriptorProto.fromJSON(e)); + } + } + if (object.service !== undefined && object.service !== null) { + for (const e of object.service) { + message.service.push(ServiceDescriptorProto.fromJSON(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = FileOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { + message.sourceCodeInfo = SourceCodeInfo.fromJSON(object.sourceCodeInfo); + } else { + message.sourceCodeInfo = undefined; + } + if (object.syntax !== undefined && object.syntax !== null) { + message.syntax = String(object.syntax); + } else { + message.syntax = ""; + } + return message; }, toJSON(message: FileDescriptorProto): unknown { @@ -1336,42 +1420,52 @@ export const FileDescriptorProto = { message.name !== undefined && (obj.name = message.name); message.package !== undefined && (obj.package = message.package); if (message.dependency) { - obj.dependency = message.dependency.map(e => e); + obj.dependency = message.dependency.map((e) => e); } else { obj.dependency = []; } if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map(e => Math.round(e)); + obj.publicDependency = message.publicDependency.map((e) => e); } else { obj.publicDependency = []; } if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map(e => Math.round(e)); + obj.weakDependency = message.weakDependency.map((e) => e); } else { obj.weakDependency = []; } if (message.messageType) { - obj.messageType = message.messageType.map(e => (e ? DescriptorProto.toJSON(e) : undefined)); + obj.messageType = message.messageType.map((e) => + e ? DescriptorProto.toJSON(e) : undefined + ); } else { obj.messageType = []; } if (message.enumType) { - obj.enumType = message.enumType.map(e => (e ? EnumDescriptorProto.toJSON(e) : undefined)); + obj.enumType = message.enumType.map((e) => + e ? EnumDescriptorProto.toJSON(e) : undefined + ); } else { obj.enumType = []; } if (message.service) { - obj.service = message.service.map(e => (e ? ServiceDescriptorProto.toJSON(e) : undefined)); + obj.service = message.service.map((e) => + e ? ServiceDescriptorProto.toJSON(e) : undefined + ); } else { obj.service = []; } if (message.extension) { - obj.extension = message.extension.map(e => (e ? FieldDescriptorProto.toJSON(e) : undefined)); + obj.extension = message.extension.map((e) => + e ? FieldDescriptorProto.toJSON(e) : undefined + ); } else { obj.extension = []; } message.options !== undefined && - (obj.options = message.options ? FileOptions.toJSON(message.options) : undefined); + (obj.options = message.options + ? FileOptions.toJSON(message.options) + : undefined); message.sourceCodeInfo !== undefined && (obj.sourceCodeInfo = message.sourceCodeInfo ? SourceCodeInfo.toJSON(message.sourceCodeInfo) @@ -1380,49 +1474,91 @@ export const FileDescriptorProto = { return obj; }, - fromPartial, I>>( - object: I, - ): FileDescriptorProto { - const message = createBaseFileDescriptorProto(); - message.name = object.name ?? ""; - message.package = object.package ?? ""; - message.dependency = object.dependency?.map(e => e) || []; - message.publicDependency = object.publicDependency?.map(e => e) || []; - message.weakDependency = object.weakDependency?.map(e => e) || []; - message.messageType = object.messageType?.map(e => DescriptorProto.fromPartial(e)) || []; - message.enumType = object.enumType?.map(e => EnumDescriptorProto.fromPartial(e)) || []; - message.service = object.service?.map(e => ServiceDescriptorProto.fromPartial(e)) || []; - message.extension = object.extension?.map(e => FieldDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null - ? FileOptions.fromPartial(object.options) - : undefined; - message.sourceCodeInfo = - object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null - ? SourceCodeInfo.fromPartial(object.sourceCodeInfo) - : undefined; - message.syntax = object.syntax ?? ""; + fromPartial(object: DeepPartial): FileDescriptorProto { + const message = { ...baseFileDescriptorProto } as FileDescriptorProto; + message.dependency = []; + message.publicDependency = []; + message.weakDependency = []; + message.messageType = []; + message.enumType = []; + message.service = []; + message.extension = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.package !== undefined && object.package !== null) { + message.package = object.package; + } else { + message.package = ""; + } + if (object.dependency !== undefined && object.dependency !== null) { + for (const e of object.dependency) { + message.dependency.push(e); + } + } + if ( + object.publicDependency !== undefined && + object.publicDependency !== null + ) { + for (const e of object.publicDependency) { + message.publicDependency.push(e); + } + } + if (object.weakDependency !== undefined && object.weakDependency !== null) { + for (const e of object.weakDependency) { + message.weakDependency.push(e); + } + } + if (object.messageType !== undefined && object.messageType !== null) { + for (const e of object.messageType) { + message.messageType.push(DescriptorProto.fromPartial(e)); + } + } + if (object.enumType !== undefined && object.enumType !== null) { + for (const e of object.enumType) { + message.enumType.push(EnumDescriptorProto.fromPartial(e)); + } + } + if (object.service !== undefined && object.service !== null) { + for (const e of object.service) { + message.service.push(ServiceDescriptorProto.fromPartial(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = FileOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { + message.sourceCodeInfo = SourceCodeInfo.fromPartial( + object.sourceCodeInfo + ); + } else { + message.sourceCodeInfo = undefined; + } + if (object.syntax !== undefined && object.syntax !== null) { + message.syntax = object.syntax; + } else { + message.syntax = ""; + } return message; }, }; -function createBaseDescriptorProto(): DescriptorProto { - return { - name: "", - field: [], - extension: [], - nestedType: [], - enumType: [], - extensionRange: [], - oneofDecl: [], - options: undefined, - reservedRange: [], - reservedName: [], - }; -} +const baseDescriptorProto: object = { name: "", reservedName: "" }; export const DescriptorProto = { - encode(message: DescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: DescriptorProto, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -1439,7 +1575,10 @@ export const DescriptorProto = { EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); } for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode(v!, writer.uint32(42).fork()).ldelim(); + DescriptorProto_ExtensionRange.encode( + v!, + writer.uint32(42).fork() + ).ldelim(); } for (const v of message.oneofDecl) { OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); @@ -1448,7 +1587,10 @@ export const DescriptorProto = { MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); } for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode(v!, writer.uint32(74).fork()).ldelim(); + DescriptorProto_ReservedRange.encode( + v!, + writer.uint32(74).fork() + ).ldelim(); } for (const v of message.reservedName) { writer.uint32(82).string(v!); @@ -1459,7 +1601,15 @@ export const DescriptorProto = { decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDescriptorProto(); + const message = { ...baseDescriptorProto } as DescriptorProto; + message.field = []; + message.extension = []; + message.nestedType = []; + message.enumType = []; + message.extensionRange = []; + message.oneofDecl = []; + message.reservedRange = []; + message.reservedName = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1467,30 +1617,42 @@ export const DescriptorProto = { message.name = reader.string(); break; case 2: - message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); + message.field.push( + FieldDescriptorProto.decode(reader, reader.uint32()) + ); break; case 6: - message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); + message.extension.push( + FieldDescriptorProto.decode(reader, reader.uint32()) + ); break; case 3: - message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); + message.nestedType.push( + DescriptorProto.decode(reader, reader.uint32()) + ); break; case 4: - message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); + message.enumType.push( + EnumDescriptorProto.decode(reader, reader.uint32()) + ); break; case 5: message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()), + DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) ); break; case 8: - message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); + message.oneofDecl.push( + OneofDescriptorProto.decode(reader, reader.uint32()) + ); break; case 7: message.options = MessageOptions.decode(reader, reader.uint32()); break; case 9: - message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); + message.reservedRange.push( + DescriptorProto_ReservedRange.decode(reader, reader.uint32()) + ); break; case 10: message.reservedName.push(reader.string()); @@ -1504,117 +1666,206 @@ export const DescriptorProto = { }, fromJSON(object: any): DescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - field: Array.isArray(object?.field) - ? object.field.map((e: any) => FieldDescriptorProto.fromJSON(e)) - : [], - extension: Array.isArray(object?.extension) - ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e)) - : [], - nestedType: Array.isArray(object?.nestedType) - ? object.nestedType.map((e: any) => DescriptorProto.fromJSON(e)) - : [], - enumType: Array.isArray(object?.enumType) - ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) - : [], - extensionRange: Array.isArray(object?.extensionRange) - ? object.extensionRange.map((e: any) => DescriptorProto_ExtensionRange.fromJSON(e)) - : [], - oneofDecl: Array.isArray(object?.oneofDecl) - ? object.oneofDecl.map((e: any) => OneofDescriptorProto.fromJSON(e)) - : [], - options: isSet(object.options) ? MessageOptions.fromJSON(object.options) : undefined, - reservedRange: Array.isArray(object?.reservedRange) - ? object.reservedRange.map((e: any) => DescriptorProto_ReservedRange.fromJSON(e)) - : [], - reservedName: Array.isArray(object?.reservedName) - ? object.reservedName.map((e: any) => String(e)) - : [], - }; + const message = { ...baseDescriptorProto } as DescriptorProto; + message.field = []; + message.extension = []; + message.nestedType = []; + message.enumType = []; + message.extensionRange = []; + message.oneofDecl = []; + message.reservedRange = []; + message.reservedName = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.field !== undefined && object.field !== null) { + for (const e of object.field) { + message.field.push(FieldDescriptorProto.fromJSON(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromJSON(e)); + } + } + if (object.nestedType !== undefined && object.nestedType !== null) { + for (const e of object.nestedType) { + message.nestedType.push(DescriptorProto.fromJSON(e)); + } + } + if (object.enumType !== undefined && object.enumType !== null) { + for (const e of object.enumType) { + message.enumType.push(EnumDescriptorProto.fromJSON(e)); + } + } + if (object.extensionRange !== undefined && object.extensionRange !== null) { + for (const e of object.extensionRange) { + message.extensionRange.push(DescriptorProto_ExtensionRange.fromJSON(e)); + } + } + if (object.oneofDecl !== undefined && object.oneofDecl !== null) { + for (const e of object.oneofDecl) { + message.oneofDecl.push(OneofDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = MessageOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if (object.reservedRange !== undefined && object.reservedRange !== null) { + for (const e of object.reservedRange) { + message.reservedRange.push(DescriptorProto_ReservedRange.fromJSON(e)); + } + } + if (object.reservedName !== undefined && object.reservedName !== null) { + for (const e of object.reservedName) { + message.reservedName.push(String(e)); + } + } + return message; }, toJSON(message: DescriptorProto): unknown { const obj: any = {}; message.name !== undefined && (obj.name = message.name); if (message.field) { - obj.field = message.field.map(e => (e ? FieldDescriptorProto.toJSON(e) : undefined)); + obj.field = message.field.map((e) => + e ? FieldDescriptorProto.toJSON(e) : undefined + ); } else { obj.field = []; } if (message.extension) { - obj.extension = message.extension.map(e => (e ? FieldDescriptorProto.toJSON(e) : undefined)); + obj.extension = message.extension.map((e) => + e ? FieldDescriptorProto.toJSON(e) : undefined + ); } else { obj.extension = []; } if (message.nestedType) { - obj.nestedType = message.nestedType.map(e => (e ? DescriptorProto.toJSON(e) : undefined)); + obj.nestedType = message.nestedType.map((e) => + e ? DescriptorProto.toJSON(e) : undefined + ); } else { obj.nestedType = []; } if (message.enumType) { - obj.enumType = message.enumType.map(e => (e ? EnumDescriptorProto.toJSON(e) : undefined)); + obj.enumType = message.enumType.map((e) => + e ? EnumDescriptorProto.toJSON(e) : undefined + ); } else { obj.enumType = []; } if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map(e => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined, + obj.extensionRange = message.extensionRange.map((e) => + e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined ); } else { obj.extensionRange = []; } if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map(e => (e ? OneofDescriptorProto.toJSON(e) : undefined)); + obj.oneofDecl = message.oneofDecl.map((e) => + e ? OneofDescriptorProto.toJSON(e) : undefined + ); } else { obj.oneofDecl = []; } message.options !== undefined && - (obj.options = message.options ? MessageOptions.toJSON(message.options) : undefined); + (obj.options = message.options + ? MessageOptions.toJSON(message.options) + : undefined); if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map(e => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined, + obj.reservedRange = message.reservedRange.map((e) => + e ? DescriptorProto_ReservedRange.toJSON(e) : undefined ); } else { obj.reservedRange = []; } if (message.reservedName) { - obj.reservedName = message.reservedName.map(e => e); + obj.reservedName = message.reservedName.map((e) => e); } else { obj.reservedName = []; } return obj; }, - fromPartial, I>>(object: I): DescriptorProto { - const message = createBaseDescriptorProto(); - message.name = object.name ?? ""; - message.field = object.field?.map(e => FieldDescriptorProto.fromPartial(e)) || []; - message.extension = object.extension?.map(e => FieldDescriptorProto.fromPartial(e)) || []; - message.nestedType = object.nestedType?.map(e => DescriptorProto.fromPartial(e)) || []; - message.enumType = object.enumType?.map(e => EnumDescriptorProto.fromPartial(e)) || []; - message.extensionRange = - object.extensionRange?.map(e => DescriptorProto_ExtensionRange.fromPartial(e)) || []; - message.oneofDecl = object.oneofDecl?.map(e => OneofDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null - ? MessageOptions.fromPartial(object.options) - : undefined; - message.reservedRange = - object.reservedRange?.map(e => DescriptorProto_ReservedRange.fromPartial(e)) || []; - message.reservedName = object.reservedName?.map(e => e) || []; + fromPartial(object: DeepPartial): DescriptorProto { + const message = { ...baseDescriptorProto } as DescriptorProto; + message.field = []; + message.extension = []; + message.nestedType = []; + message.enumType = []; + message.extensionRange = []; + message.oneofDecl = []; + message.reservedRange = []; + message.reservedName = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.field !== undefined && object.field !== null) { + for (const e of object.field) { + message.field.push(FieldDescriptorProto.fromPartial(e)); + } + } + if (object.extension !== undefined && object.extension !== null) { + for (const e of object.extension) { + message.extension.push(FieldDescriptorProto.fromPartial(e)); + } + } + if (object.nestedType !== undefined && object.nestedType !== null) { + for (const e of object.nestedType) { + message.nestedType.push(DescriptorProto.fromPartial(e)); + } + } + if (object.enumType !== undefined && object.enumType !== null) { + for (const e of object.enumType) { + message.enumType.push(EnumDescriptorProto.fromPartial(e)); + } + } + if (object.extensionRange !== undefined && object.extensionRange !== null) { + for (const e of object.extensionRange) { + message.extensionRange.push( + DescriptorProto_ExtensionRange.fromPartial(e) + ); + } + } + if (object.oneofDecl !== undefined && object.oneofDecl !== null) { + for (const e of object.oneofDecl) { + message.oneofDecl.push(OneofDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = MessageOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if (object.reservedRange !== undefined && object.reservedRange !== null) { + for (const e of object.reservedRange) { + message.reservedRange.push( + DescriptorProto_ReservedRange.fromPartial(e) + ); + } + } + if (object.reservedName !== undefined && object.reservedName !== null) { + for (const e of object.reservedName) { + message.reservedName.push(e); + } + } return message; }, }; -function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRange { - return { start: 0, end: 0, options: undefined }; -} +const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; export const DescriptorProto_ExtensionRange = { encode( message: DescriptorProto_ExtensionRange, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.start !== 0) { writer.uint32(8).int32(message.start); @@ -1623,15 +1874,23 @@ export const DescriptorProto_ExtensionRange = { writer.uint32(16).int32(message.end); } if (message.options !== undefined) { - ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); + ExtensionRangeOptions.encode( + message.options, + writer.uint32(26).fork() + ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): DescriptorProto_ExtensionRange { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDescriptorProto_ExtensionRange(); + const message = { + ...baseDescriptorProto_ExtensionRange, + } as DescriptorProto_ExtensionRange; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1642,7 +1901,10 @@ export const DescriptorProto_ExtensionRange = { message.end = reader.int32(); break; case 3: - message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); + message.options = ExtensionRangeOptions.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1653,44 +1915,69 @@ export const DescriptorProto_ExtensionRange = { }, fromJSON(object: any): DescriptorProto_ExtensionRange { - return { - start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0, - options: isSet(object.options) ? ExtensionRangeOptions.fromJSON(object.options) : undefined, - }; + const message = { + ...baseDescriptorProto_ExtensionRange, + } as DescriptorProto_ExtensionRange; + if (object.start !== undefined && object.start !== null) { + message.start = Number(object.start); + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = ExtensionRangeOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; }, toJSON(message: DescriptorProto_ExtensionRange): unknown { const obj: any = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); + message.start !== undefined && (obj.start = message.start); + message.end !== undefined && (obj.end = message.end); message.options !== undefined && - (obj.options = message.options ? ExtensionRangeOptions.toJSON(message.options) : undefined); + (obj.options = message.options + ? ExtensionRangeOptions.toJSON(message.options) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): DescriptorProto_ExtensionRange { - const message = createBaseDescriptorProto_ExtensionRange(); - message.start = object.start ?? 0; - message.end = object.end ?? 0; - message.options = - object.options !== undefined && object.options !== null - ? ExtensionRangeOptions.fromPartial(object.options) - : undefined; + const message = { + ...baseDescriptorProto_ExtensionRange, + } as DescriptorProto_ExtensionRange; + if (object.start !== undefined && object.start !== null) { + message.start = object.start; + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = ExtensionRangeOptions.fromPartial(object.options); + } else { + message.options = undefined; + } return message; }, }; -function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange { - return { start: 0, end: 0 }; -} +const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; export const DescriptorProto_ReservedRange = { encode( message: DescriptorProto_ReservedRange, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.start !== 0) { writer.uint32(8).int32(message.start); @@ -1701,10 +1988,15 @@ export const DescriptorProto_ReservedRange = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): DescriptorProto_ReservedRange { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDescriptorProto_ReservedRange(); + const message = { + ...baseDescriptorProto_ReservedRange, + } as DescriptorProto_ReservedRange; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1723,50 +2015,77 @@ export const DescriptorProto_ReservedRange = { }, fromJSON(object: any): DescriptorProto_ReservedRange { - return { - start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0, - }; + const message = { + ...baseDescriptorProto_ReservedRange, + } as DescriptorProto_ReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = Number(object.start); + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + return message; }, toJSON(message: DescriptorProto_ReservedRange): unknown { const obj: any = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); + message.start !== undefined && (obj.start = message.start); + message.end !== undefined && (obj.end = message.end); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): DescriptorProto_ReservedRange { - const message = createBaseDescriptorProto_ReservedRange(); - message.start = object.start ?? 0; - message.end = object.end ?? 0; + const message = { + ...baseDescriptorProto_ReservedRange, + } as DescriptorProto_ReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = object.start; + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } return message; }, }; -function createBaseExtensionRangeOptions(): ExtensionRangeOptions { - return { uninterpretedOption: [] }; -} +const baseExtensionRangeOptions: object = {}; export const ExtensionRangeOptions = { - encode(message: ExtensionRangeOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: ExtensionRangeOptions, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): ExtensionRangeOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExtensionRangeOptions(); + const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; + message.uninterpretedOption = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + message.uninterpretedOption.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -1777,18 +2096,24 @@ export const ExtensionRangeOptions = { }, fromJSON(object: any): ExtensionRangeOptions { - return { - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; + const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; + message.uninterpretedOption = []; + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); + } + } + return message; }, toJSON(message: ExtensionRangeOptions): unknown { const obj: any = {}; if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => - e ? UninterpretedOption.toJSON(e) : undefined, + obj.uninterpretedOption = message.uninterpretedOption.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined ); } else { obj.uninterpretedOption = []; @@ -1796,34 +2121,41 @@ export const ExtensionRangeOptions = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): ExtensionRangeOptions { - const message = createBaseExtensionRangeOptions(); - message.uninterpretedOption = - object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; + message.uninterpretedOption = []; + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); + } + } return message; }, }; -function createBaseFieldDescriptorProto(): FieldDescriptorProto { - return { - name: "", - number: 0, - label: 1, - type: 1, - typeName: "", - extendee: "", - defaultValue: "", - oneofIndex: 0, - jsonName: "", - options: undefined, - proto3Optional: false, - }; -} +const baseFieldDescriptorProto: object = { + name: "", + number: 0, + label: 1, + type: 1, + typeName: "", + extendee: "", + defaultValue: "", + oneofIndex: 0, + jsonName: "", + proto3Optional: false, +}; export const FieldDescriptorProto = { - encode(message: FieldDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: FieldDescriptorProto, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -1860,10 +2192,13 @@ export const FieldDescriptorProto = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): FieldDescriptorProto { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): FieldDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFieldDescriptorProto(); + const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1909,66 +2244,156 @@ export const FieldDescriptorProto = { }, fromJSON(object: any): FieldDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - number: isSet(object.number) ? Number(object.number) : 0, - label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : 1, - type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : 1, - typeName: isSet(object.typeName) ? String(object.typeName) : "", - extendee: isSet(object.extendee) ? String(object.extendee) : "", - defaultValue: isSet(object.defaultValue) ? String(object.defaultValue) : "", - oneofIndex: isSet(object.oneofIndex) ? Number(object.oneofIndex) : 0, - jsonName: isSet(object.jsonName) ? String(object.jsonName) : "", - options: isSet(object.options) ? FieldOptions.fromJSON(object.options) : undefined, - proto3Optional: isSet(object.proto3Optional) ? Boolean(object.proto3Optional) : false, - }; + const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = Number(object.number); + } else { + message.number = 0; + } + if (object.label !== undefined && object.label !== null) { + message.label = fieldDescriptorProto_LabelFromJSON(object.label); + } else { + message.label = 1; + } + if (object.type !== undefined && object.type !== null) { + message.type = fieldDescriptorProto_TypeFromJSON(object.type); + } else { + message.type = 1; + } + if (object.typeName !== undefined && object.typeName !== null) { + message.typeName = String(object.typeName); + } else { + message.typeName = ""; + } + if (object.extendee !== undefined && object.extendee !== null) { + message.extendee = String(object.extendee); + } else { + message.extendee = ""; + } + if (object.defaultValue !== undefined && object.defaultValue !== null) { + message.defaultValue = String(object.defaultValue); + } else { + message.defaultValue = ""; + } + if (object.oneofIndex !== undefined && object.oneofIndex !== null) { + message.oneofIndex = Number(object.oneofIndex); + } else { + message.oneofIndex = 0; + } + if (object.jsonName !== undefined && object.jsonName !== null) { + message.jsonName = String(object.jsonName); + } else { + message.jsonName = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = FieldOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if (object.proto3Optional !== undefined && object.proto3Optional !== null) { + message.proto3Optional = Boolean(object.proto3Optional); + } else { + message.proto3Optional = false; + } + return message; }, toJSON(message: FieldDescriptorProto): unknown { const obj: any = {}; message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = Math.round(message.number)); - message.label !== undefined && (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); + message.number !== undefined && (obj.number = message.number); + message.label !== undefined && + (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); + message.type !== undefined && + (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); message.typeName !== undefined && (obj.typeName = message.typeName); message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue); - message.oneofIndex !== undefined && (obj.oneofIndex = Math.round(message.oneofIndex)); + message.defaultValue !== undefined && + (obj.defaultValue = message.defaultValue); + message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); message.jsonName !== undefined && (obj.jsonName = message.jsonName); message.options !== undefined && - (obj.options = message.options ? FieldOptions.toJSON(message.options) : undefined); - message.proto3Optional !== undefined && (obj.proto3Optional = message.proto3Optional); + (obj.options = message.options + ? FieldOptions.toJSON(message.options) + : undefined); + message.proto3Optional !== undefined && + (obj.proto3Optional = message.proto3Optional); return obj; }, - fromPartial, I>>( - object: I, - ): FieldDescriptorProto { - const message = createBaseFieldDescriptorProto(); - message.name = object.name ?? ""; - message.number = object.number ?? 0; - message.label = object.label ?? 1; - message.type = object.type ?? 1; - message.typeName = object.typeName ?? ""; - message.extendee = object.extendee ?? ""; - message.defaultValue = object.defaultValue ?? ""; - message.oneofIndex = object.oneofIndex ?? 0; - message.jsonName = object.jsonName ?? ""; - message.options = - object.options !== undefined && object.options !== null - ? FieldOptions.fromPartial(object.options) - : undefined; - message.proto3Optional = object.proto3Optional ?? false; + fromPartial(object: DeepPartial): FieldDescriptorProto { + const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = object.number; + } else { + message.number = 0; + } + if (object.label !== undefined && object.label !== null) { + message.label = object.label; + } else { + message.label = 1; + } + if (object.type !== undefined && object.type !== null) { + message.type = object.type; + } else { + message.type = 1; + } + if (object.typeName !== undefined && object.typeName !== null) { + message.typeName = object.typeName; + } else { + message.typeName = ""; + } + if (object.extendee !== undefined && object.extendee !== null) { + message.extendee = object.extendee; + } else { + message.extendee = ""; + } + if (object.defaultValue !== undefined && object.defaultValue !== null) { + message.defaultValue = object.defaultValue; + } else { + message.defaultValue = ""; + } + if (object.oneofIndex !== undefined && object.oneofIndex !== null) { + message.oneofIndex = object.oneofIndex; + } else { + message.oneofIndex = 0; + } + if (object.jsonName !== undefined && object.jsonName !== null) { + message.jsonName = object.jsonName; + } else { + message.jsonName = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = FieldOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if (object.proto3Optional !== undefined && object.proto3Optional !== null) { + message.proto3Optional = object.proto3Optional; + } else { + message.proto3Optional = false; + } return message; }, }; -function createBaseOneofDescriptorProto(): OneofDescriptorProto { - return { name: "", options: undefined }; -} +const baseOneofDescriptorProto: object = { name: "" }; export const OneofDescriptorProto = { - encode(message: OneofDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: OneofDescriptorProto, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -1978,10 +2403,13 @@ export const OneofDescriptorProto = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): OneofDescriptorProto { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): OneofDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOneofDescriptorProto(); + const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2000,45 +2428,53 @@ export const OneofDescriptorProto = { }, fromJSON(object: any): OneofDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - options: isSet(object.options) ? OneofOptions.fromJSON(object.options) : undefined, - }; + const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = OneofOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; }, toJSON(message: OneofDescriptorProto): unknown { const obj: any = {}; message.name !== undefined && (obj.name = message.name); message.options !== undefined && - (obj.options = message.options ? OneofOptions.toJSON(message.options) : undefined); + (obj.options = message.options + ? OneofOptions.toJSON(message.options) + : undefined); return obj; }, - fromPartial, I>>( - object: I, - ): OneofDescriptorProto { - const message = createBaseOneofDescriptorProto(); - message.name = object.name ?? ""; - message.options = - object.options !== undefined && object.options !== null - ? OneofOptions.fromPartial(object.options) - : undefined; + fromPartial(object: DeepPartial): OneofDescriptorProto { + const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = OneofOptions.fromPartial(object.options); + } else { + message.options = undefined; + } return message; }, }; -function createBaseEnumDescriptorProto(): EnumDescriptorProto { - return { - name: "", - value: [], - options: undefined, - reservedRange: [], - reservedName: [], - }; -} +const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; export const EnumDescriptorProto = { - encode(message: EnumDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: EnumDescriptorProto, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2049,7 +2485,10 @@ export const EnumDescriptorProto = { EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); } for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode(v!, writer.uint32(34).fork()).ldelim(); + EnumDescriptorProto_EnumReservedRange.encode( + v!, + writer.uint32(34).fork() + ).ldelim(); } for (const v of message.reservedName) { writer.uint32(42).string(v!); @@ -2060,7 +2499,10 @@ export const EnumDescriptorProto = { decode(input: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumDescriptorProto(); + const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; + message.value = []; + message.reservedRange = []; + message.reservedName = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2068,14 +2510,19 @@ export const EnumDescriptorProto = { message.name = reader.string(); break; case 2: - message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); + message.value.push( + EnumValueDescriptorProto.decode(reader, reader.uint32()) + ); break; case 3: message.options = EnumOptions.decode(reader, reader.uint32()); break; case 4: message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32()), + EnumDescriptorProto_EnumReservedRange.decode( + reader, + reader.uint32() + ) ); break; case 5: @@ -2090,71 +2537,111 @@ export const EnumDescriptorProto = { }, fromJSON(object: any): EnumDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - value: Array.isArray(object?.value) - ? object.value.map((e: any) => EnumValueDescriptorProto.fromJSON(e)) - : [], - options: isSet(object.options) ? EnumOptions.fromJSON(object.options) : undefined, - reservedRange: Array.isArray(object?.reservedRange) - ? object.reservedRange.map((e: any) => EnumDescriptorProto_EnumReservedRange.fromJSON(e)) - : [], - reservedName: Array.isArray(object?.reservedName) - ? object.reservedName.map((e: any) => String(e)) - : [], - }; + const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; + message.value = []; + message.reservedRange = []; + message.reservedName = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.value !== undefined && object.value !== null) { + for (const e of object.value) { + message.value.push(EnumValueDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if (object.reservedRange !== undefined && object.reservedRange !== null) { + for (const e of object.reservedRange) { + message.reservedRange.push( + EnumDescriptorProto_EnumReservedRange.fromJSON(e) + ); + } + } + if (object.reservedName !== undefined && object.reservedName !== null) { + for (const e of object.reservedName) { + message.reservedName.push(String(e)); + } + } + return message; }, toJSON(message: EnumDescriptorProto): unknown { const obj: any = {}; message.name !== undefined && (obj.name = message.name); if (message.value) { - obj.value = message.value.map(e => (e ? EnumValueDescriptorProto.toJSON(e) : undefined)); + obj.value = message.value.map((e) => + e ? EnumValueDescriptorProto.toJSON(e) : undefined + ); } else { obj.value = []; } message.options !== undefined && - (obj.options = message.options ? EnumOptions.toJSON(message.options) : undefined); + (obj.options = message.options + ? EnumOptions.toJSON(message.options) + : undefined); if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map(e => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined, + obj.reservedRange = message.reservedRange.map((e) => + e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined ); } else { obj.reservedRange = []; } if (message.reservedName) { - obj.reservedName = message.reservedName.map(e => e); + obj.reservedName = message.reservedName.map((e) => e); } else { obj.reservedName = []; } return obj; }, - fromPartial, I>>( - object: I, - ): EnumDescriptorProto { - const message = createBaseEnumDescriptorProto(); - message.name = object.name ?? ""; - message.value = object.value?.map(e => EnumValueDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null - ? EnumOptions.fromPartial(object.options) - : undefined; - message.reservedRange = - object.reservedRange?.map(e => EnumDescriptorProto_EnumReservedRange.fromPartial(e)) || []; - message.reservedName = object.reservedName?.map(e => e) || []; + fromPartial(object: DeepPartial): EnumDescriptorProto { + const message = { ...baseEnumDescriptorProto } as EnumDescriptorProto; + message.value = []; + message.reservedRange = []; + message.reservedName = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.value !== undefined && object.value !== null) { + for (const e of object.value) { + message.value.push(EnumValueDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if (object.reservedRange !== undefined && object.reservedRange !== null) { + for (const e of object.reservedRange) { + message.reservedRange.push( + EnumDescriptorProto_EnumReservedRange.fromPartial(e) + ); + } + } + if (object.reservedName !== undefined && object.reservedName !== null) { + for (const e of object.reservedName) { + message.reservedName.push(e); + } + } return message; }, }; -function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_EnumReservedRange { - return { start: 0, end: 0 }; -} +const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; export const EnumDescriptorProto_EnumReservedRange = { encode( message: EnumDescriptorProto_EnumReservedRange, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.start !== 0) { writer.uint32(8).int32(message.start); @@ -2165,10 +2652,15 @@ export const EnumDescriptorProto_EnumReservedRange = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): EnumDescriptorProto_EnumReservedRange { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumDescriptorProto_EnumReservedRange(); + const message = { + ...baseEnumDescriptorProto_EnumReservedRange, + } as EnumDescriptorProto_EnumReservedRange; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2187,35 +2679,56 @@ export const EnumDescriptorProto_EnumReservedRange = { }, fromJSON(object: any): EnumDescriptorProto_EnumReservedRange { - return { - start: isSet(object.start) ? Number(object.start) : 0, - end: isSet(object.end) ? Number(object.end) : 0, - }; + const message = { + ...baseEnumDescriptorProto_EnumReservedRange, + } as EnumDescriptorProto_EnumReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = Number(object.start); + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + return message; }, toJSON(message: EnumDescriptorProto_EnumReservedRange): unknown { const obj: any = {}; - message.start !== undefined && (obj.start = Math.round(message.start)); - message.end !== undefined && (obj.end = Math.round(message.end)); + message.start !== undefined && (obj.start = message.start); + message.end !== undefined && (obj.end = message.end); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): EnumDescriptorProto_EnumReservedRange { - const message = createBaseEnumDescriptorProto_EnumReservedRange(); - message.start = object.start ?? 0; - message.end = object.end ?? 0; + const message = { + ...baseEnumDescriptorProto_EnumReservedRange, + } as EnumDescriptorProto_EnumReservedRange; + if (object.start !== undefined && object.start !== null) { + message.start = object.start; + } else { + message.start = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } return message; }, }; -function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto { - return { name: "", number: 0, options: undefined }; -} +const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; export const EnumValueDescriptorProto = { - encode(message: EnumValueDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: EnumValueDescriptorProto, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2223,15 +2736,23 @@ export const EnumValueDescriptorProto = { writer.uint32(16).int32(message.number); } if (message.options !== undefined) { - EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); + EnumValueOptions.encode( + message.options, + writer.uint32(26).fork() + ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): EnumValueDescriptorProto { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): EnumValueDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumValueDescriptorProto(); + const message = { + ...baseEnumValueDescriptorProto, + } as EnumValueDescriptorProto; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2253,42 +2774,70 @@ export const EnumValueDescriptorProto = { }, fromJSON(object: any): EnumValueDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - number: isSet(object.number) ? Number(object.number) : 0, - options: isSet(object.options) ? EnumValueOptions.fromJSON(object.options) : undefined, - }; + const message = { + ...baseEnumValueDescriptorProto, + } as EnumValueDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = Number(object.number); + } else { + message.number = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumValueOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; }, toJSON(message: EnumValueDescriptorProto): unknown { const obj: any = {}; message.name !== undefined && (obj.name = message.name); - message.number !== undefined && (obj.number = Math.round(message.number)); + message.number !== undefined && (obj.number = message.number); message.options !== undefined && - (obj.options = message.options ? EnumValueOptions.toJSON(message.options) : undefined); + (obj.options = message.options + ? EnumValueOptions.toJSON(message.options) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): EnumValueDescriptorProto { - const message = createBaseEnumValueDescriptorProto(); - message.name = object.name ?? ""; - message.number = object.number ?? 0; - message.options = - object.options !== undefined && object.options !== null - ? EnumValueOptions.fromPartial(object.options) - : undefined; + const message = { + ...baseEnumValueDescriptorProto, + } as EnumValueDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.number !== undefined && object.number !== null) { + message.number = object.number; + } else { + message.number = 0; + } + if (object.options !== undefined && object.options !== null) { + message.options = EnumValueOptions.fromPartial(object.options); + } else { + message.options = undefined; + } return message; }, }; -function createBaseServiceDescriptorProto(): ServiceDescriptorProto { - return { name: "", method: [], options: undefined }; -} +const baseServiceDescriptorProto: object = { name: "" }; export const ServiceDescriptorProto = { - encode(message: ServiceDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: ServiceDescriptorProto, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2301,10 +2850,14 @@ export const ServiceDescriptorProto = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): ServiceDescriptorProto { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): ServiceDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseServiceDescriptorProto(); + const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; + message.method = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2312,7 +2865,9 @@ export const ServiceDescriptorProto = { message.name = reader.string(); break; case 2: - message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); + message.method.push( + MethodDescriptorProto.decode(reader, reader.uint32()) + ); break; case 3: message.options = ServiceOptions.decode(reader, reader.uint32()); @@ -2326,55 +2881,80 @@ export const ServiceDescriptorProto = { }, fromJSON(object: any): ServiceDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - method: Array.isArray(object?.method) - ? object.method.map((e: any) => MethodDescriptorProto.fromJSON(e)) - : [], - options: isSet(object.options) ? ServiceOptions.fromJSON(object.options) : undefined, - }; + const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; + message.method = []; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.method !== undefined && object.method !== null) { + for (const e of object.method) { + message.method.push(MethodDescriptorProto.fromJSON(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = ServiceOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + return message; }, toJSON(message: ServiceDescriptorProto): unknown { const obj: any = {}; message.name !== undefined && (obj.name = message.name); if (message.method) { - obj.method = message.method.map(e => (e ? MethodDescriptorProto.toJSON(e) : undefined)); + obj.method = message.method.map((e) => + e ? MethodDescriptorProto.toJSON(e) : undefined + ); } else { obj.method = []; } message.options !== undefined && - (obj.options = message.options ? ServiceOptions.toJSON(message.options) : undefined); + (obj.options = message.options + ? ServiceOptions.toJSON(message.options) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): ServiceDescriptorProto { - const message = createBaseServiceDescriptorProto(); - message.name = object.name ?? ""; - message.method = object.method?.map(e => MethodDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null - ? ServiceOptions.fromPartial(object.options) - : undefined; + const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; + message.method = []; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.method !== undefined && object.method !== null) { + for (const e of object.method) { + message.method.push(MethodDescriptorProto.fromPartial(e)); + } + } + if (object.options !== undefined && object.options !== null) { + message.options = ServiceOptions.fromPartial(object.options); + } else { + message.options = undefined; + } return message; }, }; -function createBaseMethodDescriptorProto(): MethodDescriptorProto { - return { - name: "", - inputType: "", - outputType: "", - options: undefined, - clientStreaming: false, - serverStreaming: false, - }; -} +const baseMethodDescriptorProto: object = { + name: "", + inputType: "", + outputType: "", + clientStreaming: false, + serverStreaming: false, +}; export const MethodDescriptorProto = { - encode(message: MethodDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: MethodDescriptorProto, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2396,10 +2976,13 @@ export const MethodDescriptorProto = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): MethodDescriptorProto { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): MethodDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMethodDescriptorProto(); + const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2430,14 +3013,44 @@ export const MethodDescriptorProto = { }, fromJSON(object: any): MethodDescriptorProto { - return { - name: isSet(object.name) ? String(object.name) : "", - inputType: isSet(object.inputType) ? String(object.inputType) : "", - outputType: isSet(object.outputType) ? String(object.outputType) : "", - options: isSet(object.options) ? MethodOptions.fromJSON(object.options) : undefined, - clientStreaming: isSet(object.clientStreaming) ? Boolean(object.clientStreaming) : false, - serverStreaming: isSet(object.serverStreaming) ? Boolean(object.serverStreaming) : false, - }; + const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.inputType !== undefined && object.inputType !== null) { + message.inputType = String(object.inputType); + } else { + message.inputType = ""; + } + if (object.outputType !== undefined && object.outputType !== null) { + message.outputType = String(object.outputType); + } else { + message.outputType = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = MethodOptions.fromJSON(object.options); + } else { + message.options = undefined; + } + if ( + object.clientStreaming !== undefined && + object.clientStreaming !== null + ) { + message.clientStreaming = Boolean(object.clientStreaming); + } else { + message.clientStreaming = false; + } + if ( + object.serverStreaming !== undefined && + object.serverStreaming !== null + ) { + message.serverStreaming = Boolean(object.serverStreaming); + } else { + message.serverStreaming = false; + } + return message; }, toJSON(message: MethodDescriptorProto): unknown { @@ -2446,57 +3059,88 @@ export const MethodDescriptorProto = { message.inputType !== undefined && (obj.inputType = message.inputType); message.outputType !== undefined && (obj.outputType = message.outputType); message.options !== undefined && - (obj.options = message.options ? MethodOptions.toJSON(message.options) : undefined); - message.clientStreaming !== undefined && (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && (obj.serverStreaming = message.serverStreaming); + (obj.options = message.options + ? MethodOptions.toJSON(message.options) + : undefined); + message.clientStreaming !== undefined && + (obj.clientStreaming = message.clientStreaming); + message.serverStreaming !== undefined && + (obj.serverStreaming = message.serverStreaming); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): MethodDescriptorProto { - const message = createBaseMethodDescriptorProto(); - message.name = object.name ?? ""; - message.inputType = object.inputType ?? ""; - message.outputType = object.outputType ?? ""; - message.options = - object.options !== undefined && object.options !== null - ? MethodOptions.fromPartial(object.options) - : undefined; - message.clientStreaming = object.clientStreaming ?? false; - message.serverStreaming = object.serverStreaming ?? false; + const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.inputType !== undefined && object.inputType !== null) { + message.inputType = object.inputType; + } else { + message.inputType = ""; + } + if (object.outputType !== undefined && object.outputType !== null) { + message.outputType = object.outputType; + } else { + message.outputType = ""; + } + if (object.options !== undefined && object.options !== null) { + message.options = MethodOptions.fromPartial(object.options); + } else { + message.options = undefined; + } + if ( + object.clientStreaming !== undefined && + object.clientStreaming !== null + ) { + message.clientStreaming = object.clientStreaming; + } else { + message.clientStreaming = false; + } + if ( + object.serverStreaming !== undefined && + object.serverStreaming !== null + ) { + message.serverStreaming = object.serverStreaming; + } else { + message.serverStreaming = false; + } return message; }, }; -function createBaseFileOptions(): FileOptions { - return { - javaPackage: "", - javaOuterClassname: "", - javaMultipleFiles: false, - javaGenerateEqualsAndHash: false, - javaStringCheckUtf8: false, - optimizeFor: 1, - goPackage: "", - ccGenericServices: false, - javaGenericServices: false, - pyGenericServices: false, - phpGenericServices: false, - deprecated: false, - ccEnableArenas: false, - objcClassPrefix: "", - csharpNamespace: "", - swiftPrefix: "", - phpClassPrefix: "", - phpNamespace: "", - phpMetadataNamespace: "", - rubyPackage: "", - uninterpretedOption: [], - }; -} +const baseFileOptions: object = { + javaPackage: "", + javaOuterClassname: "", + javaMultipleFiles: false, + javaGenerateEqualsAndHash: false, + javaStringCheckUtf8: false, + optimizeFor: 1, + goPackage: "", + ccGenericServices: false, + javaGenericServices: false, + pyGenericServices: false, + phpGenericServices: false, + deprecated: false, + ccEnableArenas: false, + objcClassPrefix: "", + csharpNamespace: "", + swiftPrefix: "", + phpClassPrefix: "", + phpNamespace: "", + phpMetadataNamespace: "", + rubyPackage: "", +}; export const FileOptions = { - encode(message: FileOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: FileOptions, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.javaPackage !== "") { writer.uint32(10).string(message.javaPackage); } @@ -2566,7 +3210,8 @@ export const FileOptions = { decode(input: _m0.Reader | Uint8Array, length?: number): FileOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFileOptions(); + const message = { ...baseFileOptions } as FileOptions; + message.uninterpretedOption = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2631,7 +3276,9 @@ export const FileOptions = { message.rubyPackage = reader.string(); break; case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + message.uninterpretedOption.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -2642,57 +3289,164 @@ export const FileOptions = { }, fromJSON(object: any): FileOptions { - return { - javaPackage: isSet(object.javaPackage) ? String(object.javaPackage) : "", - javaOuterClassname: isSet(object.javaOuterClassname) ? String(object.javaOuterClassname) : "", - javaMultipleFiles: isSet(object.javaMultipleFiles) - ? Boolean(object.javaMultipleFiles) - : false, - javaGenerateEqualsAndHash: isSet(object.javaGenerateEqualsAndHash) - ? Boolean(object.javaGenerateEqualsAndHash) - : false, - javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) - ? Boolean(object.javaStringCheckUtf8) - : false, - optimizeFor: isSet(object.optimizeFor) - ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) - : 1, - goPackage: isSet(object.goPackage) ? String(object.goPackage) : "", - ccGenericServices: isSet(object.ccGenericServices) - ? Boolean(object.ccGenericServices) - : false, - javaGenericServices: isSet(object.javaGenericServices) - ? Boolean(object.javaGenericServices) - : false, - pyGenericServices: isSet(object.pyGenericServices) - ? Boolean(object.pyGenericServices) - : false, - phpGenericServices: isSet(object.phpGenericServices) - ? Boolean(object.phpGenericServices) - : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - ccEnableArenas: isSet(object.ccEnableArenas) ? Boolean(object.ccEnableArenas) : false, - objcClassPrefix: isSet(object.objcClassPrefix) ? String(object.objcClassPrefix) : "", - csharpNamespace: isSet(object.csharpNamespace) ? String(object.csharpNamespace) : "", - swiftPrefix: isSet(object.swiftPrefix) ? String(object.swiftPrefix) : "", - phpClassPrefix: isSet(object.phpClassPrefix) ? String(object.phpClassPrefix) : "", - phpNamespace: isSet(object.phpNamespace) ? String(object.phpNamespace) : "", - phpMetadataNamespace: isSet(object.phpMetadataNamespace) - ? String(object.phpMetadataNamespace) - : "", - rubyPackage: isSet(object.rubyPackage) ? String(object.rubyPackage) : "", - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; + const message = { ...baseFileOptions } as FileOptions; + message.uninterpretedOption = []; + if (object.javaPackage !== undefined && object.javaPackage !== null) { + message.javaPackage = String(object.javaPackage); + } else { + message.javaPackage = ""; + } + if ( + object.javaOuterClassname !== undefined && + object.javaOuterClassname !== null + ) { + message.javaOuterClassname = String(object.javaOuterClassname); + } else { + message.javaOuterClassname = ""; + } + if ( + object.javaMultipleFiles !== undefined && + object.javaMultipleFiles !== null + ) { + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + } else { + message.javaMultipleFiles = false; + } + if ( + object.javaGenerateEqualsAndHash !== undefined && + object.javaGenerateEqualsAndHash !== null + ) { + message.javaGenerateEqualsAndHash = Boolean( + object.javaGenerateEqualsAndHash + ); + } else { + message.javaGenerateEqualsAndHash = false; + } + if ( + object.javaStringCheckUtf8 !== undefined && + object.javaStringCheckUtf8 !== null + ) { + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + } else { + message.javaStringCheckUtf8 = false; + } + if (object.optimizeFor !== undefined && object.optimizeFor !== null) { + message.optimizeFor = fileOptions_OptimizeModeFromJSON( + object.optimizeFor + ); + } else { + message.optimizeFor = 1; + } + if (object.goPackage !== undefined && object.goPackage !== null) { + message.goPackage = String(object.goPackage); + } else { + message.goPackage = ""; + } + if ( + object.ccGenericServices !== undefined && + object.ccGenericServices !== null + ) { + message.ccGenericServices = Boolean(object.ccGenericServices); + } else { + message.ccGenericServices = false; + } + if ( + object.javaGenericServices !== undefined && + object.javaGenericServices !== null + ) { + message.javaGenericServices = Boolean(object.javaGenericServices); + } else { + message.javaGenericServices = false; + } + if ( + object.pyGenericServices !== undefined && + object.pyGenericServices !== null + ) { + message.pyGenericServices = Boolean(object.pyGenericServices); + } else { + message.pyGenericServices = false; + } + if ( + object.phpGenericServices !== undefined && + object.phpGenericServices !== null + ) { + message.phpGenericServices = Boolean(object.phpGenericServices); + } else { + message.phpGenericServices = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { + message.ccEnableArenas = Boolean(object.ccEnableArenas); + } else { + message.ccEnableArenas = false; + } + if ( + object.objcClassPrefix !== undefined && + object.objcClassPrefix !== null + ) { + message.objcClassPrefix = String(object.objcClassPrefix); + } else { + message.objcClassPrefix = ""; + } + if ( + object.csharpNamespace !== undefined && + object.csharpNamespace !== null + ) { + message.csharpNamespace = String(object.csharpNamespace); + } else { + message.csharpNamespace = ""; + } + if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { + message.swiftPrefix = String(object.swiftPrefix); + } else { + message.swiftPrefix = ""; + } + if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { + message.phpClassPrefix = String(object.phpClassPrefix); + } else { + message.phpClassPrefix = ""; + } + if (object.phpNamespace !== undefined && object.phpNamespace !== null) { + message.phpNamespace = String(object.phpNamespace); + } else { + message.phpNamespace = ""; + } + if ( + object.phpMetadataNamespace !== undefined && + object.phpMetadataNamespace !== null + ) { + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + } else { + message.phpMetadataNamespace = ""; + } + if (object.rubyPackage !== undefined && object.rubyPackage !== null) { + message.rubyPackage = String(object.rubyPackage); + } else { + message.rubyPackage = ""; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); + } + } + return message; }, toJSON(message: FileOptions): unknown { const obj: any = {}; - message.javaPackage !== undefined && (obj.javaPackage = message.javaPackage); + message.javaPackage !== undefined && + (obj.javaPackage = message.javaPackage); message.javaOuterClassname !== undefined && (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && (obj.javaMultipleFiles = message.javaMultipleFiles); + message.javaMultipleFiles !== undefined && + (obj.javaMultipleFiles = message.javaMultipleFiles); message.javaGenerateEqualsAndHash !== undefined && (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); message.javaStringCheckUtf8 !== undefined && @@ -2700,25 +3454,34 @@ export const FileOptions = { message.optimizeFor !== undefined && (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && (obj.ccGenericServices = message.ccGenericServices); + message.ccGenericServices !== undefined && + (obj.ccGenericServices = message.ccGenericServices); message.javaGenericServices !== undefined && (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && (obj.pyGenericServices = message.pyGenericServices); + message.pyGenericServices !== undefined && + (obj.pyGenericServices = message.pyGenericServices); message.phpGenericServices !== undefined && (obj.phpGenericServices = message.phpGenericServices); message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && (obj.phpNamespace = message.phpNamespace); + message.ccEnableArenas !== undefined && + (obj.ccEnableArenas = message.ccEnableArenas); + message.objcClassPrefix !== undefined && + (obj.objcClassPrefix = message.objcClassPrefix); + message.csharpNamespace !== undefined && + (obj.csharpNamespace = message.csharpNamespace); + message.swiftPrefix !== undefined && + (obj.swiftPrefix = message.swiftPrefix); + message.phpClassPrefix !== undefined && + (obj.phpClassPrefix = message.phpClassPrefix); + message.phpNamespace !== undefined && + (obj.phpNamespace = message.phpNamespace); message.phpMetadataNamespace !== undefined && (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && (obj.rubyPackage = message.rubyPackage); + message.rubyPackage !== undefined && + (obj.rubyPackage = message.rubyPackage); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => - e ? UninterpretedOption.toJSON(e) : undefined, + obj.uninterpretedOption = message.uninterpretedOption.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined ); } else { obj.uninterpretedOption = []; @@ -2726,46 +3489,166 @@ export const FileOptions = { return obj; }, - fromPartial, I>>(object: I): FileOptions { - const message = createBaseFileOptions(); - message.javaPackage = object.javaPackage ?? ""; - message.javaOuterClassname = object.javaOuterClassname ?? ""; - message.javaMultipleFiles = object.javaMultipleFiles ?? false; - message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash ?? false; - message.javaStringCheckUtf8 = object.javaStringCheckUtf8 ?? false; - message.optimizeFor = object.optimizeFor ?? 1; - message.goPackage = object.goPackage ?? ""; - message.ccGenericServices = object.ccGenericServices ?? false; - message.javaGenericServices = object.javaGenericServices ?? false; - message.pyGenericServices = object.pyGenericServices ?? false; - message.phpGenericServices = object.phpGenericServices ?? false; - message.deprecated = object.deprecated ?? false; - message.ccEnableArenas = object.ccEnableArenas ?? false; - message.objcClassPrefix = object.objcClassPrefix ?? ""; - message.csharpNamespace = object.csharpNamespace ?? ""; - message.swiftPrefix = object.swiftPrefix ?? ""; - message.phpClassPrefix = object.phpClassPrefix ?? ""; - message.phpNamespace = object.phpNamespace ?? ""; - message.phpMetadataNamespace = object.phpMetadataNamespace ?? ""; - message.rubyPackage = object.rubyPackage ?? ""; - message.uninterpretedOption = - object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + fromPartial(object: DeepPartial): FileOptions { + const message = { ...baseFileOptions } as FileOptions; + message.uninterpretedOption = []; + if (object.javaPackage !== undefined && object.javaPackage !== null) { + message.javaPackage = object.javaPackage; + } else { + message.javaPackage = ""; + } + if ( + object.javaOuterClassname !== undefined && + object.javaOuterClassname !== null + ) { + message.javaOuterClassname = object.javaOuterClassname; + } else { + message.javaOuterClassname = ""; + } + if ( + object.javaMultipleFiles !== undefined && + object.javaMultipleFiles !== null + ) { + message.javaMultipleFiles = object.javaMultipleFiles; + } else { + message.javaMultipleFiles = false; + } + if ( + object.javaGenerateEqualsAndHash !== undefined && + object.javaGenerateEqualsAndHash !== null + ) { + message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash; + } else { + message.javaGenerateEqualsAndHash = false; + } + if ( + object.javaStringCheckUtf8 !== undefined && + object.javaStringCheckUtf8 !== null + ) { + message.javaStringCheckUtf8 = object.javaStringCheckUtf8; + } else { + message.javaStringCheckUtf8 = false; + } + if (object.optimizeFor !== undefined && object.optimizeFor !== null) { + message.optimizeFor = object.optimizeFor; + } else { + message.optimizeFor = 1; + } + if (object.goPackage !== undefined && object.goPackage !== null) { + message.goPackage = object.goPackage; + } else { + message.goPackage = ""; + } + if ( + object.ccGenericServices !== undefined && + object.ccGenericServices !== null + ) { + message.ccGenericServices = object.ccGenericServices; + } else { + message.ccGenericServices = false; + } + if ( + object.javaGenericServices !== undefined && + object.javaGenericServices !== null + ) { + message.javaGenericServices = object.javaGenericServices; + } else { + message.javaGenericServices = false; + } + if ( + object.pyGenericServices !== undefined && + object.pyGenericServices !== null + ) { + message.pyGenericServices = object.pyGenericServices; + } else { + message.pyGenericServices = false; + } + if ( + object.phpGenericServices !== undefined && + object.phpGenericServices !== null + ) { + message.phpGenericServices = object.phpGenericServices; + } else { + message.phpGenericServices = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if (object.ccEnableArenas !== undefined && object.ccEnableArenas !== null) { + message.ccEnableArenas = object.ccEnableArenas; + } else { + message.ccEnableArenas = false; + } + if ( + object.objcClassPrefix !== undefined && + object.objcClassPrefix !== null + ) { + message.objcClassPrefix = object.objcClassPrefix; + } else { + message.objcClassPrefix = ""; + } + if ( + object.csharpNamespace !== undefined && + object.csharpNamespace !== null + ) { + message.csharpNamespace = object.csharpNamespace; + } else { + message.csharpNamespace = ""; + } + if (object.swiftPrefix !== undefined && object.swiftPrefix !== null) { + message.swiftPrefix = object.swiftPrefix; + } else { + message.swiftPrefix = ""; + } + if (object.phpClassPrefix !== undefined && object.phpClassPrefix !== null) { + message.phpClassPrefix = object.phpClassPrefix; + } else { + message.phpClassPrefix = ""; + } + if (object.phpNamespace !== undefined && object.phpNamespace !== null) { + message.phpNamespace = object.phpNamespace; + } else { + message.phpNamespace = ""; + } + if ( + object.phpMetadataNamespace !== undefined && + object.phpMetadataNamespace !== null + ) { + message.phpMetadataNamespace = object.phpMetadataNamespace; + } else { + message.phpMetadataNamespace = ""; + } + if (object.rubyPackage !== undefined && object.rubyPackage !== null) { + message.rubyPackage = object.rubyPackage; + } else { + message.rubyPackage = ""; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); + } + } return message; }, }; -function createBaseMessageOptions(): MessageOptions { - return { - messageSetWireFormat: false, - noStandardDescriptorAccessor: false, - deprecated: false, - mapEntry: false, - uninterpretedOption: [], - }; -} +const baseMessageOptions: object = { + messageSetWireFormat: false, + noStandardDescriptorAccessor: false, + deprecated: false, + mapEntry: false, +}; export const MessageOptions = { - encode(message: MessageOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: MessageOptions, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.messageSetWireFormat === true) { writer.uint32(8).bool(message.messageSetWireFormat); } @@ -2787,7 +3670,8 @@ export const MessageOptions = { decode(input: _m0.Reader | Uint8Array, length?: number): MessageOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMessageOptions(); + const message = { ...baseMessageOptions } as MessageOptions; + message.uninterpretedOption = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2804,7 +3688,9 @@ export const MessageOptions = { message.mapEntry = reader.bool(); break; case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + message.uninterpretedOption.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -2815,19 +3701,45 @@ export const MessageOptions = { }, fromJSON(object: any): MessageOptions { - return { - messageSetWireFormat: isSet(object.messageSetWireFormat) - ? Boolean(object.messageSetWireFormat) - : false, - noStandardDescriptorAccessor: isSet(object.noStandardDescriptorAccessor) - ? Boolean(object.noStandardDescriptorAccessor) - : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - mapEntry: isSet(object.mapEntry) ? Boolean(object.mapEntry) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; + const message = { ...baseMessageOptions } as MessageOptions; + message.uninterpretedOption = []; + if ( + object.messageSetWireFormat !== undefined && + object.messageSetWireFormat !== null + ) { + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + } else { + message.messageSetWireFormat = false; + } + if ( + object.noStandardDescriptorAccessor !== undefined && + object.noStandardDescriptorAccessor !== null + ) { + message.noStandardDescriptorAccessor = Boolean( + object.noStandardDescriptorAccessor + ); + } else { + message.noStandardDescriptorAccessor = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if (object.mapEntry !== undefined && object.mapEntry !== null) { + message.mapEntry = Boolean(object.mapEntry); + } else { + message.mapEntry = false; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); + } + } + return message; }, toJSON(message: MessageOptions): unknown { @@ -2839,8 +3751,8 @@ export const MessageOptions = { message.deprecated !== undefined && (obj.deprecated = message.deprecated); message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => - e ? UninterpretedOption.toJSON(e) : undefined, + obj.uninterpretedOption = message.uninterpretedOption.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined ); } else { obj.uninterpretedOption = []; @@ -2848,32 +3760,62 @@ export const MessageOptions = { return obj; }, - fromPartial, I>>(object: I): MessageOptions { - const message = createBaseMessageOptions(); - message.messageSetWireFormat = object.messageSetWireFormat ?? false; - message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false; - message.deprecated = object.deprecated ?? false; - message.mapEntry = object.mapEntry ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + fromPartial(object: DeepPartial): MessageOptions { + const message = { ...baseMessageOptions } as MessageOptions; + message.uninterpretedOption = []; + if ( + object.messageSetWireFormat !== undefined && + object.messageSetWireFormat !== null + ) { + message.messageSetWireFormat = object.messageSetWireFormat; + } else { + message.messageSetWireFormat = false; + } + if ( + object.noStandardDescriptorAccessor !== undefined && + object.noStandardDescriptorAccessor !== null + ) { + message.noStandardDescriptorAccessor = + object.noStandardDescriptorAccessor; + } else { + message.noStandardDescriptorAccessor = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if (object.mapEntry !== undefined && object.mapEntry !== null) { + message.mapEntry = object.mapEntry; + } else { + message.mapEntry = false; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); + } + } return message; }, }; -function createBaseFieldOptions(): FieldOptions { - return { - ctype: 0, - packed: false, - jstype: 0, - lazy: false, - deprecated: false, - weak: false, - uninterpretedOption: [], - }; -} +const baseFieldOptions: object = { + ctype: 0, + packed: false, + jstype: 0, + lazy: false, + deprecated: false, + weak: false, +}; export const FieldOptions = { - encode(message: FieldOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: FieldOptions, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.ctype !== 0) { writer.uint32(8).int32(message.ctype); } @@ -2901,7 +3843,8 @@ export const FieldOptions = { decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFieldOptions(); + const message = { ...baseFieldOptions } as FieldOptions; + message.uninterpretedOption = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2924,7 +3867,9 @@ export const FieldOptions = { message.weak = reader.bool(); break; case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + message.uninterpretedOption.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -2935,30 +3880,62 @@ export const FieldOptions = { }, fromJSON(object: any): FieldOptions { - return { - ctype: isSet(object.ctype) ? fieldOptions_CTypeFromJSON(object.ctype) : 0, - packed: isSet(object.packed) ? Boolean(object.packed) : false, - jstype: isSet(object.jstype) ? fieldOptions_JSTypeFromJSON(object.jstype) : 0, - lazy: isSet(object.lazy) ? Boolean(object.lazy) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - weak: isSet(object.weak) ? Boolean(object.weak) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; + const message = { ...baseFieldOptions } as FieldOptions; + message.uninterpretedOption = []; + if (object.ctype !== undefined && object.ctype !== null) { + message.ctype = fieldOptions_CTypeFromJSON(object.ctype); + } else { + message.ctype = 0; + } + if (object.packed !== undefined && object.packed !== null) { + message.packed = Boolean(object.packed); + } else { + message.packed = false; + } + if (object.jstype !== undefined && object.jstype !== null) { + message.jstype = fieldOptions_JSTypeFromJSON(object.jstype); + } else { + message.jstype = 0; + } + if (object.lazy !== undefined && object.lazy !== null) { + message.lazy = Boolean(object.lazy); + } else { + message.lazy = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if (object.weak !== undefined && object.weak !== null) { + message.weak = Boolean(object.weak); + } else { + message.weak = false; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); + } + } + return message; }, toJSON(message: FieldOptions): unknown { const obj: any = {}; - message.ctype !== undefined && (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); + message.ctype !== undefined && + (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); + message.jstype !== undefined && + (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); message.lazy !== undefined && (obj.lazy = message.lazy); message.deprecated !== undefined && (obj.deprecated = message.deprecated); message.weak !== undefined && (obj.weak = message.weak); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => - e ? UninterpretedOption.toJSON(e) : undefined, + obj.uninterpretedOption = message.uninterpretedOption.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined ); } else { obj.uninterpretedOption = []; @@ -2966,26 +3943,58 @@ export const FieldOptions = { return obj; }, - fromPartial, I>>(object: I): FieldOptions { - const message = createBaseFieldOptions(); - message.ctype = object.ctype ?? 0; - message.packed = object.packed ?? false; - message.jstype = object.jstype ?? 0; - message.lazy = object.lazy ?? false; - message.deprecated = object.deprecated ?? false; - message.weak = object.weak ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + fromPartial(object: DeepPartial): FieldOptions { + const message = { ...baseFieldOptions } as FieldOptions; + message.uninterpretedOption = []; + if (object.ctype !== undefined && object.ctype !== null) { + message.ctype = object.ctype; + } else { + message.ctype = 0; + } + if (object.packed !== undefined && object.packed !== null) { + message.packed = object.packed; + } else { + message.packed = false; + } + if (object.jstype !== undefined && object.jstype !== null) { + message.jstype = object.jstype; + } else { + message.jstype = 0; + } + if (object.lazy !== undefined && object.lazy !== null) { + message.lazy = object.lazy; + } else { + message.lazy = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if (object.weak !== undefined && object.weak !== null) { + message.weak = object.weak; + } else { + message.weak = false; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); + } + } return message; }, }; -function createBaseOneofOptions(): OneofOptions { - return { uninterpretedOption: [] }; -} +const baseOneofOptions: object = {}; export const OneofOptions = { - encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: OneofOptions, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -2995,12 +4004,15 @@ export const OneofOptions = { decode(input: _m0.Reader | Uint8Array, length?: number): OneofOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOneofOptions(); + const message = { ...baseOneofOptions } as OneofOptions; + message.uninterpretedOption = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + message.uninterpretedOption.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -3011,18 +4023,24 @@ export const OneofOptions = { }, fromJSON(object: any): OneofOptions { - return { - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; + const message = { ...baseOneofOptions } as OneofOptions; + message.uninterpretedOption = []; + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); + } + } + return message; }, toJSON(message: OneofOptions): unknown { const obj: any = {}; if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => - e ? UninterpretedOption.toJSON(e) : undefined, + obj.uninterpretedOption = message.uninterpretedOption.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined ); } else { obj.uninterpretedOption = []; @@ -3030,20 +4048,28 @@ export const OneofOptions = { return obj; }, - fromPartial, I>>(object: I): OneofOptions { - const message = createBaseOneofOptions(); - message.uninterpretedOption = - object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + fromPartial(object: DeepPartial): OneofOptions { + const message = { ...baseOneofOptions } as OneofOptions; + message.uninterpretedOption = []; + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); + } + } return message; }, }; -function createBaseEnumOptions(): EnumOptions { - return { allowAlias: false, deprecated: false, uninterpretedOption: [] }; -} +const baseEnumOptions: object = { allowAlias: false, deprecated: false }; export const EnumOptions = { - encode(message: EnumOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: EnumOptions, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.allowAlias === true) { writer.uint32(16).bool(message.allowAlias); } @@ -3059,7 +4085,8 @@ export const EnumOptions = { decode(input: _m0.Reader | Uint8Array, length?: number): EnumOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumOptions(); + const message = { ...baseEnumOptions } as EnumOptions; + message.uninterpretedOption = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3070,7 +4097,9 @@ export const EnumOptions = { message.deprecated = reader.bool(); break; case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + message.uninterpretedOption.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -3081,13 +4110,27 @@ export const EnumOptions = { }, fromJSON(object: any): EnumOptions { - return { - allowAlias: isSet(object.allowAlias) ? Boolean(object.allowAlias) : false, - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; + const message = { ...baseEnumOptions } as EnumOptions; + message.uninterpretedOption = []; + if (object.allowAlias !== undefined && object.allowAlias !== null) { + message.allowAlias = Boolean(object.allowAlias); + } else { + message.allowAlias = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); + } + } + return message; }, toJSON(message: EnumOptions): unknown { @@ -3095,8 +4138,8 @@ export const EnumOptions = { message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); message.deprecated !== undefined && (obj.deprecated = message.deprecated); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => - e ? UninterpretedOption.toJSON(e) : undefined, + obj.uninterpretedOption = message.uninterpretedOption.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined ); } else { obj.uninterpretedOption = []; @@ -3104,22 +4147,38 @@ export const EnumOptions = { return obj; }, - fromPartial, I>>(object: I): EnumOptions { - const message = createBaseEnumOptions(); - message.allowAlias = object.allowAlias ?? false; - message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + fromPartial(object: DeepPartial): EnumOptions { + const message = { ...baseEnumOptions } as EnumOptions; + message.uninterpretedOption = []; + if (object.allowAlias !== undefined && object.allowAlias !== null) { + message.allowAlias = object.allowAlias; + } else { + message.allowAlias = false; + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); + } + } return message; }, }; -function createBaseEnumValueOptions(): EnumValueOptions { - return { deprecated: false, uninterpretedOption: [] }; -} +const baseEnumValueOptions: object = { deprecated: false }; export const EnumValueOptions = { - encode(message: EnumValueOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: EnumValueOptions, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.deprecated === true) { writer.uint32(8).bool(message.deprecated); } @@ -3132,7 +4191,8 @@ export const EnumValueOptions = { decode(input: _m0.Reader | Uint8Array, length?: number): EnumValueOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseEnumValueOptions(); + const message = { ...baseEnumValueOptions } as EnumValueOptions; + message.uninterpretedOption = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3140,7 +4200,9 @@ export const EnumValueOptions = { message.deprecated = reader.bool(); break; case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + message.uninterpretedOption.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -3151,20 +4213,30 @@ export const EnumValueOptions = { }, fromJSON(object: any): EnumValueOptions { - return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; + const message = { ...baseEnumValueOptions } as EnumValueOptions; + message.uninterpretedOption = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); + } + } + return message; }, toJSON(message: EnumValueOptions): unknown { const obj: any = {}; message.deprecated !== undefined && (obj.deprecated = message.deprecated); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => - e ? UninterpretedOption.toJSON(e) : undefined, + obj.uninterpretedOption = message.uninterpretedOption.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined ); } else { obj.uninterpretedOption = []; @@ -3172,21 +4244,33 @@ export const EnumValueOptions = { return obj; }, - fromPartial, I>>(object: I): EnumValueOptions { - const message = createBaseEnumValueOptions(); - message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + fromPartial(object: DeepPartial): EnumValueOptions { + const message = { ...baseEnumValueOptions } as EnumValueOptions; + message.uninterpretedOption = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); + } + } return message; }, }; -function createBaseServiceOptions(): ServiceOptions { - return { deprecated: false, uninterpretedOption: [] }; -} +const baseServiceOptions: object = { deprecated: false }; export const ServiceOptions = { - encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: ServiceOptions, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.deprecated === true) { writer.uint32(264).bool(message.deprecated); } @@ -3199,7 +4283,8 @@ export const ServiceOptions = { decode(input: _m0.Reader | Uint8Array, length?: number): ServiceOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseServiceOptions(); + const message = { ...baseServiceOptions } as ServiceOptions; + message.uninterpretedOption = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3207,7 +4292,9 @@ export const ServiceOptions = { message.deprecated = reader.bool(); break; case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + message.uninterpretedOption.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -3218,20 +4305,30 @@ export const ServiceOptions = { }, fromJSON(object: any): ServiceOptions { - return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; + const message = { ...baseServiceOptions } as ServiceOptions; + message.uninterpretedOption = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); + } + } + return message; }, toJSON(message: ServiceOptions): unknown { const obj: any = {}; message.deprecated !== undefined && (obj.deprecated = message.deprecated); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => - e ? UninterpretedOption.toJSON(e) : undefined, + obj.uninterpretedOption = message.uninterpretedOption.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined ); } else { obj.uninterpretedOption = []; @@ -3239,21 +4336,33 @@ export const ServiceOptions = { return obj; }, - fromPartial, I>>(object: I): ServiceOptions { - const message = createBaseServiceOptions(); - message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + fromPartial(object: DeepPartial): ServiceOptions { + const message = { ...baseServiceOptions } as ServiceOptions; + message.uninterpretedOption = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); + } + } return message; }, }; -function createBaseMethodOptions(): MethodOptions { - return { deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] }; -} +const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; export const MethodOptions = { - encode(message: MethodOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: MethodOptions, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.deprecated === true) { writer.uint32(264).bool(message.deprecated); } @@ -3269,7 +4378,8 @@ export const MethodOptions = { decode(input: _m0.Reader | Uint8Array, length?: number): MethodOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMethodOptions(); + const message = { ...baseMethodOptions } as MethodOptions; + message.uninterpretedOption = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3280,7 +4390,9 @@ export const MethodOptions = { message.idempotencyLevel = reader.int32() as any; break; case 999: - message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); + message.uninterpretedOption.push( + UninterpretedOption.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -3291,25 +4403,44 @@ export const MethodOptions = { }, fromJSON(object: any): MethodOptions { - return { - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - idempotencyLevel: isSet(object.idempotencyLevel) - ? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel) - : 0, - uninterpretedOption: Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) - : [], - }; + const message = { ...baseMethodOptions } as MethodOptions; + message.uninterpretedOption = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if ( + object.idempotencyLevel !== undefined && + object.idempotencyLevel !== null + ) { + message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( + object.idempotencyLevel + ); + } else { + message.idempotencyLevel = 0; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); + } + } + return message; }, toJSON(message: MethodOptions): unknown { const obj: any = {}; message.deprecated !== undefined && (obj.deprecated = message.deprecated); message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); + (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( + message.idempotencyLevel + )); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map(e => - e ? UninterpretedOption.toJSON(e) : undefined, + obj.uninterpretedOption = message.uninterpretedOption.map((e) => + e ? UninterpretedOption.toJSON(e) : undefined ); } else { obj.uninterpretedOption = []; @@ -3317,32 +4448,52 @@ export const MethodOptions = { return obj; }, - fromPartial, I>>(object: I): MethodOptions { - const message = createBaseMethodOptions(); - message.deprecated = object.deprecated ?? false; - message.idempotencyLevel = object.idempotencyLevel ?? 0; - message.uninterpretedOption = - object.uninterpretedOption?.map(e => UninterpretedOption.fromPartial(e)) || []; + fromPartial(object: DeepPartial): MethodOptions { + const message = { ...baseMethodOptions } as MethodOptions; + message.uninterpretedOption = []; + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if ( + object.idempotencyLevel !== undefined && + object.idempotencyLevel !== null + ) { + message.idempotencyLevel = object.idempotencyLevel; + } else { + message.idempotencyLevel = 0; + } + if ( + object.uninterpretedOption !== undefined && + object.uninterpretedOption !== null + ) { + for (const e of object.uninterpretedOption) { + message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); + } + } return message; }, }; -function createBaseUninterpretedOption(): UninterpretedOption { - return { - name: [], - identifierValue: "", - positiveIntValue: 0, - negativeIntValue: 0, - doubleValue: 0, - stringValue: new Uint8Array(), - aggregateValue: "", - }; -} +const baseUninterpretedOption: object = { + identifierValue: "", + positiveIntValue: 0, + negativeIntValue: 0, + doubleValue: 0, + aggregateValue: "", +}; export const UninterpretedOption = { - encode(message: UninterpretedOption, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: UninterpretedOption, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { for (const v of message.name) { - UninterpretedOption_NamePart.encode(v!, writer.uint32(18).fork()).ldelim(); + UninterpretedOption_NamePart.encode( + v!, + writer.uint32(18).fork() + ).ldelim(); } if (message.identifierValue !== "") { writer.uint32(26).string(message.identifierValue); @@ -3368,12 +4519,16 @@ export const UninterpretedOption = { decode(input: _m0.Reader | Uint8Array, length?: number): UninterpretedOption { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUninterpretedOption(); + const message = { ...baseUninterpretedOption } as UninterpretedOption; + message.name = []; + message.stringValue = new Uint8Array(); while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 2: - message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); + message.name.push( + UninterpretedOption_NamePart.decode(reader, reader.uint32()) + ); break; case 3: message.identifierValue = reader.string(); @@ -3402,65 +4557,142 @@ export const UninterpretedOption = { }, fromJSON(object: any): UninterpretedOption { - return { - name: Array.isArray(object?.name) - ? object.name.map((e: any) => UninterpretedOption_NamePart.fromJSON(e)) - : [], - identifierValue: isSet(object.identifierValue) ? String(object.identifierValue) : "", - positiveIntValue: isSet(object.positiveIntValue) ? Number(object.positiveIntValue) : 0, - negativeIntValue: isSet(object.negativeIntValue) ? Number(object.negativeIntValue) : 0, - doubleValue: isSet(object.doubleValue) ? Number(object.doubleValue) : 0, - stringValue: isSet(object.stringValue) - ? bytesFromBase64(object.stringValue) - : new Uint8Array(), - aggregateValue: isSet(object.aggregateValue) ? String(object.aggregateValue) : "", - }; + const message = { ...baseUninterpretedOption } as UninterpretedOption; + message.name = []; + message.stringValue = new Uint8Array(); + if (object.name !== undefined && object.name !== null) { + for (const e of object.name) { + message.name.push(UninterpretedOption_NamePart.fromJSON(e)); + } + } + if ( + object.identifierValue !== undefined && + object.identifierValue !== null + ) { + message.identifierValue = String(object.identifierValue); + } else { + message.identifierValue = ""; + } + if ( + object.positiveIntValue !== undefined && + object.positiveIntValue !== null + ) { + message.positiveIntValue = Number(object.positiveIntValue); + } else { + message.positiveIntValue = 0; + } + if ( + object.negativeIntValue !== undefined && + object.negativeIntValue !== null + ) { + message.negativeIntValue = Number(object.negativeIntValue); + } else { + message.negativeIntValue = 0; + } + if (object.doubleValue !== undefined && object.doubleValue !== null) { + message.doubleValue = Number(object.doubleValue); + } else { + message.doubleValue = 0; + } + if (object.stringValue !== undefined && object.stringValue !== null) { + message.stringValue = bytesFromBase64(object.stringValue); + } + if (object.aggregateValue !== undefined && object.aggregateValue !== null) { + message.aggregateValue = String(object.aggregateValue); + } else { + message.aggregateValue = ""; + } + return message; }, toJSON(message: UninterpretedOption): unknown { const obj: any = {}; if (message.name) { - obj.name = message.name.map(e => (e ? UninterpretedOption_NamePart.toJSON(e) : undefined)); + obj.name = message.name.map((e) => + e ? UninterpretedOption_NamePart.toJSON(e) : undefined + ); } else { obj.name = []; } - message.identifierValue !== undefined && (obj.identifierValue = message.identifierValue); + message.identifierValue !== undefined && + (obj.identifierValue = message.identifierValue); message.positiveIntValue !== undefined && - (obj.positiveIntValue = Math.round(message.positiveIntValue)); + (obj.positiveIntValue = message.positiveIntValue); message.negativeIntValue !== undefined && - (obj.negativeIntValue = Math.round(message.negativeIntValue)); - message.doubleValue !== undefined && (obj.doubleValue = message.doubleValue); + (obj.negativeIntValue = message.negativeIntValue); + message.doubleValue !== undefined && + (obj.doubleValue = message.doubleValue); message.stringValue !== undefined && (obj.stringValue = base64FromBytes( - message.stringValue !== undefined ? message.stringValue : new Uint8Array(), + message.stringValue !== undefined + ? message.stringValue + : new Uint8Array() )); - message.aggregateValue !== undefined && (obj.aggregateValue = message.aggregateValue); + message.aggregateValue !== undefined && + (obj.aggregateValue = message.aggregateValue); return obj; }, - fromPartial, I>>( - object: I, - ): UninterpretedOption { - const message = createBaseUninterpretedOption(); - message.name = object.name?.map(e => UninterpretedOption_NamePart.fromPartial(e)) || []; - message.identifierValue = object.identifierValue ?? ""; - message.positiveIntValue = object.positiveIntValue ?? 0; - message.negativeIntValue = object.negativeIntValue ?? 0; - message.doubleValue = object.doubleValue ?? 0; - message.stringValue = object.stringValue ?? new Uint8Array(); - message.aggregateValue = object.aggregateValue ?? ""; + fromPartial(object: DeepPartial): UninterpretedOption { + const message = { ...baseUninterpretedOption } as UninterpretedOption; + message.name = []; + if (object.name !== undefined && object.name !== null) { + for (const e of object.name) { + message.name.push(UninterpretedOption_NamePart.fromPartial(e)); + } + } + if ( + object.identifierValue !== undefined && + object.identifierValue !== null + ) { + message.identifierValue = object.identifierValue; + } else { + message.identifierValue = ""; + } + if ( + object.positiveIntValue !== undefined && + object.positiveIntValue !== null + ) { + message.positiveIntValue = object.positiveIntValue; + } else { + message.positiveIntValue = 0; + } + if ( + object.negativeIntValue !== undefined && + object.negativeIntValue !== null + ) { + message.negativeIntValue = object.negativeIntValue; + } else { + message.negativeIntValue = 0; + } + if (object.doubleValue !== undefined && object.doubleValue !== null) { + message.doubleValue = object.doubleValue; + } else { + message.doubleValue = 0; + } + if (object.stringValue !== undefined && object.stringValue !== null) { + message.stringValue = object.stringValue; + } else { + message.stringValue = new Uint8Array(); + } + if (object.aggregateValue !== undefined && object.aggregateValue !== null) { + message.aggregateValue = object.aggregateValue; + } else { + message.aggregateValue = ""; + } return message; }, }; -function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart { - return { namePart: "", isExtension: false }; -} +const baseUninterpretedOption_NamePart: object = { + namePart: "", + isExtension: false, +}; export const UninterpretedOption_NamePart = { encode( message: UninterpretedOption_NamePart, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.namePart !== "") { writer.uint32(10).string(message.namePart); @@ -3471,10 +4703,15 @@ export const UninterpretedOption_NamePart = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UninterpretedOption_NamePart { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): UninterpretedOption_NamePart { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUninterpretedOption_NamePart(); + const message = { + ...baseUninterpretedOption_NamePart, + } as UninterpretedOption_NamePart; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3493,35 +4730,57 @@ export const UninterpretedOption_NamePart = { }, fromJSON(object: any): UninterpretedOption_NamePart { - return { - namePart: isSet(object.namePart) ? String(object.namePart) : "", - isExtension: isSet(object.isExtension) ? Boolean(object.isExtension) : false, - }; + const message = { + ...baseUninterpretedOption_NamePart, + } as UninterpretedOption_NamePart; + if (object.namePart !== undefined && object.namePart !== null) { + message.namePart = String(object.namePart); + } else { + message.namePart = ""; + } + if (object.isExtension !== undefined && object.isExtension !== null) { + message.isExtension = Boolean(object.isExtension); + } else { + message.isExtension = false; + } + return message; }, toJSON(message: UninterpretedOption_NamePart): unknown { const obj: any = {}; message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && (obj.isExtension = message.isExtension); + message.isExtension !== undefined && + (obj.isExtension = message.isExtension); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): UninterpretedOption_NamePart { - const message = createBaseUninterpretedOption_NamePart(); - message.namePart = object.namePart ?? ""; - message.isExtension = object.isExtension ?? false; + const message = { + ...baseUninterpretedOption_NamePart, + } as UninterpretedOption_NamePart; + if (object.namePart !== undefined && object.namePart !== null) { + message.namePart = object.namePart; + } else { + message.namePart = ""; + } + if (object.isExtension !== undefined && object.isExtension !== null) { + message.isExtension = object.isExtension; + } else { + message.isExtension = false; + } return message; }, }; -function createBaseSourceCodeInfo(): SourceCodeInfo { - return { location: [] }; -} +const baseSourceCodeInfo: object = {}; export const SourceCodeInfo = { - encode(message: SourceCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: SourceCodeInfo, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { for (const v of message.location) { SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -3531,12 +4790,15 @@ export const SourceCodeInfo = { decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSourceCodeInfo(); + const message = { ...baseSourceCodeInfo } as SourceCodeInfo; + message.location = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); + message.location.push( + SourceCodeInfo_Location.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -3547,42 +4809,53 @@ export const SourceCodeInfo = { }, fromJSON(object: any): SourceCodeInfo { - return { - location: Array.isArray(object?.location) - ? object.location.map((e: any) => SourceCodeInfo_Location.fromJSON(e)) - : [], - }; + const message = { ...baseSourceCodeInfo } as SourceCodeInfo; + message.location = []; + if (object.location !== undefined && object.location !== null) { + for (const e of object.location) { + message.location.push(SourceCodeInfo_Location.fromJSON(e)); + } + } + return message; }, toJSON(message: SourceCodeInfo): unknown { const obj: any = {}; if (message.location) { - obj.location = message.location.map(e => (e ? SourceCodeInfo_Location.toJSON(e) : undefined)); + obj.location = message.location.map((e) => + e ? SourceCodeInfo_Location.toJSON(e) : undefined + ); } else { obj.location = []; } return obj; }, - fromPartial, I>>(object: I): SourceCodeInfo { - const message = createBaseSourceCodeInfo(); - message.location = object.location?.map(e => SourceCodeInfo_Location.fromPartial(e)) || []; + fromPartial(object: DeepPartial): SourceCodeInfo { + const message = { ...baseSourceCodeInfo } as SourceCodeInfo; + message.location = []; + if (object.location !== undefined && object.location !== null) { + for (const e of object.location) { + message.location.push(SourceCodeInfo_Location.fromPartial(e)); + } + } return message; }, }; -function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location { - return { - path: [], - span: [], - leadingComments: "", - trailingComments: "", - leadingDetachedComments: [], - }; -} +const baseSourceCodeInfo_Location: object = { + path: 0, + span: 0, + leadingComments: "", + trailingComments: "", + leadingDetachedComments: "", +}; export const SourceCodeInfo_Location = { - encode(message: SourceCodeInfo_Location, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: SourceCodeInfo_Location, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { writer.uint32(10).fork(); for (const v of message.path) { writer.int32(v); @@ -3605,10 +4878,18 @@ export const SourceCodeInfo_Location = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo_Location { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): SourceCodeInfo_Location { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSourceCodeInfo_Location(); + const message = { + ...baseSourceCodeInfo_Location, + } as SourceCodeInfo_Location; + message.path = []; + message.span = []; + message.leadingDetachedComments = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3650,60 +4931,134 @@ export const SourceCodeInfo_Location = { }, fromJSON(object: any): SourceCodeInfo_Location { - return { - path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [], - span: Array.isArray(object?.span) ? object.span.map((e: any) => Number(e)) : [], - leadingComments: isSet(object.leadingComments) ? String(object.leadingComments) : "", - trailingComments: isSet(object.trailingComments) ? String(object.trailingComments) : "", - leadingDetachedComments: Array.isArray(object?.leadingDetachedComments) - ? object.leadingDetachedComments.map((e: any) => String(e)) - : [], - }; + const message = { + ...baseSourceCodeInfo_Location, + } as SourceCodeInfo_Location; + message.path = []; + message.span = []; + message.leadingDetachedComments = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(Number(e)); + } + } + if (object.span !== undefined && object.span !== null) { + for (const e of object.span) { + message.span.push(Number(e)); + } + } + if ( + object.leadingComments !== undefined && + object.leadingComments !== null + ) { + message.leadingComments = String(object.leadingComments); + } else { + message.leadingComments = ""; + } + if ( + object.trailingComments !== undefined && + object.trailingComments !== null + ) { + message.trailingComments = String(object.trailingComments); + } else { + message.trailingComments = ""; + } + if ( + object.leadingDetachedComments !== undefined && + object.leadingDetachedComments !== null + ) { + for (const e of object.leadingDetachedComments) { + message.leadingDetachedComments.push(String(e)); + } + } + return message; }, toJSON(message: SourceCodeInfo_Location): unknown { const obj: any = {}; if (message.path) { - obj.path = message.path.map(e => Math.round(e)); + obj.path = message.path.map((e) => e); } else { obj.path = []; } if (message.span) { - obj.span = message.span.map(e => Math.round(e)); + obj.span = message.span.map((e) => e); } else { obj.span = []; } - message.leadingComments !== undefined && (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && (obj.trailingComments = message.trailingComments); + message.leadingComments !== undefined && + (obj.leadingComments = message.leadingComments); + message.trailingComments !== undefined && + (obj.trailingComments = message.trailingComments); if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map(e => e); + obj.leadingDetachedComments = message.leadingDetachedComments.map( + (e) => e + ); } else { obj.leadingDetachedComments = []; } return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): SourceCodeInfo_Location { - const message = createBaseSourceCodeInfo_Location(); - message.path = object.path?.map(e => e) || []; - message.span = object.span?.map(e => e) || []; - message.leadingComments = object.leadingComments ?? ""; - message.trailingComments = object.trailingComments ?? ""; - message.leadingDetachedComments = object.leadingDetachedComments?.map(e => e) || []; + const message = { + ...baseSourceCodeInfo_Location, + } as SourceCodeInfo_Location; + message.path = []; + message.span = []; + message.leadingDetachedComments = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(e); + } + } + if (object.span !== undefined && object.span !== null) { + for (const e of object.span) { + message.span.push(e); + } + } + if ( + object.leadingComments !== undefined && + object.leadingComments !== null + ) { + message.leadingComments = object.leadingComments; + } else { + message.leadingComments = ""; + } + if ( + object.trailingComments !== undefined && + object.trailingComments !== null + ) { + message.trailingComments = object.trailingComments; + } else { + message.trailingComments = ""; + } + if ( + object.leadingDetachedComments !== undefined && + object.leadingDetachedComments !== null + ) { + for (const e of object.leadingDetachedComments) { + message.leadingDetachedComments.push(e); + } + } return message; }, }; -function createBaseGeneratedCodeInfo(): GeneratedCodeInfo { - return { annotation: [] }; -} +const baseGeneratedCodeInfo: object = {}; export const GeneratedCodeInfo = { - encode(message: GeneratedCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: GeneratedCodeInfo, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode(v!, writer.uint32(10).fork()).ldelim(); + GeneratedCodeInfo_Annotation.encode( + v!, + writer.uint32(10).fork() + ).ldelim(); } return writer; }, @@ -3711,12 +5066,15 @@ export const GeneratedCodeInfo = { decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGeneratedCodeInfo(); + const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; + message.annotation = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); + message.annotation.push( + GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -3727,18 +5085,21 @@ export const GeneratedCodeInfo = { }, fromJSON(object: any): GeneratedCodeInfo { - return { - annotation: Array.isArray(object?.annotation) - ? object.annotation.map((e: any) => GeneratedCodeInfo_Annotation.fromJSON(e)) - : [], - }; + const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; + message.annotation = []; + if (object.annotation !== undefined && object.annotation !== null) { + for (const e of object.annotation) { + message.annotation.push(GeneratedCodeInfo_Annotation.fromJSON(e)); + } + } + return message; }, toJSON(message: GeneratedCodeInfo): unknown { const obj: any = {}; if (message.annotation) { - obj.annotation = message.annotation.map(e => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined, + obj.annotation = message.annotation.map((e) => + e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined ); } else { obj.annotation = []; @@ -3746,22 +5107,29 @@ export const GeneratedCodeInfo = { return obj; }, - fromPartial, I>>(object: I): GeneratedCodeInfo { - const message = createBaseGeneratedCodeInfo(); - message.annotation = - object.annotation?.map(e => GeneratedCodeInfo_Annotation.fromPartial(e)) || []; + fromPartial(object: DeepPartial): GeneratedCodeInfo { + const message = { ...baseGeneratedCodeInfo } as GeneratedCodeInfo; + message.annotation = []; + if (object.annotation !== undefined && object.annotation !== null) { + for (const e of object.annotation) { + message.annotation.push(GeneratedCodeInfo_Annotation.fromPartial(e)); + } + } return message; }, }; -function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation { - return { path: [], sourceFile: "", begin: 0, end: 0 }; -} +const baseGeneratedCodeInfo_Annotation: object = { + path: 0, + sourceFile: "", + begin: 0, + end: 0, +}; export const GeneratedCodeInfo_Annotation = { encode( message: GeneratedCodeInfo_Annotation, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { writer.uint32(10).fork(); for (const v of message.path) { @@ -3780,10 +5148,16 @@ export const GeneratedCodeInfo_Annotation = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GeneratedCodeInfo_Annotation { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGeneratedCodeInfo_Annotation(); + const message = { + ...baseGeneratedCodeInfo_Annotation, + } as GeneratedCodeInfo_Annotation; + message.path = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3815,35 +5189,73 @@ export const GeneratedCodeInfo_Annotation = { }, fromJSON(object: any): GeneratedCodeInfo_Annotation { - return { - path: Array.isArray(object?.path) ? object.path.map((e: any) => Number(e)) : [], - sourceFile: isSet(object.sourceFile) ? String(object.sourceFile) : "", - begin: isSet(object.begin) ? Number(object.begin) : 0, - end: isSet(object.end) ? Number(object.end) : 0, - }; + const message = { + ...baseGeneratedCodeInfo_Annotation, + } as GeneratedCodeInfo_Annotation; + message.path = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(Number(e)); + } + } + if (object.sourceFile !== undefined && object.sourceFile !== null) { + message.sourceFile = String(object.sourceFile); + } else { + message.sourceFile = ""; + } + if (object.begin !== undefined && object.begin !== null) { + message.begin = Number(object.begin); + } else { + message.begin = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = Number(object.end); + } else { + message.end = 0; + } + return message; }, toJSON(message: GeneratedCodeInfo_Annotation): unknown { const obj: any = {}; if (message.path) { - obj.path = message.path.map(e => Math.round(e)); + obj.path = message.path.map((e) => e); } else { obj.path = []; } message.sourceFile !== undefined && (obj.sourceFile = message.sourceFile); - message.begin !== undefined && (obj.begin = Math.round(message.begin)); - message.end !== undefined && (obj.end = Math.round(message.end)); + message.begin !== undefined && (obj.begin = message.begin); + message.end !== undefined && (obj.end = message.end); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GeneratedCodeInfo_Annotation { - const message = createBaseGeneratedCodeInfo_Annotation(); - message.path = object.path?.map(e => e) || []; - message.sourceFile = object.sourceFile ?? ""; - message.begin = object.begin ?? 0; - message.end = object.end ?? 0; + const message = { + ...baseGeneratedCodeInfo_Annotation, + } as GeneratedCodeInfo_Annotation; + message.path = []; + if (object.path !== undefined && object.path !== null) { + for (const e of object.path) { + message.path.push(e); + } + } + if (object.sourceFile !== undefined && object.sourceFile !== null) { + message.sourceFile = object.sourceFile; + } else { + message.sourceFile = ""; + } + if (object.begin !== undefined && object.begin !== null) { + message.begin = object.begin; + } else { + message.begin = 0; + } + if (object.end !== undefined && object.end !== null) { + message.end = object.end; + } else { + message.end = 0; + } return message; }, }; @@ -3860,7 +5272,8 @@ var globalThis: any = (() => { })(); const atob: (b64: string) => string = - globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); + globalThis.atob || + ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -3871,7 +5284,8 @@ function bytesFromBase64(b64: string): Uint8Array { } const btoa: (bin: string) => string = - globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); + globalThis.btoa || + ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; for (const byte of arr) { @@ -3880,8 +5294,14 @@ function base64FromBytes(arr: Uint8Array): string { return btoa(bin.join("")); } -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array @@ -3892,11 +5312,6 @@ export type DeepPartial = T extends Builtin ? { [K in keyof T]?: DeepPartial } : Partial; -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record>, never>; - function longToNumber(long: Long): number { if (long.gt(Number.MAX_SAFE_INTEGER)) { throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); @@ -3908,7 +5323,3 @@ if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; _m0.configure(); } - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/dashboard/src/gen/google/protobuf/struct.ts b/dashboard/src/gen/google/protobuf/struct.ts index a5c5d4cf2bf..6dc03823fc5 100644 --- a/dashboard/src/gen/google/protobuf/struct.ts +++ b/dashboard/src/gen/google/protobuf/struct.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import Long from "long"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; export const protobufPackage = "google.protobuf"; @@ -49,12 +49,12 @@ export function nullValueToJSON(object: NullValue): string { */ export interface Struct { /** Unordered map of dynamically typed values. */ - fields: { [key: string]: any }; + fields: { [key: string]: Value }; } export interface Struct_FieldsEntry { key: string; - value?: any; + value?: Value; } /** @@ -75,9 +75,9 @@ export interface Value { /** Represents a boolean value. */ boolValue: boolean | undefined; /** Represents a structured value. */ - structValue?: { [key: string]: any }; + structValue?: Struct | undefined; /** Represents a repeated `Value`. */ - listValue?: Array; + listValue?: ListValue | undefined; } /** @@ -87,19 +87,21 @@ export interface Value { */ export interface ListValue { /** Repeated field of dynamically typed values. */ - values: any[]; + values: Value[]; } -function createBaseStruct(): Struct { - return { fields: {} }; -} +const baseStruct: object = {}; export const Struct = { - encode(message: Struct, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Struct, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { Object.entries(message.fields).forEach(([key, value]) => { - if (value !== undefined) { - Struct_FieldsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).ldelim(); - } + Struct_FieldsEntry.encode( + { key: key as any, value }, + writer.uint32(10).fork() + ).ldelim(); }); return writer; }, @@ -107,7 +109,8 @@ export const Struct = { decode(input: _m0.Reader | Uint8Array, length?: number): Struct { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStruct(); + const message = { ...baseStruct } as Struct; + message.fields = {}; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -126,14 +129,14 @@ export const Struct = { }, fromJSON(object: any): Struct { - return { - fields: isObject(object.fields) - ? Object.entries(object.fields).reduce<{ [key: string]: any }>((acc, [key, value]) => { - acc[key] = value as any; - return acc; - }, {}) - : {}, - }; + const message = { ...baseStruct } as Struct; + message.fields = {}; + if (object.fields !== undefined && object.fields !== null) { + Object.entries(object.fields).forEach(([key, value]) => { + message.fields[key] = Value.fromJSON(value); + }); + } + return message; }, toJSON(message: Struct): unknown { @@ -141,55 +144,38 @@ export const Struct = { obj.fields = {}; if (message.fields) { Object.entries(message.fields).forEach(([k, v]) => { - obj.fields[k] = v; + obj.fields[k] = Value.toJSON(v); }); } return obj; }, - fromPartial, I>>(object: I): Struct { - const message = createBaseStruct(); - message.fields = Object.entries(object.fields ?? {}).reduce<{ - [key: string]: any; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = value; - } - return acc; - }, {}); - return message; - }, - - wrap(object: { [key: string]: any } | undefined): Struct { - const struct = createBaseStruct(); - if (object !== undefined) { - Object.keys(object).forEach(key => { - struct.fields[key] = object[key]; + fromPartial(object: DeepPartial): Struct { + const message = { ...baseStruct } as Struct; + message.fields = {}; + if (object.fields !== undefined && object.fields !== null) { + Object.entries(object.fields).forEach(([key, value]) => { + if (value !== undefined) { + message.fields[key] = Value.fromPartial(value); + } }); } - return struct; - }, - - unwrap(message: Struct): { [key: string]: any } { - const object: { [key: string]: any } = {}; - Object.keys(message.fields).forEach(key => { - object[key] = message.fields[key]; - }); - return object; + return message; }, }; -function createBaseStruct_FieldsEntry(): Struct_FieldsEntry { - return { key: "", value: undefined }; -} +const baseStruct_FieldsEntry: object = { key: "" }; export const Struct_FieldsEntry = { - encode(message: Struct_FieldsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Struct_FieldsEntry, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).ldelim(); + Value.encode(message.value, writer.uint32(18).fork()).ldelim(); } return writer; }, @@ -197,7 +183,7 @@ export const Struct_FieldsEntry = { decode(input: _m0.Reader | Uint8Array, length?: number): Struct_FieldsEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseStruct_FieldsEntry(); + const message = { ...baseStruct_FieldsEntry } as Struct_FieldsEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -205,7 +191,7 @@ export const Struct_FieldsEntry = { message.key = reader.string(); break; case 2: - message.value = Value.unwrap(Value.decode(reader, reader.uint32())); + message.value = Value.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -216,37 +202,45 @@ export const Struct_FieldsEntry = { }, fromJSON(object: any): Struct_FieldsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object?.value) ? object.value : undefined, - }; + const message = { ...baseStruct_FieldsEntry } as Struct_FieldsEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Value.fromJSON(object.value); + } else { + message.value = undefined; + } + return message; }, toJSON(message: Struct_FieldsEntry): unknown { const obj: any = {}; message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); + message.value !== undefined && + (obj.value = message.value ? Value.toJSON(message.value) : undefined); return obj; }, - fromPartial, I>>(object: I): Struct_FieldsEntry { - const message = createBaseStruct_FieldsEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? undefined; + fromPartial(object: DeepPartial): Struct_FieldsEntry { + const message = { ...baseStruct_FieldsEntry } as Struct_FieldsEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Value.fromPartial(object.value); + } else { + message.value = undefined; + } return message; }, }; -function createBaseValue(): Value { - return { - nullValue: undefined, - numberValue: undefined, - stringValue: undefined, - boolValue: undefined, - structValue: undefined, - listValue: undefined, - }; -} +const baseValue: object = {}; export const Value = { encode(message: Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { @@ -263,10 +257,10 @@ export const Value = { writer.uint32(32).bool(message.boolValue); } if (message.structValue !== undefined) { - Struct.encode(Struct.wrap(message.structValue), writer.uint32(42).fork()).ldelim(); + Struct.encode(message.structValue, writer.uint32(42).fork()).ldelim(); } if (message.listValue !== undefined) { - ListValue.encode(ListValue.wrap(message.listValue), writer.uint32(50).fork()).ldelim(); + ListValue.encode(message.listValue, writer.uint32(50).fork()).ldelim(); } return writer; }, @@ -274,7 +268,7 @@ export const Value = { decode(input: _m0.Reader | Uint8Array, length?: number): Value { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseValue(); + const message = { ...baseValue } as Value; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -291,10 +285,10 @@ export const Value = { message.boolValue = reader.bool(); break; case 5: - message.structValue = Struct.unwrap(Struct.decode(reader, reader.uint32())); + message.structValue = Struct.decode(reader, reader.uint32()); break; case 6: - message.listValue = ListValue.unwrap(ListValue.decode(reader, reader.uint32())); + message.listValue = ListValue.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -305,88 +299,108 @@ export const Value = { }, fromJSON(object: any): Value { - return { - nullValue: isSet(object.nullValue) ? nullValueFromJSON(object.nullValue) : undefined, - numberValue: isSet(object.numberValue) ? Number(object.numberValue) : undefined, - stringValue: isSet(object.stringValue) ? String(object.stringValue) : undefined, - boolValue: isSet(object.boolValue) ? Boolean(object.boolValue) : undefined, - structValue: isObject(object.structValue) ? object.structValue : undefined, - listValue: Array.isArray(object.listValue) ? [...object.listValue] : undefined, - }; + const message = { ...baseValue } as Value; + if (object.nullValue !== undefined && object.nullValue !== null) { + message.nullValue = nullValueFromJSON(object.nullValue); + } else { + message.nullValue = undefined; + } + if (object.numberValue !== undefined && object.numberValue !== null) { + message.numberValue = Number(object.numberValue); + } else { + message.numberValue = undefined; + } + if (object.stringValue !== undefined && object.stringValue !== null) { + message.stringValue = String(object.stringValue); + } else { + message.stringValue = undefined; + } + if (object.boolValue !== undefined && object.boolValue !== null) { + message.boolValue = Boolean(object.boolValue); + } else { + message.boolValue = undefined; + } + if (object.structValue !== undefined && object.structValue !== null) { + message.structValue = Struct.fromJSON(object.structValue); + } else { + message.structValue = undefined; + } + if (object.listValue !== undefined && object.listValue !== null) { + message.listValue = ListValue.fromJSON(object.listValue); + } else { + message.listValue = undefined; + } + return message; }, toJSON(message: Value): unknown { const obj: any = {}; message.nullValue !== undefined && (obj.nullValue = - message.nullValue !== undefined ? nullValueToJSON(message.nullValue) : undefined); - message.numberValue !== undefined && (obj.numberValue = message.numberValue); - message.stringValue !== undefined && (obj.stringValue = message.stringValue); + message.nullValue !== undefined + ? nullValueToJSON(message.nullValue) + : undefined); + message.numberValue !== undefined && + (obj.numberValue = message.numberValue); + message.stringValue !== undefined && + (obj.stringValue = message.stringValue); message.boolValue !== undefined && (obj.boolValue = message.boolValue); - message.structValue !== undefined && (obj.structValue = message.structValue); - message.listValue !== undefined && (obj.listValue = message.listValue); + message.structValue !== undefined && + (obj.structValue = message.structValue + ? Struct.toJSON(message.structValue) + : undefined); + message.listValue !== undefined && + (obj.listValue = message.listValue + ? ListValue.toJSON(message.listValue) + : undefined); return obj; }, - fromPartial, I>>(object: I): Value { - const message = createBaseValue(); - message.nullValue = object.nullValue ?? undefined; - message.numberValue = object.numberValue ?? undefined; - message.stringValue = object.stringValue ?? undefined; - message.boolValue = object.boolValue ?? undefined; - message.structValue = object.structValue ?? undefined; - message.listValue = object.listValue ?? undefined; + fromPartial(object: DeepPartial): Value { + const message = { ...baseValue } as Value; + if (object.nullValue !== undefined && object.nullValue !== null) { + message.nullValue = object.nullValue; + } else { + message.nullValue = undefined; + } + if (object.numberValue !== undefined && object.numberValue !== null) { + message.numberValue = object.numberValue; + } else { + message.numberValue = undefined; + } + if (object.stringValue !== undefined && object.stringValue !== null) { + message.stringValue = object.stringValue; + } else { + message.stringValue = undefined; + } + if (object.boolValue !== undefined && object.boolValue !== null) { + message.boolValue = object.boolValue; + } else { + message.boolValue = undefined; + } + if (object.structValue !== undefined && object.structValue !== null) { + message.structValue = Struct.fromPartial(object.structValue); + } else { + message.structValue = undefined; + } + if (object.listValue !== undefined && object.listValue !== null) { + message.listValue = ListValue.fromPartial(object.listValue); + } else { + message.listValue = undefined; + } return message; }, - - wrap(value: any): Value { - const result = createBaseValue(); - - if (value === null) { - result.nullValue = NullValue.NULL_VALUE; - } else if (typeof value === "boolean") { - result.boolValue = value; - } else if (typeof value === "number") { - result.numberValue = value; - } else if (typeof value === "string") { - result.stringValue = value; - } else if (Array.isArray(value)) { - result.listValue = value; - } else if (typeof value === "object") { - result.structValue = value; - } else if (typeof value !== "undefined") { - throw new Error("Unsupported any value type: " + typeof value); - } - - return result; - }, - - unwrap(message: Value): string | number | boolean | Object | null | Array | undefined { - if (message?.stringValue !== undefined) { - return message.stringValue; - } else if (message?.numberValue !== undefined) { - return message.numberValue; - } else if (message?.boolValue !== undefined) { - return message.boolValue; - } else if (message?.structValue !== undefined) { - return message.structValue; - } else if (message?.listValue !== undefined) { - return message.listValue; - } else if (message?.nullValue !== undefined) { - return null; - } - return undefined; - }, }; -function createBaseListValue(): ListValue { - return { values: [] }; -} +const baseListValue: object = {}; export const ListValue = { - encode(message: ListValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: ListValue, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { for (const v of message.values) { - Value.encode(Value.wrap(v!), writer.uint32(10).fork()).ldelim(); + Value.encode(v!, writer.uint32(10).fork()).ldelim(); } return writer; }, @@ -394,12 +408,13 @@ export const ListValue = { decode(input: _m0.Reader | Uint8Array, length?: number): ListValue { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListValue(); + const message = { ...baseListValue } as ListValue; + message.values = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.values.push(Value.unwrap(Value.decode(reader, reader.uint32()))); + message.values.push(Value.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -410,42 +425,46 @@ export const ListValue = { }, fromJSON(object: any): ListValue { - return { - values: Array.isArray(object?.values) ? [...object.values] : [], - }; + const message = { ...baseListValue } as ListValue; + message.values = []; + if (object.values !== undefined && object.values !== null) { + for (const e of object.values) { + message.values.push(Value.fromJSON(e)); + } + } + return message; }, toJSON(message: ListValue): unknown { const obj: any = {}; if (message.values) { - obj.values = message.values.map(e => e); + obj.values = message.values.map((e) => (e ? Value.toJSON(e) : undefined)); } else { obj.values = []; } return obj; }, - fromPartial, I>>(object: I): ListValue { - const message = createBaseListValue(); - message.values = object.values?.map(e => e) || []; + fromPartial(object: DeepPartial): ListValue { + const message = { ...baseListValue } as ListValue; + message.values = []; + if (object.values !== undefined && object.values !== null) { + for (const e of object.values) { + message.values.push(Value.fromPartial(e)); + } + } return message; }, - - wrap(value: Array | undefined): ListValue { - const result = createBaseListValue(); - - result.values = value ?? []; - - return result; - }, - - unwrap(message: ListValue): Array { - return message.values; - }, }; -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array @@ -456,20 +475,7 @@ export type DeepPartial = T extends Builtin ? { [K in keyof T]?: DeepPartial } : Partial; -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record>, never>; - if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; _m0.configure(); } - -function isObject(value: any): boolean { - return typeof value === "object" && value !== null; -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/dashboard/src/gen/kubeappsapis/apidocs/v1alpha1/apidocs.ts b/dashboard/src/gen/kubeappsapis/apidocs/v1alpha1/apidocs.ts index 97d04686a4f..7a9600dd291 100644 --- a/dashboard/src/gen/kubeappsapis/apidocs/v1alpha1/apidocs.ts +++ b/dashboard/src/gen/kubeappsapis/apidocs/v1alpha1/apidocs.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import Long from "long"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; export const protobufPackage = "kubeappsapis.apidocs.v1alpha1"; diff --git a/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/packages.ts b/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/packages.ts index b50722650c8..0dc36751702 100644 --- a/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/packages.ts +++ b/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/packages.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import Long from "long"; import { grpc } from "@improbable-eng/grpc-web"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; import { Any } from "../../../../google/protobuf/any"; import { Plugin } from "../../../../kubeappsapis/core/plugins/v1alpha1/plugins"; import { BrowserHeaders } from "browser-headers"; @@ -872,7 +872,7 @@ export enum InstalledPackageStatus_StatusReason { } export function installedPackageStatus_StatusReasonFromJSON( - object: any, + object: any ): InstalledPackageStatus_StatusReason { switch (object) { case 0: @@ -898,7 +898,7 @@ export function installedPackageStatus_StatusReasonFromJSON( } export function installedPackageStatus_StatusReasonToJSON( - object: InstalledPackageStatus_StatusReason, + object: InstalledPackageStatus_StatusReason ): string { switch (object) { case InstalledPackageStatus_StatusReason.STATUS_REASON_UNSPECIFIED: @@ -997,35 +997,40 @@ export interface ResourceRef { namespace: string; } -function createBaseGetAvailablePackageSummariesRequest(): GetAvailablePackageSummariesRequest { - return { - context: undefined, - filterOptions: undefined, - paginationOptions: undefined, - }; -} +const baseGetAvailablePackageSummariesRequest: object = {}; export const GetAvailablePackageSummariesRequest = { encode( message: GetAvailablePackageSummariesRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } if (message.filterOptions !== undefined) { - FilterOptions.encode(message.filterOptions, writer.uint32(18).fork()).ldelim(); + FilterOptions.encode( + message.filterOptions, + writer.uint32(18).fork() + ).ldelim(); } if (message.paginationOptions !== undefined) { - PaginationOptions.encode(message.paginationOptions, writer.uint32(26).fork()).ldelim(); + PaginationOptions.encode( + message.paginationOptions, + writer.uint32(26).fork() + ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetAvailablePackageSummariesRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetAvailablePackageSummariesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetAvailablePackageSummariesRequest(); + const message = { + ...baseGetAvailablePackageSummariesRequest, + } as GetAvailablePackageSummariesRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1036,7 +1041,10 @@ export const GetAvailablePackageSummariesRequest = { message.filterOptions = FilterOptions.decode(reader, reader.uint32()); break; case 3: - message.paginationOptions = PaginationOptions.decode(reader, reader.uint32()); + message.paginationOptions = PaginationOptions.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1047,21 +1055,38 @@ export const GetAvailablePackageSummariesRequest = { }, fromJSON(object: any): GetAvailablePackageSummariesRequest { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - filterOptions: isSet(object.filterOptions) - ? FilterOptions.fromJSON(object.filterOptions) - : undefined, - paginationOptions: isSet(object.paginationOptions) - ? PaginationOptions.fromJSON(object.paginationOptions) - : undefined, - }; + const message = { + ...baseGetAvailablePackageSummariesRequest, + } as GetAvailablePackageSummariesRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + if (object.filterOptions !== undefined && object.filterOptions !== null) { + message.filterOptions = FilterOptions.fromJSON(object.filterOptions); + } else { + message.filterOptions = undefined; + } + if ( + object.paginationOptions !== undefined && + object.paginationOptions !== null + ) { + message.paginationOptions = PaginationOptions.fromJSON( + object.paginationOptions + ); + } else { + message.paginationOptions = undefined; + } + return message; }, toJSON(message: GetAvailablePackageSummariesRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); message.filterOptions !== undefined && (obj.filterOptions = message.filterOptions ? FilterOptions.toJSON(message.filterOptions) @@ -1073,39 +1098,47 @@ export const GetAvailablePackageSummariesRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetAvailablePackageSummariesRequest { - const message = createBaseGetAvailablePackageSummariesRequest(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; - message.filterOptions = - object.filterOptions !== undefined && object.filterOptions !== null - ? FilterOptions.fromPartial(object.filterOptions) - : undefined; - message.paginationOptions = - object.paginationOptions !== undefined && object.paginationOptions !== null - ? PaginationOptions.fromPartial(object.paginationOptions) - : undefined; + const message = { + ...baseGetAvailablePackageSummariesRequest, + } as GetAvailablePackageSummariesRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } + if (object.filterOptions !== undefined && object.filterOptions !== null) { + message.filterOptions = FilterOptions.fromPartial(object.filterOptions); + } else { + message.filterOptions = undefined; + } + if ( + object.paginationOptions !== undefined && + object.paginationOptions !== null + ) { + message.paginationOptions = PaginationOptions.fromPartial( + object.paginationOptions + ); + } else { + message.paginationOptions = undefined; + } return message; }, }; -function createBaseGetAvailablePackageDetailRequest(): GetAvailablePackageDetailRequest { - return { availablePackageRef: undefined, pkgVersion: "" }; -} +const baseGetAvailablePackageDetailRequest: object = { pkgVersion: "" }; export const GetAvailablePackageDetailRequest = { encode( message: GetAvailablePackageDetailRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.availablePackageRef !== undefined) { AvailablePackageReference.encode( message.availablePackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } if (message.pkgVersion !== "") { @@ -1114,15 +1147,23 @@ export const GetAvailablePackageDetailRequest = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetAvailablePackageDetailRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetAvailablePackageDetailRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetAvailablePackageDetailRequest(); + const message = { + ...baseGetAvailablePackageDetailRequest, + } as GetAvailablePackageDetailRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.availablePackageRef = AvailablePackageReference.decode(reader, reader.uint32()); + message.availablePackageRef = AvailablePackageReference.decode( + reader, + reader.uint32() + ); break; case 2: message.pkgVersion = reader.string(); @@ -1136,12 +1177,25 @@ export const GetAvailablePackageDetailRequest = { }, fromJSON(object: any): GetAvailablePackageDetailRequest { - return { - availablePackageRef: isSet(object.availablePackageRef) - ? AvailablePackageReference.fromJSON(object.availablePackageRef) - : undefined, - pkgVersion: isSet(object.pkgVersion) ? String(object.pkgVersion) : "", - }; + const message = { + ...baseGetAvailablePackageDetailRequest, + } as GetAvailablePackageDetailRequest; + if ( + object.availablePackageRef !== undefined && + object.availablePackageRef !== null + ) { + message.availablePackageRef = AvailablePackageReference.fromJSON( + object.availablePackageRef + ); + } else { + message.availablePackageRef = undefined; + } + if (object.pkgVersion !== undefined && object.pkgVersion !== null) { + message.pkgVersion = String(object.pkgVersion); + } else { + message.pkgVersion = ""; + } + return message; }, toJSON(message: GetAvailablePackageDetailRequest): unknown { @@ -1154,32 +1208,42 @@ export const GetAvailablePackageDetailRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetAvailablePackageDetailRequest { - const message = createBaseGetAvailablePackageDetailRequest(); - message.availablePackageRef = - object.availablePackageRef !== undefined && object.availablePackageRef !== null - ? AvailablePackageReference.fromPartial(object.availablePackageRef) - : undefined; - message.pkgVersion = object.pkgVersion ?? ""; + const message = { + ...baseGetAvailablePackageDetailRequest, + } as GetAvailablePackageDetailRequest; + if ( + object.availablePackageRef !== undefined && + object.availablePackageRef !== null + ) { + message.availablePackageRef = AvailablePackageReference.fromPartial( + object.availablePackageRef + ); + } else { + message.availablePackageRef = undefined; + } + if (object.pkgVersion !== undefined && object.pkgVersion !== null) { + message.pkgVersion = object.pkgVersion; + } else { + message.pkgVersion = ""; + } return message; }, }; -function createBaseGetAvailablePackageVersionsRequest(): GetAvailablePackageVersionsRequest { - return { availablePackageRef: undefined, pkgVersion: "" }; -} +const baseGetAvailablePackageVersionsRequest: object = { pkgVersion: "" }; export const GetAvailablePackageVersionsRequest = { encode( message: GetAvailablePackageVersionsRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.availablePackageRef !== undefined) { AvailablePackageReference.encode( message.availablePackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } if (message.pkgVersion !== "") { @@ -1188,15 +1252,23 @@ export const GetAvailablePackageVersionsRequest = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetAvailablePackageVersionsRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetAvailablePackageVersionsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetAvailablePackageVersionsRequest(); + const message = { + ...baseGetAvailablePackageVersionsRequest, + } as GetAvailablePackageVersionsRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.availablePackageRef = AvailablePackageReference.decode(reader, reader.uint32()); + message.availablePackageRef = AvailablePackageReference.decode( + reader, + reader.uint32() + ); break; case 2: message.pkgVersion = reader.string(); @@ -1210,12 +1282,25 @@ export const GetAvailablePackageVersionsRequest = { }, fromJSON(object: any): GetAvailablePackageVersionsRequest { - return { - availablePackageRef: isSet(object.availablePackageRef) - ? AvailablePackageReference.fromJSON(object.availablePackageRef) - : undefined, - pkgVersion: isSet(object.pkgVersion) ? String(object.pkgVersion) : "", - }; + const message = { + ...baseGetAvailablePackageVersionsRequest, + } as GetAvailablePackageVersionsRequest; + if ( + object.availablePackageRef !== undefined && + object.availablePackageRef !== null + ) { + message.availablePackageRef = AvailablePackageReference.fromJSON( + object.availablePackageRef + ); + } else { + message.availablePackageRef = undefined; + } + if (object.pkgVersion !== undefined && object.pkgVersion !== null) { + message.pkgVersion = String(object.pkgVersion); + } else { + message.pkgVersion = ""; + } + return message; }, toJSON(message: GetAvailablePackageVersionsRequest): unknown { @@ -1228,41 +1313,59 @@ export const GetAvailablePackageVersionsRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetAvailablePackageVersionsRequest { - const message = createBaseGetAvailablePackageVersionsRequest(); - message.availablePackageRef = - object.availablePackageRef !== undefined && object.availablePackageRef !== null - ? AvailablePackageReference.fromPartial(object.availablePackageRef) - : undefined; - message.pkgVersion = object.pkgVersion ?? ""; + const message = { + ...baseGetAvailablePackageVersionsRequest, + } as GetAvailablePackageVersionsRequest; + if ( + object.availablePackageRef !== undefined && + object.availablePackageRef !== null + ) { + message.availablePackageRef = AvailablePackageReference.fromPartial( + object.availablePackageRef + ); + } else { + message.availablePackageRef = undefined; + } + if (object.pkgVersion !== undefined && object.pkgVersion !== null) { + message.pkgVersion = object.pkgVersion; + } else { + message.pkgVersion = ""; + } return message; }, }; -function createBaseGetInstalledPackageSummariesRequest(): GetInstalledPackageSummariesRequest { - return { context: undefined, paginationOptions: undefined }; -} +const baseGetInstalledPackageSummariesRequest: object = {}; export const GetInstalledPackageSummariesRequest = { encode( message: GetInstalledPackageSummariesRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } if (message.paginationOptions !== undefined) { - PaginationOptions.encode(message.paginationOptions, writer.uint32(18).fork()).ldelim(); + PaginationOptions.encode( + message.paginationOptions, + writer.uint32(18).fork() + ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetInstalledPackageSummariesRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetInstalledPackageSummariesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetInstalledPackageSummariesRequest(); + const message = { + ...baseGetInstalledPackageSummariesRequest, + } as GetInstalledPackageSummariesRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1270,7 +1373,10 @@ export const GetInstalledPackageSummariesRequest = { message.context = Context.decode(reader, reader.uint32()); break; case 2: - message.paginationOptions = PaginationOptions.decode(reader, reader.uint32()); + message.paginationOptions = PaginationOptions.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1281,18 +1387,33 @@ export const GetInstalledPackageSummariesRequest = { }, fromJSON(object: any): GetInstalledPackageSummariesRequest { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - paginationOptions: isSet(object.paginationOptions) - ? PaginationOptions.fromJSON(object.paginationOptions) - : undefined, - }; + const message = { + ...baseGetInstalledPackageSummariesRequest, + } as GetInstalledPackageSummariesRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + if ( + object.paginationOptions !== undefined && + object.paginationOptions !== null + ) { + message.paginationOptions = PaginationOptions.fromJSON( + object.paginationOptions + ); + } else { + message.paginationOptions = undefined; + } + return message; }, toJSON(message: GetInstalledPackageSummariesRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); message.paginationOptions !== undefined && (obj.paginationOptions = message.paginationOptions ? PaginationOptions.toJSON(message.paginationOptions) @@ -1300,49 +1421,64 @@ export const GetInstalledPackageSummariesRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetInstalledPackageSummariesRequest { - const message = createBaseGetInstalledPackageSummariesRequest(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; - message.paginationOptions = - object.paginationOptions !== undefined && object.paginationOptions !== null - ? PaginationOptions.fromPartial(object.paginationOptions) - : undefined; + const message = { + ...baseGetInstalledPackageSummariesRequest, + } as GetInstalledPackageSummariesRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } + if ( + object.paginationOptions !== undefined && + object.paginationOptions !== null + ) { + message.paginationOptions = PaginationOptions.fromPartial( + object.paginationOptions + ); + } else { + message.paginationOptions = undefined; + } return message; }, }; -function createBaseGetInstalledPackageDetailRequest(): GetInstalledPackageDetailRequest { - return { installedPackageRef: undefined }; -} +const baseGetInstalledPackageDetailRequest: object = {}; export const GetInstalledPackageDetailRequest = { encode( message: GetInstalledPackageDetailRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetInstalledPackageDetailRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetInstalledPackageDetailRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetInstalledPackageDetailRequest(); + const message = { + ...baseGetInstalledPackageDetailRequest, + } as GetInstalledPackageDetailRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); + message.installedPackageRef = InstalledPackageReference.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1353,11 +1489,20 @@ export const GetInstalledPackageDetailRequest = { }, fromJSON(object: any): GetInstalledPackageDetailRequest { - return { - installedPackageRef: isSet(object.installedPackageRef) - ? InstalledPackageReference.fromJSON(object.installedPackageRef) - : undefined, - }; + const message = { + ...baseGetInstalledPackageDetailRequest, + } as GetInstalledPackageDetailRequest; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromJSON( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + return message; }, toJSON(message: GetInstalledPackageDetailRequest): unknown { @@ -1369,38 +1514,37 @@ export const GetInstalledPackageDetailRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetInstalledPackageDetailRequest { - const message = createBaseGetInstalledPackageDetailRequest(); - message.installedPackageRef = - object.installedPackageRef !== undefined && object.installedPackageRef !== null - ? InstalledPackageReference.fromPartial(object.installedPackageRef) - : undefined; + const message = { + ...baseGetInstalledPackageDetailRequest, + } as GetInstalledPackageDetailRequest; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromPartial( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } return message; }, }; -function createBaseCreateInstalledPackageRequest(): CreateInstalledPackageRequest { - return { - availablePackageRef: undefined, - targetContext: undefined, - name: "", - pkgVersionReference: undefined, - values: "", - reconciliationOptions: undefined, - }; -} +const baseCreateInstalledPackageRequest: object = { name: "", values: "" }; export const CreateInstalledPackageRequest = { encode( message: CreateInstalledPackageRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.availablePackageRef !== undefined) { AvailablePackageReference.encode( message.availablePackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } if (message.targetContext !== undefined) { @@ -1410,7 +1554,10 @@ export const CreateInstalledPackageRequest = { writer.uint32(26).string(message.name); } if (message.pkgVersionReference !== undefined) { - VersionReference.encode(message.pkgVersionReference, writer.uint32(34).fork()).ldelim(); + VersionReference.encode( + message.pkgVersionReference, + writer.uint32(34).fork() + ).ldelim(); } if (message.values !== "") { writer.uint32(42).string(message.values); @@ -1418,21 +1565,29 @@ export const CreateInstalledPackageRequest = { if (message.reconciliationOptions !== undefined) { ReconciliationOptions.encode( message.reconciliationOptions, - writer.uint32(50).fork(), + writer.uint32(50).fork() ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateInstalledPackageRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): CreateInstalledPackageRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateInstalledPackageRequest(); + const message = { + ...baseCreateInstalledPackageRequest, + } as CreateInstalledPackageRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.availablePackageRef = AvailablePackageReference.decode(reader, reader.uint32()); + message.availablePackageRef = AvailablePackageReference.decode( + reader, + reader.uint32() + ); break; case 2: message.targetContext = Context.decode(reader, reader.uint32()); @@ -1441,13 +1596,19 @@ export const CreateInstalledPackageRequest = { message.name = reader.string(); break; case 4: - message.pkgVersionReference = VersionReference.decode(reader, reader.uint32()); + message.pkgVersionReference = VersionReference.decode( + reader, + reader.uint32() + ); break; case 5: message.values = reader.string(); break; case 6: - message.reconciliationOptions = ReconciliationOptions.decode(reader, reader.uint32()); + message.reconciliationOptions = ReconciliationOptions.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1458,22 +1619,55 @@ export const CreateInstalledPackageRequest = { }, fromJSON(object: any): CreateInstalledPackageRequest { - return { - availablePackageRef: isSet(object.availablePackageRef) - ? AvailablePackageReference.fromJSON(object.availablePackageRef) - : undefined, - targetContext: isSet(object.targetContext) - ? Context.fromJSON(object.targetContext) - : undefined, - name: isSet(object.name) ? String(object.name) : "", - pkgVersionReference: isSet(object.pkgVersionReference) - ? VersionReference.fromJSON(object.pkgVersionReference) - : undefined, - values: isSet(object.values) ? String(object.values) : "", - reconciliationOptions: isSet(object.reconciliationOptions) - ? ReconciliationOptions.fromJSON(object.reconciliationOptions) - : undefined, - }; + const message = { + ...baseCreateInstalledPackageRequest, + } as CreateInstalledPackageRequest; + if ( + object.availablePackageRef !== undefined && + object.availablePackageRef !== null + ) { + message.availablePackageRef = AvailablePackageReference.fromJSON( + object.availablePackageRef + ); + } else { + message.availablePackageRef = undefined; + } + if (object.targetContext !== undefined && object.targetContext !== null) { + message.targetContext = Context.fromJSON(object.targetContext); + } else { + message.targetContext = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if ( + object.pkgVersionReference !== undefined && + object.pkgVersionReference !== null + ) { + message.pkgVersionReference = VersionReference.fromJSON( + object.pkgVersionReference + ); + } else { + message.pkgVersionReference = undefined; + } + if (object.values !== undefined && object.values !== null) { + message.values = String(object.values); + } else { + message.values = ""; + } + if ( + object.reconciliationOptions !== undefined && + object.reconciliationOptions !== null + ) { + message.reconciliationOptions = ReconciliationOptions.fromJSON( + object.reconciliationOptions + ); + } else { + message.reconciliationOptions = undefined; + } + return message; }, toJSON(message: CreateInstalledPackageRequest): unknown { @@ -1499,54 +1693,79 @@ export const CreateInstalledPackageRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): CreateInstalledPackageRequest { - const message = createBaseCreateInstalledPackageRequest(); - message.availablePackageRef = - object.availablePackageRef !== undefined && object.availablePackageRef !== null - ? AvailablePackageReference.fromPartial(object.availablePackageRef) - : undefined; - message.targetContext = - object.targetContext !== undefined && object.targetContext !== null - ? Context.fromPartial(object.targetContext) - : undefined; - message.name = object.name ?? ""; - message.pkgVersionReference = - object.pkgVersionReference !== undefined && object.pkgVersionReference !== null - ? VersionReference.fromPartial(object.pkgVersionReference) - : undefined; - message.values = object.values ?? ""; - message.reconciliationOptions = - object.reconciliationOptions !== undefined && object.reconciliationOptions !== null - ? ReconciliationOptions.fromPartial(object.reconciliationOptions) - : undefined; + const message = { + ...baseCreateInstalledPackageRequest, + } as CreateInstalledPackageRequest; + if ( + object.availablePackageRef !== undefined && + object.availablePackageRef !== null + ) { + message.availablePackageRef = AvailablePackageReference.fromPartial( + object.availablePackageRef + ); + } else { + message.availablePackageRef = undefined; + } + if (object.targetContext !== undefined && object.targetContext !== null) { + message.targetContext = Context.fromPartial(object.targetContext); + } else { + message.targetContext = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if ( + object.pkgVersionReference !== undefined && + object.pkgVersionReference !== null + ) { + message.pkgVersionReference = VersionReference.fromPartial( + object.pkgVersionReference + ); + } else { + message.pkgVersionReference = undefined; + } + if (object.values !== undefined && object.values !== null) { + message.values = object.values; + } else { + message.values = ""; + } + if ( + object.reconciliationOptions !== undefined && + object.reconciliationOptions !== null + ) { + message.reconciliationOptions = ReconciliationOptions.fromPartial( + object.reconciliationOptions + ); + } else { + message.reconciliationOptions = undefined; + } return message; }, }; -function createBaseUpdateInstalledPackageRequest(): UpdateInstalledPackageRequest { - return { - installedPackageRef: undefined, - pkgVersionReference: undefined, - values: "", - reconciliationOptions: undefined, - }; -} +const baseUpdateInstalledPackageRequest: object = { values: "" }; export const UpdateInstalledPackageRequest = { encode( message: UpdateInstalledPackageRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } if (message.pkgVersionReference !== undefined) { - VersionReference.encode(message.pkgVersionReference, writer.uint32(18).fork()).ldelim(); + VersionReference.encode( + message.pkgVersionReference, + writer.uint32(18).fork() + ).ldelim(); } if (message.values !== "") { writer.uint32(26).string(message.values); @@ -1554,30 +1773,44 @@ export const UpdateInstalledPackageRequest = { if (message.reconciliationOptions !== undefined) { ReconciliationOptions.encode( message.reconciliationOptions, - writer.uint32(34).fork(), + writer.uint32(34).fork() ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateInstalledPackageRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): UpdateInstalledPackageRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateInstalledPackageRequest(); + const message = { + ...baseUpdateInstalledPackageRequest, + } as UpdateInstalledPackageRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); + message.installedPackageRef = InstalledPackageReference.decode( + reader, + reader.uint32() + ); break; case 2: - message.pkgVersionReference = VersionReference.decode(reader, reader.uint32()); + message.pkgVersionReference = VersionReference.decode( + reader, + reader.uint32() + ); break; case 3: message.values = reader.string(); break; case 4: - message.reconciliationOptions = ReconciliationOptions.decode(reader, reader.uint32()); + message.reconciliationOptions = ReconciliationOptions.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1588,18 +1821,45 @@ export const UpdateInstalledPackageRequest = { }, fromJSON(object: any): UpdateInstalledPackageRequest { - return { - installedPackageRef: isSet(object.installedPackageRef) - ? InstalledPackageReference.fromJSON(object.installedPackageRef) - : undefined, - pkgVersionReference: isSet(object.pkgVersionReference) - ? VersionReference.fromJSON(object.pkgVersionReference) - : undefined, - values: isSet(object.values) ? String(object.values) : "", - reconciliationOptions: isSet(object.reconciliationOptions) - ? ReconciliationOptions.fromJSON(object.reconciliationOptions) - : undefined, - }; + const message = { + ...baseUpdateInstalledPackageRequest, + } as UpdateInstalledPackageRequest; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromJSON( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + if ( + object.pkgVersionReference !== undefined && + object.pkgVersionReference !== null + ) { + message.pkgVersionReference = VersionReference.fromJSON( + object.pkgVersionReference + ); + } else { + message.pkgVersionReference = undefined; + } + if (object.values !== undefined && object.values !== null) { + message.values = String(object.values); + } else { + message.values = ""; + } + if ( + object.reconciliationOptions !== undefined && + object.reconciliationOptions !== null + ) { + message.reconciliationOptions = ReconciliationOptions.fromJSON( + object.reconciliationOptions + ); + } else { + message.reconciliationOptions = undefined; + } + return message; }, toJSON(message: UpdateInstalledPackageRequest): unknown { @@ -1620,54 +1880,84 @@ export const UpdateInstalledPackageRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): UpdateInstalledPackageRequest { - const message = createBaseUpdateInstalledPackageRequest(); - message.installedPackageRef = - object.installedPackageRef !== undefined && object.installedPackageRef !== null - ? InstalledPackageReference.fromPartial(object.installedPackageRef) - : undefined; - message.pkgVersionReference = - object.pkgVersionReference !== undefined && object.pkgVersionReference !== null - ? VersionReference.fromPartial(object.pkgVersionReference) - : undefined; - message.values = object.values ?? ""; - message.reconciliationOptions = - object.reconciliationOptions !== undefined && object.reconciliationOptions !== null - ? ReconciliationOptions.fromPartial(object.reconciliationOptions) - : undefined; + const message = { + ...baseUpdateInstalledPackageRequest, + } as UpdateInstalledPackageRequest; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromPartial( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + if ( + object.pkgVersionReference !== undefined && + object.pkgVersionReference !== null + ) { + message.pkgVersionReference = VersionReference.fromPartial( + object.pkgVersionReference + ); + } else { + message.pkgVersionReference = undefined; + } + if (object.values !== undefined && object.values !== null) { + message.values = object.values; + } else { + message.values = ""; + } + if ( + object.reconciliationOptions !== undefined && + object.reconciliationOptions !== null + ) { + message.reconciliationOptions = ReconciliationOptions.fromPartial( + object.reconciliationOptions + ); + } else { + message.reconciliationOptions = undefined; + } return message; }, }; -function createBaseDeleteInstalledPackageRequest(): DeleteInstalledPackageRequest { - return { installedPackageRef: undefined }; -} +const baseDeleteInstalledPackageRequest: object = {}; export const DeleteInstalledPackageRequest = { encode( message: DeleteInstalledPackageRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteInstalledPackageRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): DeleteInstalledPackageRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteInstalledPackageRequest(); + const message = { + ...baseDeleteInstalledPackageRequest, + } as DeleteInstalledPackageRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); + message.installedPackageRef = InstalledPackageReference.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1678,11 +1968,20 @@ export const DeleteInstalledPackageRequest = { }, fromJSON(object: any): DeleteInstalledPackageRequest { - return { - installedPackageRef: isSet(object.installedPackageRef) - ? InstalledPackageReference.fromJSON(object.installedPackageRef) - : undefined, - }; + const message = { + ...baseDeleteInstalledPackageRequest, + } as DeleteInstalledPackageRequest; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromJSON( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + return message; }, toJSON(message: DeleteInstalledPackageRequest): unknown { @@ -1694,45 +1993,59 @@ export const DeleteInstalledPackageRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): DeleteInstalledPackageRequest { - const message = createBaseDeleteInstalledPackageRequest(); - message.installedPackageRef = - object.installedPackageRef !== undefined && object.installedPackageRef !== null - ? InstalledPackageReference.fromPartial(object.installedPackageRef) - : undefined; + const message = { + ...baseDeleteInstalledPackageRequest, + } as DeleteInstalledPackageRequest; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromPartial( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } return message; }, }; -function createBaseGetInstalledPackageResourceRefsRequest(): GetInstalledPackageResourceRefsRequest { - return { installedPackageRef: undefined }; -} +const baseGetInstalledPackageResourceRefsRequest: object = {}; export const GetInstalledPackageResourceRefsRequest = { encode( message: GetInstalledPackageResourceRefsRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetInstalledPackageResourceRefsRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetInstalledPackageResourceRefsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetInstalledPackageResourceRefsRequest(); + const message = { + ...baseGetInstalledPackageResourceRefsRequest, + } as GetInstalledPackageResourceRefsRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); + message.installedPackageRef = InstalledPackageReference.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1743,11 +2056,20 @@ export const GetInstalledPackageResourceRefsRequest = { }, fromJSON(object: any): GetInstalledPackageResourceRefsRequest { - return { - installedPackageRef: isSet(object.installedPackageRef) - ? InstalledPackageReference.fromJSON(object.installedPackageRef) - : undefined, - }; + const message = { + ...baseGetInstalledPackageResourceRefsRequest, + } as GetInstalledPackageResourceRefsRequest; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromJSON( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + return message; }, toJSON(message: GetInstalledPackageResourceRefsRequest): unknown { @@ -1759,26 +2081,35 @@ export const GetInstalledPackageResourceRefsRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetInstalledPackageResourceRefsRequest { - const message = createBaseGetInstalledPackageResourceRefsRequest(); - message.installedPackageRef = - object.installedPackageRef !== undefined && object.installedPackageRef !== null - ? InstalledPackageReference.fromPartial(object.installedPackageRef) - : undefined; + const message = { + ...baseGetInstalledPackageResourceRefsRequest, + } as GetInstalledPackageResourceRefsRequest; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromPartial( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } return message; }, }; -function createBaseGetAvailablePackageSummariesResponse(): GetAvailablePackageSummariesResponse { - return { availablePackageSummaries: [], nextPageToken: "", categories: [] }; -} +const baseGetAvailablePackageSummariesResponse: object = { + nextPageToken: "", + categories: "", +}; export const GetAvailablePackageSummariesResponse = { encode( message: GetAvailablePackageSummariesResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { for (const v of message.availablePackageSummaries) { AvailablePackageSummary.encode(v!, writer.uint32(10).fork()).ldelim(); @@ -1792,16 +2123,23 @@ export const GetAvailablePackageSummariesResponse = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetAvailablePackageSummariesResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetAvailablePackageSummariesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetAvailablePackageSummariesResponse(); + const message = { + ...baseGetAvailablePackageSummariesResponse, + } as GetAvailablePackageSummariesResponse; + message.availablePackageSummaries = []; + message.categories = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.availablePackageSummaries.push( - AvailablePackageSummary.decode(reader, reader.uint32()), + AvailablePackageSummary.decode(reader, reader.uint32()) ); break; case 2: @@ -1819,74 +2157,118 @@ export const GetAvailablePackageSummariesResponse = { }, fromJSON(object: any): GetAvailablePackageSummariesResponse { - return { - availablePackageSummaries: Array.isArray(object?.availablePackageSummaries) - ? object.availablePackageSummaries.map((e: any) => AvailablePackageSummary.fromJSON(e)) - : [], - nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "", - categories: Array.isArray(object?.categories) - ? object.categories.map((e: any) => String(e)) - : [], - }; + const message = { + ...baseGetAvailablePackageSummariesResponse, + } as GetAvailablePackageSummariesResponse; + message.availablePackageSummaries = []; + message.categories = []; + if ( + object.availablePackageSummaries !== undefined && + object.availablePackageSummaries !== null + ) { + for (const e of object.availablePackageSummaries) { + message.availablePackageSummaries.push( + AvailablePackageSummary.fromJSON(e) + ); + } + } + if (object.nextPageToken !== undefined && object.nextPageToken !== null) { + message.nextPageToken = String(object.nextPageToken); + } else { + message.nextPageToken = ""; + } + if (object.categories !== undefined && object.categories !== null) { + for (const e of object.categories) { + message.categories.push(String(e)); + } + } + return message; }, toJSON(message: GetAvailablePackageSummariesResponse): unknown { const obj: any = {}; if (message.availablePackageSummaries) { - obj.availablePackageSummaries = message.availablePackageSummaries.map(e => - e ? AvailablePackageSummary.toJSON(e) : undefined, + obj.availablePackageSummaries = message.availablePackageSummaries.map( + (e) => (e ? AvailablePackageSummary.toJSON(e) : undefined) ); } else { obj.availablePackageSummaries = []; } - message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken); + message.nextPageToken !== undefined && + (obj.nextPageToken = message.nextPageToken); if (message.categories) { - obj.categories = message.categories.map(e => e); + obj.categories = message.categories.map((e) => e); } else { obj.categories = []; } return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetAvailablePackageSummariesResponse { - const message = createBaseGetAvailablePackageSummariesResponse(); - message.availablePackageSummaries = - object.availablePackageSummaries?.map(e => AvailablePackageSummary.fromPartial(e)) || []; - message.nextPageToken = object.nextPageToken ?? ""; - message.categories = object.categories?.map(e => e) || []; + const message = { + ...baseGetAvailablePackageSummariesResponse, + } as GetAvailablePackageSummariesResponse; + message.availablePackageSummaries = []; + message.categories = []; + if ( + object.availablePackageSummaries !== undefined && + object.availablePackageSummaries !== null + ) { + for (const e of object.availablePackageSummaries) { + message.availablePackageSummaries.push( + AvailablePackageSummary.fromPartial(e) + ); + } + } + if (object.nextPageToken !== undefined && object.nextPageToken !== null) { + message.nextPageToken = object.nextPageToken; + } else { + message.nextPageToken = ""; + } + if (object.categories !== undefined && object.categories !== null) { + for (const e of object.categories) { + message.categories.push(e); + } + } return message; }, }; -function createBaseGetAvailablePackageDetailResponse(): GetAvailablePackageDetailResponse { - return { availablePackageDetail: undefined }; -} +const baseGetAvailablePackageDetailResponse: object = {}; export const GetAvailablePackageDetailResponse = { encode( message: GetAvailablePackageDetailResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.availablePackageDetail !== undefined) { AvailablePackageDetail.encode( message.availablePackageDetail, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetAvailablePackageDetailResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetAvailablePackageDetailResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetAvailablePackageDetailResponse(); + const message = { + ...baseGetAvailablePackageDetailResponse, + } as GetAvailablePackageDetailResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.availablePackageDetail = AvailablePackageDetail.decode(reader, reader.uint32()); + message.availablePackageDetail = AvailablePackageDetail.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1897,11 +2279,20 @@ export const GetAvailablePackageDetailResponse = { }, fromJSON(object: any): GetAvailablePackageDetailResponse { - return { - availablePackageDetail: isSet(object.availablePackageDetail) - ? AvailablePackageDetail.fromJSON(object.availablePackageDetail) - : undefined, - }; + const message = { + ...baseGetAvailablePackageDetailResponse, + } as GetAvailablePackageDetailResponse; + if ( + object.availablePackageDetail !== undefined && + object.availablePackageDetail !== null + ) { + message.availablePackageDetail = AvailablePackageDetail.fromJSON( + object.availablePackageDetail + ); + } else { + message.availablePackageDetail = undefined; + } + return message; }, toJSON(message: GetAvailablePackageDetailResponse): unknown { @@ -1913,26 +2304,32 @@ export const GetAvailablePackageDetailResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetAvailablePackageDetailResponse { - const message = createBaseGetAvailablePackageDetailResponse(); - message.availablePackageDetail = - object.availablePackageDetail !== undefined && object.availablePackageDetail !== null - ? AvailablePackageDetail.fromPartial(object.availablePackageDetail) - : undefined; + const message = { + ...baseGetAvailablePackageDetailResponse, + } as GetAvailablePackageDetailResponse; + if ( + object.availablePackageDetail !== undefined && + object.availablePackageDetail !== null + ) { + message.availablePackageDetail = AvailablePackageDetail.fromPartial( + object.availablePackageDetail + ); + } else { + message.availablePackageDetail = undefined; + } return message; }, }; -function createBaseGetAvailablePackageVersionsResponse(): GetAvailablePackageVersionsResponse { - return { packageAppVersions: [] }; -} +const baseGetAvailablePackageVersionsResponse: object = {}; export const GetAvailablePackageVersionsResponse = { encode( message: GetAvailablePackageVersionsResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { for (const v of message.packageAppVersions) { PackageAppVersion.encode(v!, writer.uint32(10).fork()).ldelim(); @@ -1940,15 +2337,23 @@ export const GetAvailablePackageVersionsResponse = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetAvailablePackageVersionsResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetAvailablePackageVersionsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetAvailablePackageVersionsResponse(); + const message = { + ...baseGetAvailablePackageVersionsResponse, + } as GetAvailablePackageVersionsResponse; + message.packageAppVersions = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.packageAppVersions.push(PackageAppVersion.decode(reader, reader.uint32())); + message.packageAppVersions.push( + PackageAppVersion.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -1959,18 +2364,26 @@ export const GetAvailablePackageVersionsResponse = { }, fromJSON(object: any): GetAvailablePackageVersionsResponse { - return { - packageAppVersions: Array.isArray(object?.packageAppVersions) - ? object.packageAppVersions.map((e: any) => PackageAppVersion.fromJSON(e)) - : [], - }; + const message = { + ...baseGetAvailablePackageVersionsResponse, + } as GetAvailablePackageVersionsResponse; + message.packageAppVersions = []; + if ( + object.packageAppVersions !== undefined && + object.packageAppVersions !== null + ) { + for (const e of object.packageAppVersions) { + message.packageAppVersions.push(PackageAppVersion.fromJSON(e)); + } + } + return message; }, toJSON(message: GetAvailablePackageVersionsResponse): unknown { const obj: any = {}; if (message.packageAppVersions) { - obj.packageAppVersions = message.packageAppVersions.map(e => - e ? PackageAppVersion.toJSON(e) : undefined, + obj.packageAppVersions = message.packageAppVersions.map((e) => + e ? PackageAppVersion.toJSON(e) : undefined ); } else { obj.packageAppVersions = []; @@ -1978,24 +2391,31 @@ export const GetAvailablePackageVersionsResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetAvailablePackageVersionsResponse { - const message = createBaseGetAvailablePackageVersionsResponse(); - message.packageAppVersions = - object.packageAppVersions?.map(e => PackageAppVersion.fromPartial(e)) || []; + const message = { + ...baseGetAvailablePackageVersionsResponse, + } as GetAvailablePackageVersionsResponse; + message.packageAppVersions = []; + if ( + object.packageAppVersions !== undefined && + object.packageAppVersions !== null + ) { + for (const e of object.packageAppVersions) { + message.packageAppVersions.push(PackageAppVersion.fromPartial(e)); + } + } return message; }, }; -function createBaseGetInstalledPackageSummariesResponse(): GetInstalledPackageSummariesResponse { - return { installedPackageSummaries: [], nextPageToken: "" }; -} +const baseGetInstalledPackageSummariesResponse: object = { nextPageToken: "" }; export const GetInstalledPackageSummariesResponse = { encode( message: GetInstalledPackageSummariesResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { for (const v of message.installedPackageSummaries) { InstalledPackageSummary.encode(v!, writer.uint32(10).fork()).ldelim(); @@ -2006,16 +2426,22 @@ export const GetInstalledPackageSummariesResponse = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetInstalledPackageSummariesResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetInstalledPackageSummariesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetInstalledPackageSummariesResponse(); + const message = { + ...baseGetInstalledPackageSummariesResponse, + } as GetInstalledPackageSummariesResponse; + message.installedPackageSummaries = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.installedPackageSummaries.push( - InstalledPackageSummary.decode(reader, reader.uint32()), + InstalledPackageSummary.decode(reader, reader.uint32()) ); break; case 2: @@ -2030,65 +2456,101 @@ export const GetInstalledPackageSummariesResponse = { }, fromJSON(object: any): GetInstalledPackageSummariesResponse { - return { - installedPackageSummaries: Array.isArray(object?.installedPackageSummaries) - ? object.installedPackageSummaries.map((e: any) => InstalledPackageSummary.fromJSON(e)) - : [], - nextPageToken: isSet(object.nextPageToken) ? String(object.nextPageToken) : "", - }; + const message = { + ...baseGetInstalledPackageSummariesResponse, + } as GetInstalledPackageSummariesResponse; + message.installedPackageSummaries = []; + if ( + object.installedPackageSummaries !== undefined && + object.installedPackageSummaries !== null + ) { + for (const e of object.installedPackageSummaries) { + message.installedPackageSummaries.push( + InstalledPackageSummary.fromJSON(e) + ); + } + } + if (object.nextPageToken !== undefined && object.nextPageToken !== null) { + message.nextPageToken = String(object.nextPageToken); + } else { + message.nextPageToken = ""; + } + return message; }, toJSON(message: GetInstalledPackageSummariesResponse): unknown { const obj: any = {}; if (message.installedPackageSummaries) { - obj.installedPackageSummaries = message.installedPackageSummaries.map(e => - e ? InstalledPackageSummary.toJSON(e) : undefined, + obj.installedPackageSummaries = message.installedPackageSummaries.map( + (e) => (e ? InstalledPackageSummary.toJSON(e) : undefined) ); } else { obj.installedPackageSummaries = []; } - message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken); + message.nextPageToken !== undefined && + (obj.nextPageToken = message.nextPageToken); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetInstalledPackageSummariesResponse { - const message = createBaseGetInstalledPackageSummariesResponse(); - message.installedPackageSummaries = - object.installedPackageSummaries?.map(e => InstalledPackageSummary.fromPartial(e)) || []; - message.nextPageToken = object.nextPageToken ?? ""; + const message = { + ...baseGetInstalledPackageSummariesResponse, + } as GetInstalledPackageSummariesResponse; + message.installedPackageSummaries = []; + if ( + object.installedPackageSummaries !== undefined && + object.installedPackageSummaries !== null + ) { + for (const e of object.installedPackageSummaries) { + message.installedPackageSummaries.push( + InstalledPackageSummary.fromPartial(e) + ); + } + } + if (object.nextPageToken !== undefined && object.nextPageToken !== null) { + message.nextPageToken = object.nextPageToken; + } else { + message.nextPageToken = ""; + } return message; }, }; -function createBaseGetInstalledPackageDetailResponse(): GetInstalledPackageDetailResponse { - return { installedPackageDetail: undefined }; -} +const baseGetInstalledPackageDetailResponse: object = {}; export const GetInstalledPackageDetailResponse = { encode( message: GetInstalledPackageDetailResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.installedPackageDetail !== undefined) { InstalledPackageDetail.encode( message.installedPackageDetail, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetInstalledPackageDetailResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetInstalledPackageDetailResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetInstalledPackageDetailResponse(); + const message = { + ...baseGetInstalledPackageDetailResponse, + } as GetInstalledPackageDetailResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageDetail = InstalledPackageDetail.decode(reader, reader.uint32()); + message.installedPackageDetail = InstalledPackageDetail.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -2099,11 +2561,20 @@ export const GetInstalledPackageDetailResponse = { }, fromJSON(object: any): GetInstalledPackageDetailResponse { - return { - installedPackageDetail: isSet(object.installedPackageDetail) - ? InstalledPackageDetail.fromJSON(object.installedPackageDetail) - : undefined, - }; + const message = { + ...baseGetInstalledPackageDetailResponse, + } as GetInstalledPackageDetailResponse; + if ( + object.installedPackageDetail !== undefined && + object.installedPackageDetail !== null + ) { + message.installedPackageDetail = InstalledPackageDetail.fromJSON( + object.installedPackageDetail + ); + } else { + message.installedPackageDetail = undefined; + } + return message; }, toJSON(message: GetInstalledPackageDetailResponse): unknown { @@ -2115,45 +2586,59 @@ export const GetInstalledPackageDetailResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetInstalledPackageDetailResponse { - const message = createBaseGetInstalledPackageDetailResponse(); - message.installedPackageDetail = - object.installedPackageDetail !== undefined && object.installedPackageDetail !== null - ? InstalledPackageDetail.fromPartial(object.installedPackageDetail) - : undefined; + const message = { + ...baseGetInstalledPackageDetailResponse, + } as GetInstalledPackageDetailResponse; + if ( + object.installedPackageDetail !== undefined && + object.installedPackageDetail !== null + ) { + message.installedPackageDetail = InstalledPackageDetail.fromPartial( + object.installedPackageDetail + ); + } else { + message.installedPackageDetail = undefined; + } return message; }, }; -function createBaseCreateInstalledPackageResponse(): CreateInstalledPackageResponse { - return { installedPackageRef: undefined }; -} +const baseCreateInstalledPackageResponse: object = {}; export const CreateInstalledPackageResponse = { encode( message: CreateInstalledPackageResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateInstalledPackageResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): CreateInstalledPackageResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateInstalledPackageResponse(); + const message = { + ...baseCreateInstalledPackageResponse, + } as CreateInstalledPackageResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); + message.installedPackageRef = InstalledPackageReference.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -2164,11 +2649,20 @@ export const CreateInstalledPackageResponse = { }, fromJSON(object: any): CreateInstalledPackageResponse { - return { - installedPackageRef: isSet(object.installedPackageRef) - ? InstalledPackageReference.fromJSON(object.installedPackageRef) - : undefined, - }; + const message = { + ...baseCreateInstalledPackageResponse, + } as CreateInstalledPackageResponse; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromJSON( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + return message; }, toJSON(message: CreateInstalledPackageResponse): unknown { @@ -2180,45 +2674,59 @@ export const CreateInstalledPackageResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): CreateInstalledPackageResponse { - const message = createBaseCreateInstalledPackageResponse(); - message.installedPackageRef = - object.installedPackageRef !== undefined && object.installedPackageRef !== null - ? InstalledPackageReference.fromPartial(object.installedPackageRef) - : undefined; + const message = { + ...baseCreateInstalledPackageResponse, + } as CreateInstalledPackageResponse; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromPartial( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } return message; }, }; -function createBaseUpdateInstalledPackageResponse(): UpdateInstalledPackageResponse { - return { installedPackageRef: undefined }; -} +const baseUpdateInstalledPackageResponse: object = {}; export const UpdateInstalledPackageResponse = { encode( message: UpdateInstalledPackageResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): UpdateInstalledPackageResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): UpdateInstalledPackageResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateInstalledPackageResponse(); + const message = { + ...baseUpdateInstalledPackageResponse, + } as UpdateInstalledPackageResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); + message.installedPackageRef = InstalledPackageReference.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -2229,11 +2737,20 @@ export const UpdateInstalledPackageResponse = { }, fromJSON(object: any): UpdateInstalledPackageResponse { - return { - installedPackageRef: isSet(object.installedPackageRef) - ? InstalledPackageReference.fromJSON(object.installedPackageRef) - : undefined, - }; + const message = { + ...baseUpdateInstalledPackageResponse, + } as UpdateInstalledPackageResponse; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromJSON( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + return message; }, toJSON(message: UpdateInstalledPackageResponse): unknown { @@ -2245,31 +2762,45 @@ export const UpdateInstalledPackageResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): UpdateInstalledPackageResponse { - const message = createBaseUpdateInstalledPackageResponse(); - message.installedPackageRef = - object.installedPackageRef !== undefined && object.installedPackageRef !== null - ? InstalledPackageReference.fromPartial(object.installedPackageRef) - : undefined; + const message = { + ...baseUpdateInstalledPackageResponse, + } as UpdateInstalledPackageResponse; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromPartial( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } return message; }, }; -function createBaseDeleteInstalledPackageResponse(): DeleteInstalledPackageResponse { - return {}; -} +const baseDeleteInstalledPackageResponse: object = {}; export const DeleteInstalledPackageResponse = { - encode(_: DeleteInstalledPackageResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + _: DeleteInstalledPackageResponse, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): DeleteInstalledPackageResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): DeleteInstalledPackageResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDeleteInstalledPackageResponse(); + const message = { + ...baseDeleteInstalledPackageResponse, + } as DeleteInstalledPackageResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2282,7 +2813,10 @@ export const DeleteInstalledPackageResponse = { }, fromJSON(_: any): DeleteInstalledPackageResponse { - return {}; + const message = { + ...baseDeleteInstalledPackageResponse, + } as DeleteInstalledPackageResponse; + return message; }, toJSON(_: DeleteInstalledPackageResponse): unknown { @@ -2290,22 +2824,22 @@ export const DeleteInstalledPackageResponse = { return obj; }, - fromPartial, I>>( - _: I, + fromPartial( + _: DeepPartial ): DeleteInstalledPackageResponse { - const message = createBaseDeleteInstalledPackageResponse(); + const message = { + ...baseDeleteInstalledPackageResponse, + } as DeleteInstalledPackageResponse; return message; }, }; -function createBaseGetInstalledPackageResourceRefsResponse(): GetInstalledPackageResourceRefsResponse { - return { context: undefined, resourceRefs: [] }; -} +const baseGetInstalledPackageResourceRefsResponse: object = {}; export const GetInstalledPackageResourceRefsResponse = { encode( message: GetInstalledPackageResourceRefsResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); @@ -2316,10 +2850,16 @@ export const GetInstalledPackageResourceRefsResponse = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetInstalledPackageResourceRefsResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetInstalledPackageResourceRefsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetInstalledPackageResourceRefsResponse(); + const message = { + ...baseGetInstalledPackageResourceRefsResponse, + } as GetInstalledPackageResourceRefsResponse; + message.resourceRefs = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2327,7 +2867,9 @@ export const GetInstalledPackageResourceRefsResponse = { message.context = Context.decode(reader, reader.uint32()); break; case 2: - message.resourceRefs.push(ResourceRef.decode(reader, reader.uint32())); + message.resourceRefs.push( + ResourceRef.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -2338,64 +2880,87 @@ export const GetInstalledPackageResourceRefsResponse = { }, fromJSON(object: any): GetInstalledPackageResourceRefsResponse { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - resourceRefs: Array.isArray(object?.resourceRefs) - ? object.resourceRefs.map((e: any) => ResourceRef.fromJSON(e)) - : [], - }; + const message = { + ...baseGetInstalledPackageResourceRefsResponse, + } as GetInstalledPackageResourceRefsResponse; + message.resourceRefs = []; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + if (object.resourceRefs !== undefined && object.resourceRefs !== null) { + for (const e of object.resourceRefs) { + message.resourceRefs.push(ResourceRef.fromJSON(e)); + } + } + return message; }, toJSON(message: GetInstalledPackageResourceRefsResponse): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); if (message.resourceRefs) { - obj.resourceRefs = message.resourceRefs.map(e => (e ? ResourceRef.toJSON(e) : undefined)); + obj.resourceRefs = message.resourceRefs.map((e) => + e ? ResourceRef.toJSON(e) : undefined + ); } else { obj.resourceRefs = []; } return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetInstalledPackageResourceRefsResponse { - const message = createBaseGetInstalledPackageResourceRefsResponse(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; - message.resourceRefs = object.resourceRefs?.map(e => ResourceRef.fromPartial(e)) || []; + const message = { + ...baseGetInstalledPackageResourceRefsResponse, + } as GetInstalledPackageResourceRefsResponse; + message.resourceRefs = []; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } + if (object.resourceRefs !== undefined && object.resourceRefs !== null) { + for (const e of object.resourceRefs) { + message.resourceRefs.push(ResourceRef.fromPartial(e)); + } + } return message; }, }; -function createBaseAvailablePackageSummary(): AvailablePackageSummary { - return { - availablePackageRef: undefined, - name: "", - latestVersion: undefined, - iconUrl: "", - displayName: "", - shortDescription: "", - categories: [], - }; -} +const baseAvailablePackageSummary: object = { + name: "", + iconUrl: "", + displayName: "", + shortDescription: "", + categories: "", +}; export const AvailablePackageSummary = { - encode(message: AvailablePackageSummary, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: AvailablePackageSummary, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.availablePackageRef !== undefined) { AvailablePackageReference.encode( message.availablePackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } if (message.name !== "") { writer.uint32(18).string(message.name); } if (message.latestVersion !== undefined) { - PackageAppVersion.encode(message.latestVersion, writer.uint32(26).fork()).ldelim(); + PackageAppVersion.encode( + message.latestVersion, + writer.uint32(26).fork() + ).ldelim(); } if (message.iconUrl !== "") { writer.uint32(34).string(message.iconUrl); @@ -2412,21 +2977,33 @@ export const AvailablePackageSummary = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): AvailablePackageSummary { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): AvailablePackageSummary { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAvailablePackageSummary(); + const message = { + ...baseAvailablePackageSummary, + } as AvailablePackageSummary; + message.categories = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.availablePackageRef = AvailablePackageReference.decode(reader, reader.uint32()); + message.availablePackageRef = AvailablePackageReference.decode( + reader, + reader.uint32() + ); break; case 2: message.name = reader.string(); break; case 3: - message.latestVersion = PackageAppVersion.decode(reader, reader.uint32()); + message.latestVersion = PackageAppVersion.decode( + reader, + reader.uint32() + ); break; case 4: message.iconUrl = reader.string(); @@ -2449,22 +3026,55 @@ export const AvailablePackageSummary = { }, fromJSON(object: any): AvailablePackageSummary { - return { - availablePackageRef: isSet(object.availablePackageRef) - ? AvailablePackageReference.fromJSON(object.availablePackageRef) - : undefined, - name: isSet(object.name) ? String(object.name) : "", - latestVersion: isSet(object.latestVersion) - ? PackageAppVersion.fromJSON(object.latestVersion) - : undefined, - iconUrl: isSet(object.iconUrl) ? String(object.iconUrl) : "", - displayName: isSet(object.displayName) ? String(object.displayName) : "", - shortDescription: isSet(object.shortDescription) ? String(object.shortDescription) : "", - categories: Array.isArray(object?.categories) - ? object.categories.map((e: any) => String(e)) - : [], - }; - }, + const message = { + ...baseAvailablePackageSummary, + } as AvailablePackageSummary; + message.categories = []; + if ( + object.availablePackageRef !== undefined && + object.availablePackageRef !== null + ) { + message.availablePackageRef = AvailablePackageReference.fromJSON( + object.availablePackageRef + ); + } else { + message.availablePackageRef = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.latestVersion !== undefined && object.latestVersion !== null) { + message.latestVersion = PackageAppVersion.fromJSON(object.latestVersion); + } else { + message.latestVersion = undefined; + } + if (object.iconUrl !== undefined && object.iconUrl !== null) { + message.iconUrl = String(object.iconUrl); + } else { + message.iconUrl = ""; + } + if (object.displayName !== undefined && object.displayName !== null) { + message.displayName = String(object.displayName); + } else { + message.displayName = ""; + } + if ( + object.shortDescription !== undefined && + object.shortDescription !== null + ) { + message.shortDescription = String(object.shortDescription); + } else { + message.shortDescription = ""; + } + if (object.categories !== undefined && object.categories !== null) { + for (const e of object.categories) { + message.categories.push(String(e)); + } + } + return message; + }, toJSON(message: AvailablePackageSummary): unknown { const obj: any = {}; @@ -2478,71 +3088,108 @@ export const AvailablePackageSummary = { ? PackageAppVersion.toJSON(message.latestVersion) : undefined); message.iconUrl !== undefined && (obj.iconUrl = message.iconUrl); - message.displayName !== undefined && (obj.displayName = message.displayName); - message.shortDescription !== undefined && (obj.shortDescription = message.shortDescription); + message.displayName !== undefined && + (obj.displayName = message.displayName); + message.shortDescription !== undefined && + (obj.shortDescription = message.shortDescription); if (message.categories) { - obj.categories = message.categories.map(e => e); + obj.categories = message.categories.map((e) => e); } else { obj.categories = []; } return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): AvailablePackageSummary { - const message = createBaseAvailablePackageSummary(); - message.availablePackageRef = - object.availablePackageRef !== undefined && object.availablePackageRef !== null - ? AvailablePackageReference.fromPartial(object.availablePackageRef) - : undefined; - message.name = object.name ?? ""; - message.latestVersion = - object.latestVersion !== undefined && object.latestVersion !== null - ? PackageAppVersion.fromPartial(object.latestVersion) - : undefined; - message.iconUrl = object.iconUrl ?? ""; - message.displayName = object.displayName ?? ""; - message.shortDescription = object.shortDescription ?? ""; - message.categories = object.categories?.map(e => e) || []; + const message = { + ...baseAvailablePackageSummary, + } as AvailablePackageSummary; + message.categories = []; + if ( + object.availablePackageRef !== undefined && + object.availablePackageRef !== null + ) { + message.availablePackageRef = AvailablePackageReference.fromPartial( + object.availablePackageRef + ); + } else { + message.availablePackageRef = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.latestVersion !== undefined && object.latestVersion !== null) { + message.latestVersion = PackageAppVersion.fromPartial( + object.latestVersion + ); + } else { + message.latestVersion = undefined; + } + if (object.iconUrl !== undefined && object.iconUrl !== null) { + message.iconUrl = object.iconUrl; + } else { + message.iconUrl = ""; + } + if (object.displayName !== undefined && object.displayName !== null) { + message.displayName = object.displayName; + } else { + message.displayName = ""; + } + if ( + object.shortDescription !== undefined && + object.shortDescription !== null + ) { + message.shortDescription = object.shortDescription; + } else { + message.shortDescription = ""; + } + if (object.categories !== undefined && object.categories !== null) { + for (const e of object.categories) { + message.categories.push(e); + } + } return message; }, }; -function createBaseAvailablePackageDetail(): AvailablePackageDetail { - return { - availablePackageRef: undefined, - name: "", - version: undefined, - repoUrl: "", - homeUrl: "", - iconUrl: "", - displayName: "", - shortDescription: "", - longDescription: "", - readme: "", - defaultValues: "", - valuesSchema: "", - sourceUrls: [], - maintainers: [], - categories: [], - customDetail: undefined, - }; -} +const baseAvailablePackageDetail: object = { + name: "", + repoUrl: "", + homeUrl: "", + iconUrl: "", + displayName: "", + shortDescription: "", + longDescription: "", + readme: "", + defaultValues: "", + valuesSchema: "", + sourceUrls: "", + categories: "", +}; export const AvailablePackageDetail = { - encode(message: AvailablePackageDetail, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: AvailablePackageDetail, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.availablePackageRef !== undefined) { AvailablePackageReference.encode( message.availablePackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } if (message.name !== "") { writer.uint32(18).string(message.name); } if (message.version !== undefined) { - PackageAppVersion.encode(message.version, writer.uint32(26).fork()).ldelim(); + PackageAppVersion.encode( + message.version, + writer.uint32(26).fork() + ).ldelim(); } if (message.repoUrl !== "") { writer.uint32(34).string(message.repoUrl); @@ -2586,15 +3233,24 @@ export const AvailablePackageDetail = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): AvailablePackageDetail { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): AvailablePackageDetail { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAvailablePackageDetail(); + const message = { ...baseAvailablePackageDetail } as AvailablePackageDetail; + message.sourceUrls = []; + message.maintainers = []; + message.categories = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.availablePackageRef = AvailablePackageReference.decode(reader, reader.uint32()); + message.availablePackageRef = AvailablePackageReference.decode( + reader, + reader.uint32() + ); break; case 2: message.name = reader.string(); @@ -2650,32 +3306,102 @@ export const AvailablePackageDetail = { }, fromJSON(object: any): AvailablePackageDetail { - return { - availablePackageRef: isSet(object.availablePackageRef) - ? AvailablePackageReference.fromJSON(object.availablePackageRef) - : undefined, - name: isSet(object.name) ? String(object.name) : "", - version: isSet(object.version) ? PackageAppVersion.fromJSON(object.version) : undefined, - repoUrl: isSet(object.repoUrl) ? String(object.repoUrl) : "", - homeUrl: isSet(object.homeUrl) ? String(object.homeUrl) : "", - iconUrl: isSet(object.iconUrl) ? String(object.iconUrl) : "", - displayName: isSet(object.displayName) ? String(object.displayName) : "", - shortDescription: isSet(object.shortDescription) ? String(object.shortDescription) : "", - longDescription: isSet(object.longDescription) ? String(object.longDescription) : "", - readme: isSet(object.readme) ? String(object.readme) : "", - defaultValues: isSet(object.defaultValues) ? String(object.defaultValues) : "", - valuesSchema: isSet(object.valuesSchema) ? String(object.valuesSchema) : "", - sourceUrls: Array.isArray(object?.sourceUrls) - ? object.sourceUrls.map((e: any) => String(e)) - : [], - maintainers: Array.isArray(object?.maintainers) - ? object.maintainers.map((e: any) => Maintainer.fromJSON(e)) - : [], - categories: Array.isArray(object?.categories) - ? object.categories.map((e: any) => String(e)) - : [], - customDetail: isSet(object.customDetail) ? Any.fromJSON(object.customDetail) : undefined, - }; + const message = { ...baseAvailablePackageDetail } as AvailablePackageDetail; + message.sourceUrls = []; + message.maintainers = []; + message.categories = []; + if ( + object.availablePackageRef !== undefined && + object.availablePackageRef !== null + ) { + message.availablePackageRef = AvailablePackageReference.fromJSON( + object.availablePackageRef + ); + } else { + message.availablePackageRef = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.version !== undefined && object.version !== null) { + message.version = PackageAppVersion.fromJSON(object.version); + } else { + message.version = undefined; + } + if (object.repoUrl !== undefined && object.repoUrl !== null) { + message.repoUrl = String(object.repoUrl); + } else { + message.repoUrl = ""; + } + if (object.homeUrl !== undefined && object.homeUrl !== null) { + message.homeUrl = String(object.homeUrl); + } else { + message.homeUrl = ""; + } + if (object.iconUrl !== undefined && object.iconUrl !== null) { + message.iconUrl = String(object.iconUrl); + } else { + message.iconUrl = ""; + } + if (object.displayName !== undefined && object.displayName !== null) { + message.displayName = String(object.displayName); + } else { + message.displayName = ""; + } + if ( + object.shortDescription !== undefined && + object.shortDescription !== null + ) { + message.shortDescription = String(object.shortDescription); + } else { + message.shortDescription = ""; + } + if ( + object.longDescription !== undefined && + object.longDescription !== null + ) { + message.longDescription = String(object.longDescription); + } else { + message.longDescription = ""; + } + if (object.readme !== undefined && object.readme !== null) { + message.readme = String(object.readme); + } else { + message.readme = ""; + } + if (object.defaultValues !== undefined && object.defaultValues !== null) { + message.defaultValues = String(object.defaultValues); + } else { + message.defaultValues = ""; + } + if (object.valuesSchema !== undefined && object.valuesSchema !== null) { + message.valuesSchema = String(object.valuesSchema); + } else { + message.valuesSchema = ""; + } + if (object.sourceUrls !== undefined && object.sourceUrls !== null) { + for (const e of object.sourceUrls) { + message.sourceUrls.push(String(e)); + } + } + if (object.maintainers !== undefined && object.maintainers !== null) { + for (const e of object.maintainers) { + message.maintainers.push(Maintainer.fromJSON(e)); + } + } + if (object.categories !== undefined && object.categories !== null) { + for (const e of object.categories) { + message.categories.push(String(e)); + } + } + if (object.customDetail !== undefined && object.customDetail !== null) { + message.customDetail = Any.fromJSON(object.customDetail); + } else { + message.customDetail = undefined; + } + return message; }, toJSON(message: AvailablePackageDetail): unknown { @@ -2686,100 +3412,181 @@ export const AvailablePackageDetail = { : undefined); message.name !== undefined && (obj.name = message.name); message.version !== undefined && - (obj.version = message.version ? PackageAppVersion.toJSON(message.version) : undefined); + (obj.version = message.version + ? PackageAppVersion.toJSON(message.version) + : undefined); message.repoUrl !== undefined && (obj.repoUrl = message.repoUrl); message.homeUrl !== undefined && (obj.homeUrl = message.homeUrl); message.iconUrl !== undefined && (obj.iconUrl = message.iconUrl); - message.displayName !== undefined && (obj.displayName = message.displayName); - message.shortDescription !== undefined && (obj.shortDescription = message.shortDescription); - message.longDescription !== undefined && (obj.longDescription = message.longDescription); + message.displayName !== undefined && + (obj.displayName = message.displayName); + message.shortDescription !== undefined && + (obj.shortDescription = message.shortDescription); + message.longDescription !== undefined && + (obj.longDescription = message.longDescription); message.readme !== undefined && (obj.readme = message.readme); - message.defaultValues !== undefined && (obj.defaultValues = message.defaultValues); - message.valuesSchema !== undefined && (obj.valuesSchema = message.valuesSchema); + message.defaultValues !== undefined && + (obj.defaultValues = message.defaultValues); + message.valuesSchema !== undefined && + (obj.valuesSchema = message.valuesSchema); if (message.sourceUrls) { - obj.sourceUrls = message.sourceUrls.map(e => e); + obj.sourceUrls = message.sourceUrls.map((e) => e); } else { obj.sourceUrls = []; } if (message.maintainers) { - obj.maintainers = message.maintainers.map(e => (e ? Maintainer.toJSON(e) : undefined)); + obj.maintainers = message.maintainers.map((e) => + e ? Maintainer.toJSON(e) : undefined + ); } else { obj.maintainers = []; } if (message.categories) { - obj.categories = message.categories.map(e => e); + obj.categories = message.categories.map((e) => e); } else { obj.categories = []; } message.customDetail !== undefined && - (obj.customDetail = message.customDetail ? Any.toJSON(message.customDetail) : undefined); + (obj.customDetail = message.customDetail + ? Any.toJSON(message.customDetail) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): AvailablePackageDetail { - const message = createBaseAvailablePackageDetail(); - message.availablePackageRef = - object.availablePackageRef !== undefined && object.availablePackageRef !== null - ? AvailablePackageReference.fromPartial(object.availablePackageRef) - : undefined; - message.name = object.name ?? ""; - message.version = - object.version !== undefined && object.version !== null - ? PackageAppVersion.fromPartial(object.version) - : undefined; - message.repoUrl = object.repoUrl ?? ""; - message.homeUrl = object.homeUrl ?? ""; - message.iconUrl = object.iconUrl ?? ""; - message.displayName = object.displayName ?? ""; - message.shortDescription = object.shortDescription ?? ""; - message.longDescription = object.longDescription ?? ""; - message.readme = object.readme ?? ""; - message.defaultValues = object.defaultValues ?? ""; - message.valuesSchema = object.valuesSchema ?? ""; - message.sourceUrls = object.sourceUrls?.map(e => e) || []; - message.maintainers = object.maintainers?.map(e => Maintainer.fromPartial(e)) || []; - message.categories = object.categories?.map(e => e) || []; - message.customDetail = - object.customDetail !== undefined && object.customDetail !== null - ? Any.fromPartial(object.customDetail) - : undefined; + const message = { ...baseAvailablePackageDetail } as AvailablePackageDetail; + message.sourceUrls = []; + message.maintainers = []; + message.categories = []; + if ( + object.availablePackageRef !== undefined && + object.availablePackageRef !== null + ) { + message.availablePackageRef = AvailablePackageReference.fromPartial( + object.availablePackageRef + ); + } else { + message.availablePackageRef = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.version !== undefined && object.version !== null) { + message.version = PackageAppVersion.fromPartial(object.version); + } else { + message.version = undefined; + } + if (object.repoUrl !== undefined && object.repoUrl !== null) { + message.repoUrl = object.repoUrl; + } else { + message.repoUrl = ""; + } + if (object.homeUrl !== undefined && object.homeUrl !== null) { + message.homeUrl = object.homeUrl; + } else { + message.homeUrl = ""; + } + if (object.iconUrl !== undefined && object.iconUrl !== null) { + message.iconUrl = object.iconUrl; + } else { + message.iconUrl = ""; + } + if (object.displayName !== undefined && object.displayName !== null) { + message.displayName = object.displayName; + } else { + message.displayName = ""; + } + if ( + object.shortDescription !== undefined && + object.shortDescription !== null + ) { + message.shortDescription = object.shortDescription; + } else { + message.shortDescription = ""; + } + if ( + object.longDescription !== undefined && + object.longDescription !== null + ) { + message.longDescription = object.longDescription; + } else { + message.longDescription = ""; + } + if (object.readme !== undefined && object.readme !== null) { + message.readme = object.readme; + } else { + message.readme = ""; + } + if (object.defaultValues !== undefined && object.defaultValues !== null) { + message.defaultValues = object.defaultValues; + } else { + message.defaultValues = ""; + } + if (object.valuesSchema !== undefined && object.valuesSchema !== null) { + message.valuesSchema = object.valuesSchema; + } else { + message.valuesSchema = ""; + } + if (object.sourceUrls !== undefined && object.sourceUrls !== null) { + for (const e of object.sourceUrls) { + message.sourceUrls.push(e); + } + } + if (object.maintainers !== undefined && object.maintainers !== null) { + for (const e of object.maintainers) { + message.maintainers.push(Maintainer.fromPartial(e)); + } + } + if (object.categories !== undefined && object.categories !== null) { + for (const e of object.categories) { + message.categories.push(e); + } + } + if (object.customDetail !== undefined && object.customDetail !== null) { + message.customDetail = Any.fromPartial(object.customDetail); + } else { + message.customDetail = undefined; + } return message; }, }; -function createBaseInstalledPackageSummary(): InstalledPackageSummary { - return { - installedPackageRef: undefined, - name: "", - pkgVersionReference: undefined, - currentVersion: undefined, - iconUrl: "", - pkgDisplayName: "", - shortDescription: "", - latestMatchingVersion: undefined, - latestVersion: undefined, - status: undefined, - }; -} +const baseInstalledPackageSummary: object = { + name: "", + iconUrl: "", + pkgDisplayName: "", + shortDescription: "", +}; export const InstalledPackageSummary = { - encode(message: InstalledPackageSummary, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: InstalledPackageSummary, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } if (message.name !== "") { writer.uint32(18).string(message.name); } if (message.pkgVersionReference !== undefined) { - VersionReference.encode(message.pkgVersionReference, writer.uint32(26).fork()).ldelim(); + VersionReference.encode( + message.pkgVersionReference, + writer.uint32(26).fork() + ).ldelim(); } if (message.currentVersion !== undefined) { - PackageAppVersion.encode(message.currentVersion, writer.uint32(34).fork()).ldelim(); + PackageAppVersion.encode( + message.currentVersion, + writer.uint32(34).fork() + ).ldelim(); } if (message.iconUrl !== "") { writer.uint32(42).string(message.iconUrl); @@ -2791,35 +3598,58 @@ export const InstalledPackageSummary = { writer.uint32(58).string(message.shortDescription); } if (message.latestMatchingVersion !== undefined) { - PackageAppVersion.encode(message.latestMatchingVersion, writer.uint32(66).fork()).ldelim(); + PackageAppVersion.encode( + message.latestMatchingVersion, + writer.uint32(66).fork() + ).ldelim(); } if (message.latestVersion !== undefined) { - PackageAppVersion.encode(message.latestVersion, writer.uint32(74).fork()).ldelim(); + PackageAppVersion.encode( + message.latestVersion, + writer.uint32(74).fork() + ).ldelim(); } if (message.status !== undefined) { - InstalledPackageStatus.encode(message.status, writer.uint32(82).fork()).ldelim(); + InstalledPackageStatus.encode( + message.status, + writer.uint32(82).fork() + ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): InstalledPackageSummary { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): InstalledPackageSummary { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInstalledPackageSummary(); + const message = { + ...baseInstalledPackageSummary, + } as InstalledPackageSummary; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); + message.installedPackageRef = InstalledPackageReference.decode( + reader, + reader.uint32() + ); break; case 2: message.name = reader.string(); break; case 3: - message.pkgVersionReference = VersionReference.decode(reader, reader.uint32()); + message.pkgVersionReference = VersionReference.decode( + reader, + reader.uint32() + ); break; case 4: - message.currentVersion = PackageAppVersion.decode(reader, reader.uint32()); + message.currentVersion = PackageAppVersion.decode( + reader, + reader.uint32() + ); break; case 5: message.iconUrl = reader.string(); @@ -2831,13 +3661,22 @@ export const InstalledPackageSummary = { message.shortDescription = reader.string(); break; case 8: - message.latestMatchingVersion = PackageAppVersion.decode(reader, reader.uint32()); + message.latestMatchingVersion = PackageAppVersion.decode( + reader, + reader.uint32() + ); break; case 9: - message.latestVersion = PackageAppVersion.decode(reader, reader.uint32()); + message.latestVersion = PackageAppVersion.decode( + reader, + reader.uint32() + ); break; case 10: - message.status = InstalledPackageStatus.decode(reader, reader.uint32()); + message.status = InstalledPackageStatus.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -2848,28 +3687,80 @@ export const InstalledPackageSummary = { }, fromJSON(object: any): InstalledPackageSummary { - return { - installedPackageRef: isSet(object.installedPackageRef) - ? InstalledPackageReference.fromJSON(object.installedPackageRef) - : undefined, - name: isSet(object.name) ? String(object.name) : "", - pkgVersionReference: isSet(object.pkgVersionReference) - ? VersionReference.fromJSON(object.pkgVersionReference) - : undefined, - currentVersion: isSet(object.currentVersion) - ? PackageAppVersion.fromJSON(object.currentVersion) - : undefined, - iconUrl: isSet(object.iconUrl) ? String(object.iconUrl) : "", - pkgDisplayName: isSet(object.pkgDisplayName) ? String(object.pkgDisplayName) : "", - shortDescription: isSet(object.shortDescription) ? String(object.shortDescription) : "", - latestMatchingVersion: isSet(object.latestMatchingVersion) - ? PackageAppVersion.fromJSON(object.latestMatchingVersion) - : undefined, - latestVersion: isSet(object.latestVersion) - ? PackageAppVersion.fromJSON(object.latestVersion) - : undefined, - status: isSet(object.status) ? InstalledPackageStatus.fromJSON(object.status) : undefined, - }; + const message = { + ...baseInstalledPackageSummary, + } as InstalledPackageSummary; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromJSON( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if ( + object.pkgVersionReference !== undefined && + object.pkgVersionReference !== null + ) { + message.pkgVersionReference = VersionReference.fromJSON( + object.pkgVersionReference + ); + } else { + message.pkgVersionReference = undefined; + } + if (object.currentVersion !== undefined && object.currentVersion !== null) { + message.currentVersion = PackageAppVersion.fromJSON( + object.currentVersion + ); + } else { + message.currentVersion = undefined; + } + if (object.iconUrl !== undefined && object.iconUrl !== null) { + message.iconUrl = String(object.iconUrl); + } else { + message.iconUrl = ""; + } + if (object.pkgDisplayName !== undefined && object.pkgDisplayName !== null) { + message.pkgDisplayName = String(object.pkgDisplayName); + } else { + message.pkgDisplayName = ""; + } + if ( + object.shortDescription !== undefined && + object.shortDescription !== null + ) { + message.shortDescription = String(object.shortDescription); + } else { + message.shortDescription = ""; + } + if ( + object.latestMatchingVersion !== undefined && + object.latestMatchingVersion !== null + ) { + message.latestMatchingVersion = PackageAppVersion.fromJSON( + object.latestMatchingVersion + ); + } else { + message.latestMatchingVersion = undefined; + } + if (object.latestVersion !== undefined && object.latestVersion !== null) { + message.latestVersion = PackageAppVersion.fromJSON(object.latestVersion); + } else { + message.latestVersion = undefined; + } + if (object.status !== undefined && object.status !== null) { + message.status = InstalledPackageStatus.fromJSON(object.status); + } else { + message.status = undefined; + } + return message; }, toJSON(message: InstalledPackageSummary): unknown { @@ -2888,8 +3779,10 @@ export const InstalledPackageSummary = { ? PackageAppVersion.toJSON(message.currentVersion) : undefined); message.iconUrl !== undefined && (obj.iconUrl = message.iconUrl); - message.pkgDisplayName !== undefined && (obj.pkgDisplayName = message.pkgDisplayName); - message.shortDescription !== undefined && (obj.shortDescription = message.shortDescription); + message.pkgDisplayName !== undefined && + (obj.pkgDisplayName = message.pkgDisplayName); + message.shortDescription !== undefined && + (obj.shortDescription = message.shortDescription); message.latestMatchingVersion !== undefined && (obj.latestMatchingVersion = message.latestMatchingVersion ? PackageAppVersion.toJSON(message.latestMatchingVersion) @@ -2899,79 +3792,125 @@ export const InstalledPackageSummary = { ? PackageAppVersion.toJSON(message.latestVersion) : undefined); message.status !== undefined && - (obj.status = message.status ? InstalledPackageStatus.toJSON(message.status) : undefined); + (obj.status = message.status + ? InstalledPackageStatus.toJSON(message.status) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): InstalledPackageSummary { - const message = createBaseInstalledPackageSummary(); - message.installedPackageRef = - object.installedPackageRef !== undefined && object.installedPackageRef !== null - ? InstalledPackageReference.fromPartial(object.installedPackageRef) - : undefined; - message.name = object.name ?? ""; - message.pkgVersionReference = - object.pkgVersionReference !== undefined && object.pkgVersionReference !== null - ? VersionReference.fromPartial(object.pkgVersionReference) - : undefined; - message.currentVersion = - object.currentVersion !== undefined && object.currentVersion !== null - ? PackageAppVersion.fromPartial(object.currentVersion) - : undefined; - message.iconUrl = object.iconUrl ?? ""; - message.pkgDisplayName = object.pkgDisplayName ?? ""; - message.shortDescription = object.shortDescription ?? ""; - message.latestMatchingVersion = - object.latestMatchingVersion !== undefined && object.latestMatchingVersion !== null - ? PackageAppVersion.fromPartial(object.latestMatchingVersion) - : undefined; - message.latestVersion = - object.latestVersion !== undefined && object.latestVersion !== null - ? PackageAppVersion.fromPartial(object.latestVersion) - : undefined; - message.status = - object.status !== undefined && object.status !== null - ? InstalledPackageStatus.fromPartial(object.status) - : undefined; + const message = { + ...baseInstalledPackageSummary, + } as InstalledPackageSummary; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromPartial( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if ( + object.pkgVersionReference !== undefined && + object.pkgVersionReference !== null + ) { + message.pkgVersionReference = VersionReference.fromPartial( + object.pkgVersionReference + ); + } else { + message.pkgVersionReference = undefined; + } + if (object.currentVersion !== undefined && object.currentVersion !== null) { + message.currentVersion = PackageAppVersion.fromPartial( + object.currentVersion + ); + } else { + message.currentVersion = undefined; + } + if (object.iconUrl !== undefined && object.iconUrl !== null) { + message.iconUrl = object.iconUrl; + } else { + message.iconUrl = ""; + } + if (object.pkgDisplayName !== undefined && object.pkgDisplayName !== null) { + message.pkgDisplayName = object.pkgDisplayName; + } else { + message.pkgDisplayName = ""; + } + if ( + object.shortDescription !== undefined && + object.shortDescription !== null + ) { + message.shortDescription = object.shortDescription; + } else { + message.shortDescription = ""; + } + if ( + object.latestMatchingVersion !== undefined && + object.latestMatchingVersion !== null + ) { + message.latestMatchingVersion = PackageAppVersion.fromPartial( + object.latestMatchingVersion + ); + } else { + message.latestMatchingVersion = undefined; + } + if (object.latestVersion !== undefined && object.latestVersion !== null) { + message.latestVersion = PackageAppVersion.fromPartial( + object.latestVersion + ); + } else { + message.latestVersion = undefined; + } + if (object.status !== undefined && object.status !== null) { + message.status = InstalledPackageStatus.fromPartial(object.status); + } else { + message.status = undefined; + } return message; }, }; -function createBaseInstalledPackageDetail(): InstalledPackageDetail { - return { - installedPackageRef: undefined, - pkgVersionReference: undefined, - name: "", - currentVersion: undefined, - valuesApplied: "", - reconciliationOptions: undefined, - status: undefined, - postInstallationNotes: "", - availablePackageRef: undefined, - latestMatchingVersion: undefined, - latestVersion: undefined, - customDetail: undefined, - }; -} +const baseInstalledPackageDetail: object = { + name: "", + valuesApplied: "", + postInstallationNotes: "", +}; export const InstalledPackageDetail = { - encode(message: InstalledPackageDetail, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: InstalledPackageDetail, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } if (message.pkgVersionReference !== undefined) { - VersionReference.encode(message.pkgVersionReference, writer.uint32(18).fork()).ldelim(); + VersionReference.encode( + message.pkgVersionReference, + writer.uint32(18).fork() + ).ldelim(); } if (message.name !== "") { writer.uint32(26).string(message.name); } if (message.currentVersion !== undefined) { - PackageAppVersion.encode(message.currentVersion, writer.uint32(34).fork()).ldelim(); + PackageAppVersion.encode( + message.currentVersion, + writer.uint32(34).fork() + ).ldelim(); } if (message.valuesApplied !== "") { writer.uint32(42).string(message.valuesApplied); @@ -2979,11 +3918,14 @@ export const InstalledPackageDetail = { if (message.reconciliationOptions !== undefined) { ReconciliationOptions.encode( message.reconciliationOptions, - writer.uint32(50).fork(), + writer.uint32(50).fork() ).ldelim(); } if (message.status !== undefined) { - InstalledPackageStatus.encode(message.status, writer.uint32(58).fork()).ldelim(); + InstalledPackageStatus.encode( + message.status, + writer.uint32(58).fork() + ).ldelim(); } if (message.postInstallationNotes !== "") { writer.uint32(66).string(message.postInstallationNotes); @@ -2991,14 +3933,20 @@ export const InstalledPackageDetail = { if (message.availablePackageRef !== undefined) { AvailablePackageReference.encode( message.availablePackageRef, - writer.uint32(74).fork(), + writer.uint32(74).fork() ).ldelim(); } if (message.latestMatchingVersion !== undefined) { - PackageAppVersion.encode(message.latestMatchingVersion, writer.uint32(82).fork()).ldelim(); + PackageAppVersion.encode( + message.latestMatchingVersion, + writer.uint32(82).fork() + ).ldelim(); } if (message.latestVersion !== undefined) { - PackageAppVersion.encode(message.latestVersion, writer.uint32(90).fork()).ldelim(); + PackageAppVersion.encode( + message.latestVersion, + writer.uint32(90).fork() + ).ldelim(); } if (message.customDetail !== undefined) { Any.encode(message.customDetail, writer.uint32(114).fork()).ldelim(); @@ -3006,45 +3954,72 @@ export const InstalledPackageDetail = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): InstalledPackageDetail { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): InstalledPackageDetail { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInstalledPackageDetail(); + const message = { ...baseInstalledPackageDetail } as InstalledPackageDetail; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); + message.installedPackageRef = InstalledPackageReference.decode( + reader, + reader.uint32() + ); break; case 2: - message.pkgVersionReference = VersionReference.decode(reader, reader.uint32()); + message.pkgVersionReference = VersionReference.decode( + reader, + reader.uint32() + ); break; case 3: message.name = reader.string(); break; case 4: - message.currentVersion = PackageAppVersion.decode(reader, reader.uint32()); + message.currentVersion = PackageAppVersion.decode( + reader, + reader.uint32() + ); break; case 5: message.valuesApplied = reader.string(); break; case 6: - message.reconciliationOptions = ReconciliationOptions.decode(reader, reader.uint32()); + message.reconciliationOptions = ReconciliationOptions.decode( + reader, + reader.uint32() + ); break; case 7: - message.status = InstalledPackageStatus.decode(reader, reader.uint32()); + message.status = InstalledPackageStatus.decode( + reader, + reader.uint32() + ); break; case 8: message.postInstallationNotes = reader.string(); break; case 9: - message.availablePackageRef = AvailablePackageReference.decode(reader, reader.uint32()); + message.availablePackageRef = AvailablePackageReference.decode( + reader, + reader.uint32() + ); break; case 10: - message.latestMatchingVersion = PackageAppVersion.decode(reader, reader.uint32()); + message.latestMatchingVersion = PackageAppVersion.decode( + reader, + reader.uint32() + ); break; case 11: - message.latestVersion = PackageAppVersion.decode(reader, reader.uint32()); + message.latestVersion = PackageAppVersion.decode( + reader, + reader.uint32() + ); break; case 14: message.customDetail = Any.decode(reader, reader.uint32()); @@ -3058,36 +4033,98 @@ export const InstalledPackageDetail = { }, fromJSON(object: any): InstalledPackageDetail { - return { - installedPackageRef: isSet(object.installedPackageRef) - ? InstalledPackageReference.fromJSON(object.installedPackageRef) - : undefined, - pkgVersionReference: isSet(object.pkgVersionReference) - ? VersionReference.fromJSON(object.pkgVersionReference) - : undefined, - name: isSet(object.name) ? String(object.name) : "", - currentVersion: isSet(object.currentVersion) - ? PackageAppVersion.fromJSON(object.currentVersion) - : undefined, - valuesApplied: isSet(object.valuesApplied) ? String(object.valuesApplied) : "", - reconciliationOptions: isSet(object.reconciliationOptions) - ? ReconciliationOptions.fromJSON(object.reconciliationOptions) - : undefined, - status: isSet(object.status) ? InstalledPackageStatus.fromJSON(object.status) : undefined, - postInstallationNotes: isSet(object.postInstallationNotes) - ? String(object.postInstallationNotes) - : "", - availablePackageRef: isSet(object.availablePackageRef) - ? AvailablePackageReference.fromJSON(object.availablePackageRef) - : undefined, - latestMatchingVersion: isSet(object.latestMatchingVersion) - ? PackageAppVersion.fromJSON(object.latestMatchingVersion) - : undefined, - latestVersion: isSet(object.latestVersion) - ? PackageAppVersion.fromJSON(object.latestVersion) - : undefined, - customDetail: isSet(object.customDetail) ? Any.fromJSON(object.customDetail) : undefined, - }; + const message = { ...baseInstalledPackageDetail } as InstalledPackageDetail; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromJSON( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + if ( + object.pkgVersionReference !== undefined && + object.pkgVersionReference !== null + ) { + message.pkgVersionReference = VersionReference.fromJSON( + object.pkgVersionReference + ); + } else { + message.pkgVersionReference = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.currentVersion !== undefined && object.currentVersion !== null) { + message.currentVersion = PackageAppVersion.fromJSON( + object.currentVersion + ); + } else { + message.currentVersion = undefined; + } + if (object.valuesApplied !== undefined && object.valuesApplied !== null) { + message.valuesApplied = String(object.valuesApplied); + } else { + message.valuesApplied = ""; + } + if ( + object.reconciliationOptions !== undefined && + object.reconciliationOptions !== null + ) { + message.reconciliationOptions = ReconciliationOptions.fromJSON( + object.reconciliationOptions + ); + } else { + message.reconciliationOptions = undefined; + } + if (object.status !== undefined && object.status !== null) { + message.status = InstalledPackageStatus.fromJSON(object.status); + } else { + message.status = undefined; + } + if ( + object.postInstallationNotes !== undefined && + object.postInstallationNotes !== null + ) { + message.postInstallationNotes = String(object.postInstallationNotes); + } else { + message.postInstallationNotes = ""; + } + if ( + object.availablePackageRef !== undefined && + object.availablePackageRef !== null + ) { + message.availablePackageRef = AvailablePackageReference.fromJSON( + object.availablePackageRef + ); + } else { + message.availablePackageRef = undefined; + } + if ( + object.latestMatchingVersion !== undefined && + object.latestMatchingVersion !== null + ) { + message.latestMatchingVersion = PackageAppVersion.fromJSON( + object.latestMatchingVersion + ); + } else { + message.latestMatchingVersion = undefined; + } + if (object.latestVersion !== undefined && object.latestVersion !== null) { + message.latestVersion = PackageAppVersion.fromJSON(object.latestVersion); + } else { + message.latestVersion = undefined; + } + if (object.customDetail !== undefined && object.customDetail !== null) { + message.customDetail = Any.fromJSON(object.customDetail); + } else { + message.customDetail = undefined; + } + return message; }, toJSON(message: InstalledPackageDetail): unknown { @@ -3105,13 +4142,16 @@ export const InstalledPackageDetail = { (obj.currentVersion = message.currentVersion ? PackageAppVersion.toJSON(message.currentVersion) : undefined); - message.valuesApplied !== undefined && (obj.valuesApplied = message.valuesApplied); + message.valuesApplied !== undefined && + (obj.valuesApplied = message.valuesApplied); message.reconciliationOptions !== undefined && (obj.reconciliationOptions = message.reconciliationOptions ? ReconciliationOptions.toJSON(message.reconciliationOptions) : undefined); message.status !== undefined && - (obj.status = message.status ? InstalledPackageStatus.toJSON(message.status) : undefined); + (obj.status = message.status + ? InstalledPackageStatus.toJSON(message.status) + : undefined); message.postInstallationNotes !== undefined && (obj.postInstallationNotes = message.postInstallationNotes); message.availablePackageRef !== undefined && @@ -3127,63 +4167,119 @@ export const InstalledPackageDetail = { ? PackageAppVersion.toJSON(message.latestVersion) : undefined); message.customDetail !== undefined && - (obj.customDetail = message.customDetail ? Any.toJSON(message.customDetail) : undefined); + (obj.customDetail = message.customDetail + ? Any.toJSON(message.customDetail) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): InstalledPackageDetail { - const message = createBaseInstalledPackageDetail(); - message.installedPackageRef = - object.installedPackageRef !== undefined && object.installedPackageRef !== null - ? InstalledPackageReference.fromPartial(object.installedPackageRef) - : undefined; - message.pkgVersionReference = - object.pkgVersionReference !== undefined && object.pkgVersionReference !== null - ? VersionReference.fromPartial(object.pkgVersionReference) - : undefined; - message.name = object.name ?? ""; - message.currentVersion = - object.currentVersion !== undefined && object.currentVersion !== null - ? PackageAppVersion.fromPartial(object.currentVersion) - : undefined; - message.valuesApplied = object.valuesApplied ?? ""; - message.reconciliationOptions = - object.reconciliationOptions !== undefined && object.reconciliationOptions !== null - ? ReconciliationOptions.fromPartial(object.reconciliationOptions) - : undefined; - message.status = - object.status !== undefined && object.status !== null - ? InstalledPackageStatus.fromPartial(object.status) - : undefined; - message.postInstallationNotes = object.postInstallationNotes ?? ""; - message.availablePackageRef = - object.availablePackageRef !== undefined && object.availablePackageRef !== null - ? AvailablePackageReference.fromPartial(object.availablePackageRef) - : undefined; - message.latestMatchingVersion = - object.latestMatchingVersion !== undefined && object.latestMatchingVersion !== null - ? PackageAppVersion.fromPartial(object.latestMatchingVersion) - : undefined; - message.latestVersion = - object.latestVersion !== undefined && object.latestVersion !== null - ? PackageAppVersion.fromPartial(object.latestVersion) - : undefined; - message.customDetail = - object.customDetail !== undefined && object.customDetail !== null - ? Any.fromPartial(object.customDetail) - : undefined; + const message = { ...baseInstalledPackageDetail } as InstalledPackageDetail; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromPartial( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + if ( + object.pkgVersionReference !== undefined && + object.pkgVersionReference !== null + ) { + message.pkgVersionReference = VersionReference.fromPartial( + object.pkgVersionReference + ); + } else { + message.pkgVersionReference = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.currentVersion !== undefined && object.currentVersion !== null) { + message.currentVersion = PackageAppVersion.fromPartial( + object.currentVersion + ); + } else { + message.currentVersion = undefined; + } + if (object.valuesApplied !== undefined && object.valuesApplied !== null) { + message.valuesApplied = object.valuesApplied; + } else { + message.valuesApplied = ""; + } + if ( + object.reconciliationOptions !== undefined && + object.reconciliationOptions !== null + ) { + message.reconciliationOptions = ReconciliationOptions.fromPartial( + object.reconciliationOptions + ); + } else { + message.reconciliationOptions = undefined; + } + if (object.status !== undefined && object.status !== null) { + message.status = InstalledPackageStatus.fromPartial(object.status); + } else { + message.status = undefined; + } + if ( + object.postInstallationNotes !== undefined && + object.postInstallationNotes !== null + ) { + message.postInstallationNotes = object.postInstallationNotes; + } else { + message.postInstallationNotes = ""; + } + if ( + object.availablePackageRef !== undefined && + object.availablePackageRef !== null + ) { + message.availablePackageRef = AvailablePackageReference.fromPartial( + object.availablePackageRef + ); + } else { + message.availablePackageRef = undefined; + } + if ( + object.latestMatchingVersion !== undefined && + object.latestMatchingVersion !== null + ) { + message.latestMatchingVersion = PackageAppVersion.fromPartial( + object.latestMatchingVersion + ); + } else { + message.latestMatchingVersion = undefined; + } + if (object.latestVersion !== undefined && object.latestVersion !== null) { + message.latestVersion = PackageAppVersion.fromPartial( + object.latestVersion + ); + } else { + message.latestVersion = undefined; + } + if (object.customDetail !== undefined && object.customDetail !== null) { + message.customDetail = Any.fromPartial(object.customDetail); + } else { + message.customDetail = undefined; + } return message; }, }; -function createBaseContext(): Context { - return { cluster: "", namespace: "" }; -} +const baseContext: object = { cluster: "", namespace: "" }; export const Context = { - encode(message: Context, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Context, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.cluster !== "") { writer.uint32(10).string(message.cluster); } @@ -3196,7 +4292,7 @@ export const Context = { decode(input: _m0.Reader | Uint8Array, length?: number): Context { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseContext(); + const message = { ...baseContext } as Context; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3215,10 +4311,18 @@ export const Context = { }, fromJSON(object: any): Context { - return { - cluster: isSet(object.cluster) ? String(object.cluster) : "", - namespace: isSet(object.namespace) ? String(object.namespace) : "", - }; + const message = { ...baseContext } as Context; + if (object.cluster !== undefined && object.cluster !== null) { + message.cluster = String(object.cluster); + } else { + message.cluster = ""; + } + if (object.namespace !== undefined && object.namespace !== null) { + message.namespace = String(object.namespace); + } else { + message.namespace = ""; + } + return message; }, toJSON(message: Context): unknown { @@ -3228,20 +4332,29 @@ export const Context = { return obj; }, - fromPartial, I>>(object: I): Context { - const message = createBaseContext(); - message.cluster = object.cluster ?? ""; - message.namespace = object.namespace ?? ""; + fromPartial(object: DeepPartial): Context { + const message = { ...baseContext } as Context; + if (object.cluster !== undefined && object.cluster !== null) { + message.cluster = object.cluster; + } else { + message.cluster = ""; + } + if (object.namespace !== undefined && object.namespace !== null) { + message.namespace = object.namespace; + } else { + message.namespace = ""; + } return message; }, }; -function createBaseAvailablePackageReference(): AvailablePackageReference { - return { context: undefined, identifier: "", plugin: undefined }; -} +const baseAvailablePackageReference: object = { identifier: "" }; export const AvailablePackageReference = { - encode(message: AvailablePackageReference, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: AvailablePackageReference, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } @@ -3254,10 +4367,15 @@ export const AvailablePackageReference = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): AvailablePackageReference { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): AvailablePackageReference { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAvailablePackageReference(); + const message = { + ...baseAvailablePackageReference, + } as AvailablePackageReference; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3279,46 +4397,71 @@ export const AvailablePackageReference = { }, fromJSON(object: any): AvailablePackageReference { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - identifier: isSet(object.identifier) ? String(object.identifier) : "", - plugin: isSet(object.plugin) ? Plugin.fromJSON(object.plugin) : undefined, - }; + const message = { + ...baseAvailablePackageReference, + } as AvailablePackageReference; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + if (object.identifier !== undefined && object.identifier !== null) { + message.identifier = String(object.identifier); + } else { + message.identifier = ""; + } + if (object.plugin !== undefined && object.plugin !== null) { + message.plugin = Plugin.fromJSON(object.plugin); + } else { + message.plugin = undefined; + } + return message; }, toJSON(message: AvailablePackageReference): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); message.identifier !== undefined && (obj.identifier = message.identifier); message.plugin !== undefined && (obj.plugin = message.plugin ? Plugin.toJSON(message.plugin) : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): AvailablePackageReference { - const message = createBaseAvailablePackageReference(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; - message.identifier = object.identifier ?? ""; - message.plugin = - object.plugin !== undefined && object.plugin !== null - ? Plugin.fromPartial(object.plugin) - : undefined; + const message = { + ...baseAvailablePackageReference, + } as AvailablePackageReference; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } + if (object.identifier !== undefined && object.identifier !== null) { + message.identifier = object.identifier; + } else { + message.identifier = ""; + } + if (object.plugin !== undefined && object.plugin !== null) { + message.plugin = Plugin.fromPartial(object.plugin); + } else { + message.plugin = undefined; + } return message; }, }; -function createBaseMaintainer(): Maintainer { - return { name: "", email: "" }; -} +const baseMaintainer: object = { name: "", email: "" }; export const Maintainer = { - encode(message: Maintainer, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Maintainer, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -3331,7 +4474,7 @@ export const Maintainer = { decode(input: _m0.Reader | Uint8Array, length?: number): Maintainer { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseMaintainer(); + const message = { ...baseMaintainer } as Maintainer; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3350,10 +4493,18 @@ export const Maintainer = { }, fromJSON(object: any): Maintainer { - return { - name: isSet(object.name) ? String(object.name) : "", - email: isSet(object.email) ? String(object.email) : "", - }; + const message = { ...baseMaintainer } as Maintainer; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.email !== undefined && object.email !== null) { + message.email = String(object.email); + } else { + message.email = ""; + } + return message; }, toJSON(message: Maintainer): unknown { @@ -3363,26 +4514,35 @@ export const Maintainer = { return obj; }, - fromPartial, I>>(object: I): Maintainer { - const message = createBaseMaintainer(); - message.name = object.name ?? ""; - message.email = object.email ?? ""; + fromPartial(object: DeepPartial): Maintainer { + const message = { ...baseMaintainer } as Maintainer; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.email !== undefined && object.email !== null) { + message.email = object.email; + } else { + message.email = ""; + } return message; }, }; -function createBaseFilterOptions(): FilterOptions { - return { - query: "", - categories: [], - repositories: [], - pkgVersion: "", - appVersion: "", - }; -} +const baseFilterOptions: object = { + query: "", + categories: "", + repositories: "", + pkgVersion: "", + appVersion: "", +}; export const FilterOptions = { - encode(message: FilterOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: FilterOptions, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.query !== "") { writer.uint32(10).string(message.query); } @@ -3404,7 +4564,9 @@ export const FilterOptions = { decode(input: _m0.Reader | Uint8Array, length?: number): FilterOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseFilterOptions(); + const message = { ...baseFilterOptions } as FilterOptions; + message.categories = []; + message.repositories = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3432,29 +4594,47 @@ export const FilterOptions = { }, fromJSON(object: any): FilterOptions { - return { - query: isSet(object.query) ? String(object.query) : "", - categories: Array.isArray(object?.categories) - ? object.categories.map((e: any) => String(e)) - : [], - repositories: Array.isArray(object?.repositories) - ? object.repositories.map((e: any) => String(e)) - : [], - pkgVersion: isSet(object.pkgVersion) ? String(object.pkgVersion) : "", - appVersion: isSet(object.appVersion) ? String(object.appVersion) : "", - }; + const message = { ...baseFilterOptions } as FilterOptions; + message.categories = []; + message.repositories = []; + if (object.query !== undefined && object.query !== null) { + message.query = String(object.query); + } else { + message.query = ""; + } + if (object.categories !== undefined && object.categories !== null) { + for (const e of object.categories) { + message.categories.push(String(e)); + } + } + if (object.repositories !== undefined && object.repositories !== null) { + for (const e of object.repositories) { + message.repositories.push(String(e)); + } + } + if (object.pkgVersion !== undefined && object.pkgVersion !== null) { + message.pkgVersion = String(object.pkgVersion); + } else { + message.pkgVersion = ""; + } + if (object.appVersion !== undefined && object.appVersion !== null) { + message.appVersion = String(object.appVersion); + } else { + message.appVersion = ""; + } + return message; }, toJSON(message: FilterOptions): unknown { const obj: any = {}; message.query !== undefined && (obj.query = message.query); if (message.categories) { - obj.categories = message.categories.map(e => e); + obj.categories = message.categories.map((e) => e); } else { obj.categories = []; } if (message.repositories) { - obj.repositories = message.repositories.map(e => e); + obj.repositories = message.repositories.map((e) => e); } else { obj.repositories = []; } @@ -3463,23 +4643,46 @@ export const FilterOptions = { return obj; }, - fromPartial, I>>(object: I): FilterOptions { - const message = createBaseFilterOptions(); - message.query = object.query ?? ""; - message.categories = object.categories?.map(e => e) || []; - message.repositories = object.repositories?.map(e => e) || []; - message.pkgVersion = object.pkgVersion ?? ""; - message.appVersion = object.appVersion ?? ""; + fromPartial(object: DeepPartial): FilterOptions { + const message = { ...baseFilterOptions } as FilterOptions; + message.categories = []; + message.repositories = []; + if (object.query !== undefined && object.query !== null) { + message.query = object.query; + } else { + message.query = ""; + } + if (object.categories !== undefined && object.categories !== null) { + for (const e of object.categories) { + message.categories.push(e); + } + } + if (object.repositories !== undefined && object.repositories !== null) { + for (const e of object.repositories) { + message.repositories.push(e); + } + } + if (object.pkgVersion !== undefined && object.pkgVersion !== null) { + message.pkgVersion = object.pkgVersion; + } else { + message.pkgVersion = ""; + } + if (object.appVersion !== undefined && object.appVersion !== null) { + message.appVersion = object.appVersion; + } else { + message.appVersion = ""; + } return message; }, }; -function createBasePaginationOptions(): PaginationOptions { - return { pageToken: "", pageSize: 0 }; -} +const basePaginationOptions: object = { pageToken: "", pageSize: 0 }; export const PaginationOptions = { - encode(message: PaginationOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: PaginationOptions, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.pageToken !== "") { writer.uint32(10).string(message.pageToken); } @@ -3492,7 +4695,7 @@ export const PaginationOptions = { decode(input: _m0.Reader | Uint8Array, length?: number): PaginationOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePaginationOptions(); + const message = { ...basePaginationOptions } as PaginationOptions; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3511,33 +4714,50 @@ export const PaginationOptions = { }, fromJSON(object: any): PaginationOptions { - return { - pageToken: isSet(object.pageToken) ? String(object.pageToken) : "", - pageSize: isSet(object.pageSize) ? Number(object.pageSize) : 0, - }; + const message = { ...basePaginationOptions } as PaginationOptions; + if (object.pageToken !== undefined && object.pageToken !== null) { + message.pageToken = String(object.pageToken); + } else { + message.pageToken = ""; + } + if (object.pageSize !== undefined && object.pageSize !== null) { + message.pageSize = Number(object.pageSize); + } else { + message.pageSize = 0; + } + return message; }, toJSON(message: PaginationOptions): unknown { const obj: any = {}; message.pageToken !== undefined && (obj.pageToken = message.pageToken); - message.pageSize !== undefined && (obj.pageSize = Math.round(message.pageSize)); + message.pageSize !== undefined && (obj.pageSize = message.pageSize); return obj; }, - fromPartial, I>>(object: I): PaginationOptions { - const message = createBasePaginationOptions(); - message.pageToken = object.pageToken ?? ""; - message.pageSize = object.pageSize ?? 0; + fromPartial(object: DeepPartial): PaginationOptions { + const message = { ...basePaginationOptions } as PaginationOptions; + if (object.pageToken !== undefined && object.pageToken !== null) { + message.pageToken = object.pageToken; + } else { + message.pageToken = ""; + } + if (object.pageSize !== undefined && object.pageSize !== null) { + message.pageSize = object.pageSize; + } else { + message.pageSize = 0; + } return message; }, }; -function createBaseInstalledPackageReference(): InstalledPackageReference { - return { context: undefined, identifier: "", plugin: undefined }; -} +const baseInstalledPackageReference: object = { identifier: "" }; export const InstalledPackageReference = { - encode(message: InstalledPackageReference, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: InstalledPackageReference, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } @@ -3550,10 +4770,15 @@ export const InstalledPackageReference = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): InstalledPackageReference { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): InstalledPackageReference { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInstalledPackageReference(); + const message = { + ...baseInstalledPackageReference, + } as InstalledPackageReference; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3575,46 +4800,71 @@ export const InstalledPackageReference = { }, fromJSON(object: any): InstalledPackageReference { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - identifier: isSet(object.identifier) ? String(object.identifier) : "", - plugin: isSet(object.plugin) ? Plugin.fromJSON(object.plugin) : undefined, - }; + const message = { + ...baseInstalledPackageReference, + } as InstalledPackageReference; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + if (object.identifier !== undefined && object.identifier !== null) { + message.identifier = String(object.identifier); + } else { + message.identifier = ""; + } + if (object.plugin !== undefined && object.plugin !== null) { + message.plugin = Plugin.fromJSON(object.plugin); + } else { + message.plugin = undefined; + } + return message; }, toJSON(message: InstalledPackageReference): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); message.identifier !== undefined && (obj.identifier = message.identifier); message.plugin !== undefined && (obj.plugin = message.plugin ? Plugin.toJSON(message.plugin) : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): InstalledPackageReference { - const message = createBaseInstalledPackageReference(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; - message.identifier = object.identifier ?? ""; - message.plugin = - object.plugin !== undefined && object.plugin !== null - ? Plugin.fromPartial(object.plugin) - : undefined; + const message = { + ...baseInstalledPackageReference, + } as InstalledPackageReference; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } + if (object.identifier !== undefined && object.identifier !== null) { + message.identifier = object.identifier; + } else { + message.identifier = ""; + } + if (object.plugin !== undefined && object.plugin !== null) { + message.plugin = Plugin.fromPartial(object.plugin); + } else { + message.plugin = undefined; + } return message; }, }; -function createBaseVersionReference(): VersionReference { - return { version: "" }; -} +const baseVersionReference: object = { version: "" }; export const VersionReference = { - encode(message: VersionReference, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: VersionReference, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.version !== "") { writer.uint32(10).string(message.version); } @@ -3624,7 +4874,7 @@ export const VersionReference = { decode(input: _m0.Reader | Uint8Array, length?: number): VersionReference { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseVersionReference(); + const message = { ...baseVersionReference } as VersionReference; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3640,9 +4890,13 @@ export const VersionReference = { }, fromJSON(object: any): VersionReference { - return { - version: isSet(object.version) ? String(object.version) : "", - }; + const message = { ...baseVersionReference } as VersionReference; + if (object.version !== undefined && object.version !== null) { + message.version = String(object.version); + } else { + message.version = ""; + } + return message; }, toJSON(message: VersionReference): unknown { @@ -3651,19 +4905,28 @@ export const VersionReference = { return obj; }, - fromPartial, I>>(object: I): VersionReference { - const message = createBaseVersionReference(); - message.version = object.version ?? ""; + fromPartial(object: DeepPartial): VersionReference { + const message = { ...baseVersionReference } as VersionReference; + if (object.version !== undefined && object.version !== null) { + message.version = object.version; + } else { + message.version = ""; + } return message; }, }; -function createBaseInstalledPackageStatus(): InstalledPackageStatus { - return { ready: false, reason: 0, userReason: "" }; -} +const baseInstalledPackageStatus: object = { + ready: false, + reason: 0, + userReason: "", +}; export const InstalledPackageStatus = { - encode(message: InstalledPackageStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: InstalledPackageStatus, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.ready === true) { writer.uint32(8).bool(message.ready); } @@ -3676,10 +4939,13 @@ export const InstalledPackageStatus = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): InstalledPackageStatus { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): InstalledPackageStatus { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInstalledPackageStatus(); + const message = { ...baseInstalledPackageStatus } as InstalledPackageStatus; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3701,11 +4967,25 @@ export const InstalledPackageStatus = { }, fromJSON(object: any): InstalledPackageStatus { - return { - ready: isSet(object.ready) ? Boolean(object.ready) : false, - reason: isSet(object.reason) ? installedPackageStatus_StatusReasonFromJSON(object.reason) : 0, - userReason: isSet(object.userReason) ? String(object.userReason) : "", - }; + const message = { ...baseInstalledPackageStatus } as InstalledPackageStatus; + if (object.ready !== undefined && object.ready !== null) { + message.ready = Boolean(object.ready); + } else { + message.ready = false; + } + if (object.reason !== undefined && object.reason !== null) { + message.reason = installedPackageStatus_StatusReasonFromJSON( + object.reason + ); + } else { + message.reason = 0; + } + if (object.userReason !== undefined && object.userReason !== null) { + message.userReason = String(object.userReason); + } else { + message.userReason = ""; + } + return message; }, toJSON(message: InstalledPackageStatus): unknown { @@ -3717,23 +4997,40 @@ export const InstalledPackageStatus = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): InstalledPackageStatus { - const message = createBaseInstalledPackageStatus(); - message.ready = object.ready ?? false; - message.reason = object.reason ?? 0; - message.userReason = object.userReason ?? ""; + const message = { ...baseInstalledPackageStatus } as InstalledPackageStatus; + if (object.ready !== undefined && object.ready !== null) { + message.ready = object.ready; + } else { + message.ready = false; + } + if (object.reason !== undefined && object.reason !== null) { + message.reason = object.reason; + } else { + message.reason = 0; + } + if (object.userReason !== undefined && object.userReason !== null) { + message.userReason = object.userReason; + } else { + message.userReason = ""; + } return message; }, }; -function createBaseReconciliationOptions(): ReconciliationOptions { - return { interval: 0, suspend: false, serviceAccountName: "" }; -} +const baseReconciliationOptions: object = { + interval: 0, + suspend: false, + serviceAccountName: "", +}; export const ReconciliationOptions = { - encode(message: ReconciliationOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: ReconciliationOptions, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.interval !== 0) { writer.uint32(8).int32(message.interval); } @@ -3746,10 +5043,13 @@ export const ReconciliationOptions = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): ReconciliationOptions { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): ReconciliationOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseReconciliationOptions(); + const message = { ...baseReconciliationOptions } as ReconciliationOptions; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3771,39 +5071,70 @@ export const ReconciliationOptions = { }, fromJSON(object: any): ReconciliationOptions { - return { - interval: isSet(object.interval) ? Number(object.interval) : 0, - suspend: isSet(object.suspend) ? Boolean(object.suspend) : false, - serviceAccountName: isSet(object.serviceAccountName) ? String(object.serviceAccountName) : "", - }; + const message = { ...baseReconciliationOptions } as ReconciliationOptions; + if (object.interval !== undefined && object.interval !== null) { + message.interval = Number(object.interval); + } else { + message.interval = 0; + } + if (object.suspend !== undefined && object.suspend !== null) { + message.suspend = Boolean(object.suspend); + } else { + message.suspend = false; + } + if ( + object.serviceAccountName !== undefined && + object.serviceAccountName !== null + ) { + message.serviceAccountName = String(object.serviceAccountName); + } else { + message.serviceAccountName = ""; + } + return message; }, toJSON(message: ReconciliationOptions): unknown { const obj: any = {}; - message.interval !== undefined && (obj.interval = Math.round(message.interval)); + message.interval !== undefined && (obj.interval = message.interval); message.suspend !== undefined && (obj.suspend = message.suspend); message.serviceAccountName !== undefined && (obj.serviceAccountName = message.serviceAccountName); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): ReconciliationOptions { - const message = createBaseReconciliationOptions(); - message.interval = object.interval ?? 0; - message.suspend = object.suspend ?? false; - message.serviceAccountName = object.serviceAccountName ?? ""; + const message = { ...baseReconciliationOptions } as ReconciliationOptions; + if (object.interval !== undefined && object.interval !== null) { + message.interval = object.interval; + } else { + message.interval = 0; + } + if (object.suspend !== undefined && object.suspend !== null) { + message.suspend = object.suspend; + } else { + message.suspend = false; + } + if ( + object.serviceAccountName !== undefined && + object.serviceAccountName !== null + ) { + message.serviceAccountName = object.serviceAccountName; + } else { + message.serviceAccountName = ""; + } return message; }, }; -function createBasePackageAppVersion(): PackageAppVersion { - return { pkgVersion: "", appVersion: "" }; -} +const basePackageAppVersion: object = { pkgVersion: "", appVersion: "" }; export const PackageAppVersion = { - encode(message: PackageAppVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: PackageAppVersion, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.pkgVersion !== "") { writer.uint32(10).string(message.pkgVersion); } @@ -3816,7 +5147,7 @@ export const PackageAppVersion = { decode(input: _m0.Reader | Uint8Array, length?: number): PackageAppVersion { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePackageAppVersion(); + const message = { ...basePackageAppVersion } as PackageAppVersion; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3835,10 +5166,18 @@ export const PackageAppVersion = { }, fromJSON(object: any): PackageAppVersion { - return { - pkgVersion: isSet(object.pkgVersion) ? String(object.pkgVersion) : "", - appVersion: isSet(object.appVersion) ? String(object.appVersion) : "", - }; + const message = { ...basePackageAppVersion } as PackageAppVersion; + if (object.pkgVersion !== undefined && object.pkgVersion !== null) { + message.pkgVersion = String(object.pkgVersion); + } else { + message.pkgVersion = ""; + } + if (object.appVersion !== undefined && object.appVersion !== null) { + message.appVersion = String(object.appVersion); + } else { + message.appVersion = ""; + } + return message; }, toJSON(message: PackageAppVersion): unknown { @@ -3848,20 +5187,34 @@ export const PackageAppVersion = { return obj; }, - fromPartial, I>>(object: I): PackageAppVersion { - const message = createBasePackageAppVersion(); - message.pkgVersion = object.pkgVersion ?? ""; - message.appVersion = object.appVersion ?? ""; + fromPartial(object: DeepPartial): PackageAppVersion { + const message = { ...basePackageAppVersion } as PackageAppVersion; + if (object.pkgVersion !== undefined && object.pkgVersion !== null) { + message.pkgVersion = object.pkgVersion; + } else { + message.pkgVersion = ""; + } + if (object.appVersion !== undefined && object.appVersion !== null) { + message.appVersion = object.appVersion; + } else { + message.appVersion = ""; + } return message; }, }; -function createBaseResourceRef(): ResourceRef { - return { apiVersion: "", kind: "", name: "", namespace: "" }; -} +const baseResourceRef: object = { + apiVersion: "", + kind: "", + name: "", + namespace: "", +}; export const ResourceRef = { - encode(message: ResourceRef, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: ResourceRef, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.apiVersion !== "") { writer.uint32(10).string(message.apiVersion); } @@ -3880,7 +5233,7 @@ export const ResourceRef = { decode(input: _m0.Reader | Uint8Array, length?: number): ResourceRef { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResourceRef(); + const message = { ...baseResourceRef } as ResourceRef; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3905,12 +5258,28 @@ export const ResourceRef = { }, fromJSON(object: any): ResourceRef { - return { - apiVersion: isSet(object.apiVersion) ? String(object.apiVersion) : "", - kind: isSet(object.kind) ? String(object.kind) : "", - name: isSet(object.name) ? String(object.name) : "", - namespace: isSet(object.namespace) ? String(object.namespace) : "", - }; + const message = { ...baseResourceRef } as ResourceRef; + if (object.apiVersion !== undefined && object.apiVersion !== null) { + message.apiVersion = String(object.apiVersion); + } else { + message.apiVersion = ""; + } + if (object.kind !== undefined && object.kind !== null) { + message.kind = String(object.kind); + } else { + message.kind = ""; + } + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.namespace !== undefined && object.namespace !== null) { + message.namespace = String(object.namespace); + } else { + message.namespace = ""; + } + return message; }, toJSON(message: ResourceRef): unknown { @@ -3922,12 +5291,28 @@ export const ResourceRef = { return obj; }, - fromPartial, I>>(object: I): ResourceRef { - const message = createBaseResourceRef(); - message.apiVersion = object.apiVersion ?? ""; - message.kind = object.kind ?? ""; - message.name = object.name ?? ""; - message.namespace = object.namespace ?? ""; + fromPartial(object: DeepPartial): ResourceRef { + const message = { ...baseResourceRef } as ResourceRef; + if (object.apiVersion !== undefined && object.apiVersion !== null) { + message.apiVersion = object.apiVersion; + } else { + message.apiVersion = ""; + } + if (object.kind !== undefined && object.kind !== null) { + message.kind = object.kind; + } else { + message.kind = ""; + } + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.namespace !== undefined && object.namespace !== null) { + message.namespace = object.namespace; + } else { + message.namespace = ""; + } return message; }, }; @@ -3936,39 +5321,39 @@ export const ResourceRef = { export interface PackagesService { GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; } @@ -3977,113 +5362,117 @@ export class PackagesServiceClientImpl implements PackagesService { constructor(rpc: Rpc) { this.rpc = rpc; - this.GetAvailablePackageSummaries = this.GetAvailablePackageSummaries.bind(this); + this.GetAvailablePackageSummaries = + this.GetAvailablePackageSummaries.bind(this); this.GetAvailablePackageDetail = this.GetAvailablePackageDetail.bind(this); - this.GetAvailablePackageVersions = this.GetAvailablePackageVersions.bind(this); - this.GetInstalledPackageSummaries = this.GetInstalledPackageSummaries.bind(this); + this.GetAvailablePackageVersions = + this.GetAvailablePackageVersions.bind(this); + this.GetInstalledPackageSummaries = + this.GetInstalledPackageSummaries.bind(this); this.GetInstalledPackageDetail = this.GetInstalledPackageDetail.bind(this); this.CreateInstalledPackage = this.CreateInstalledPackage.bind(this); this.UpdateInstalledPackage = this.UpdateInstalledPackage.bind(this); this.DeleteInstalledPackage = this.DeleteInstalledPackage.bind(this); - this.GetInstalledPackageResourceRefs = this.GetInstalledPackageResourceRefs.bind(this); + this.GetInstalledPackageResourceRefs = + this.GetInstalledPackageResourceRefs.bind(this); } GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( PackagesServiceGetAvailablePackageSummariesDesc, GetAvailablePackageSummariesRequest.fromPartial(request), - metadata, + metadata ); } GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( PackagesServiceGetAvailablePackageDetailDesc, GetAvailablePackageDetailRequest.fromPartial(request), - metadata, + metadata ); } GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( PackagesServiceGetAvailablePackageVersionsDesc, GetAvailablePackageVersionsRequest.fromPartial(request), - metadata, + metadata ); } GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( PackagesServiceGetInstalledPackageSummariesDesc, GetInstalledPackageSummariesRequest.fromPartial(request), - metadata, + metadata ); } GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( PackagesServiceGetInstalledPackageDetailDesc, GetInstalledPackageDetailRequest.fromPartial(request), - metadata, + metadata ); } CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( PackagesServiceCreateInstalledPackageDesc, CreateInstalledPackageRequest.fromPartial(request), - metadata, + metadata ); } UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( PackagesServiceUpdateInstalledPackageDesc, UpdateInstalledPackageRequest.fromPartial(request), - metadata, + metadata ); } DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( PackagesServiceDeleteInstalledPackageDesc, DeleteInstalledPackageRequest.fromPartial(request), - metadata, + metadata ); } GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( PackagesServiceGetInstalledPackageResourceRefsDesc, GetInstalledPackageResourceRefsRequest.fromPartial(request), - metadata, + metadata ); } } @@ -4092,205 +5481,215 @@ export const PackagesServiceDesc = { serviceName: "kubeappsapis.core.packages.v1alpha1.PackagesService", }; -export const PackagesServiceGetAvailablePackageSummariesDesc: UnaryMethodDefinitionish = { - methodName: "GetAvailablePackageSummaries", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageSummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageSummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const PackagesServiceGetAvailablePackageSummariesDesc: UnaryMethodDefinitionish = + { + methodName: "GetAvailablePackageSummaries", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageSummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageSummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const PackagesServiceGetAvailablePackageDetailDesc: UnaryMethodDefinitionish = { - methodName: "GetAvailablePackageDetail", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const PackagesServiceGetAvailablePackageDetailDesc: UnaryMethodDefinitionish = + { + methodName: "GetAvailablePackageDetail", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const PackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = { - methodName: "GetAvailablePackageVersions", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageVersionsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageVersionsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const PackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = + { + methodName: "GetAvailablePackageVersions", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageVersionsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageVersionsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const PackagesServiceGetInstalledPackageSummariesDesc: UnaryMethodDefinitionish = { - methodName: "GetInstalledPackageSummaries", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageSummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageSummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const PackagesServiceGetInstalledPackageSummariesDesc: UnaryMethodDefinitionish = + { + methodName: "GetInstalledPackageSummaries", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageSummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageSummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const PackagesServiceGetInstalledPackageDetailDesc: UnaryMethodDefinitionish = { - methodName: "GetInstalledPackageDetail", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const PackagesServiceGetInstalledPackageDetailDesc: UnaryMethodDefinitionish = + { + methodName: "GetInstalledPackageDetail", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const PackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = { - methodName: "CreateInstalledPackage", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return CreateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...CreateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const PackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = + { + methodName: "CreateInstalledPackage", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return CreateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...CreateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const PackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = { - methodName: "UpdateInstalledPackage", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return UpdateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...UpdateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const PackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = + { + methodName: "UpdateInstalledPackage", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return UpdateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...UpdateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const PackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = { - methodName: "DeleteInstalledPackage", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return DeleteInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...DeleteInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const PackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = + { + methodName: "DeleteInstalledPackage", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return DeleteInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...DeleteInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const PackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = { - methodName: "GetInstalledPackageResourceRefs", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageResourceRefsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageResourceRefsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const PackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = + { + methodName: "GetInstalledPackageResourceRefs", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageResourceRefsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageResourceRefsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { +interface UnaryMethodDefinitionishR + extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -4301,7 +5700,7 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise; } @@ -4321,7 +5720,7 @@ export class GrpcWebImpl { debug?: boolean; metadata?: grpc.Metadata; - }, + } ) { this.host = host; this.options = options; @@ -4330,7 +5729,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -4362,8 +5761,14 @@ export class GrpcWebImpl { } } -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array @@ -4374,16 +5779,7 @@ export type DeepPartial = T extends Builtin ? { [K in keyof T]?: DeepPartial } : Partial; -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record>, never>; - if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; _m0.configure(); } - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/repositories.ts b/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/repositories.ts index baaee1d50d7..3de756a0d0d 100644 --- a/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/repositories.ts +++ b/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/repositories.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import Long from "long"; import { grpc } from "@improbable-eng/grpc-web"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; import { Context } from "../../../../kubeappsapis/core/packages/v1alpha1/packages"; import { Plugin } from "../../../../kubeappsapis/core/plugins/v1alpha1/plugins"; import { Any } from "../../../../google/protobuf/any"; @@ -149,7 +149,7 @@ export enum PackageRepositoryAuth_PackageRepositoryAuthType { } export function packageRepositoryAuth_PackageRepositoryAuthTypeFromJSON( - object: any, + object: any ): PackageRepositoryAuth_PackageRepositoryAuthType { switch (object) { case 0: @@ -178,7 +178,7 @@ export function packageRepositoryAuth_PackageRepositoryAuthTypeFromJSON( } export function packageRepositoryAuth_PackageRepositoryAuthTypeToJSON( - object: PackageRepositoryAuth_PackageRepositoryAuthType, + object: PackageRepositoryAuth_PackageRepositoryAuthType ): string { switch (object) { case PackageRepositoryAuth_PackageRepositoryAuthType.PACKAGE_REPOSITORY_AUTH_TYPE_UNSPECIFIED: @@ -269,6 +269,34 @@ export interface GetPackageRepositorySummariesRequest { context?: Context; } +/** + * UpdatePackageRepositoryRequest + * + * Request for UpdatePackageRepository + */ +export interface UpdatePackageRepositoryRequest { + /** + * A reference uniquely identifying the package repository being updated. + * The only required field + */ + packageRepoRef?: PackageRepositoryReference; + /** URL identifying the package repository location. */ + url: string; + /** A user-provided description. */ + description: string; + /** Package storage type */ + type: string; + /** + * The interval at which to check the upstream for updates (in seconds) + * Optional. Defaults to 10m if not specified + */ + interval: number; + /** TLS-specific parameters for connecting to a repository. Optional */ + tlsConfig?: PackageRepositoryTlsConfig; + /** authentication parameters for connecting to a repository. Optional */ + auth?: PackageRepositoryAuth; +} + /** * PackageRepositoryReference * @@ -347,7 +375,7 @@ export enum PackageRepositoryStatus_StatusReason { } export function packageRepositoryStatus_StatusReasonFromJSON( - object: any, + object: any ): PackageRepositoryStatus_StatusReason { switch (object) { case 0: @@ -370,7 +398,7 @@ export function packageRepositoryStatus_StatusReasonFromJSON( } export function packageRepositoryStatus_StatusReasonToJSON( - object: PackageRepositoryStatus_StatusReason, + object: PackageRepositoryStatus_StatusReason ): string { switch (object) { case PackageRepositoryStatus_StatusReason.STATUS_REASON_UNSPECIFIED: @@ -468,26 +496,28 @@ export interface GetPackageRepositorySummariesResponse { packageRepositorySummaries: PackageRepositorySummary[]; } -function createBaseAddPackageRepositoryRequest(): AddPackageRepositoryRequest { - return { - context: undefined, - name: "", - description: "", - namespaceScoped: false, - type: "", - url: "", - interval: 0, - tlsConfig: undefined, - auth: undefined, - plugin: undefined, - customDetail: undefined, - }; +/** + * UpdatePackageRepositoryResponse + * + * Response for UpdatePackageRepository + */ +export interface UpdatePackageRepositoryResponse { + packageRepoRef?: PackageRepositoryReference; } +const baseAddPackageRepositoryRequest: object = { + name: "", + description: "", + namespaceScoped: false, + type: "", + url: "", + interval: 0, +}; + export const AddPackageRepositoryRequest = { encode( message: AddPackageRepositoryRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); @@ -511,10 +541,16 @@ export const AddPackageRepositoryRequest = { writer.uint32(56).uint32(message.interval); } if (message.tlsConfig !== undefined) { - PackageRepositoryTlsConfig.encode(message.tlsConfig, writer.uint32(66).fork()).ldelim(); + PackageRepositoryTlsConfig.encode( + message.tlsConfig, + writer.uint32(66).fork() + ).ldelim(); } if (message.auth !== undefined) { - PackageRepositoryAuth.encode(message.auth, writer.uint32(74).fork()).ldelim(); + PackageRepositoryAuth.encode( + message.auth, + writer.uint32(74).fork() + ).ldelim(); } if (message.plugin !== undefined) { Plugin.encode(message.plugin, writer.uint32(82).fork()).ldelim(); @@ -525,10 +561,15 @@ export const AddPackageRepositoryRequest = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): AddPackageRepositoryRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): AddPackageRepositoryRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddPackageRepositoryRequest(); + const message = { + ...baseAddPackageRepositoryRequest, + } as AddPackageRepositoryRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -554,7 +595,10 @@ export const AddPackageRepositoryRequest = { message.interval = reader.uint32(); break; case 8: - message.tlsConfig = PackageRepositoryTlsConfig.decode(reader, reader.uint32()); + message.tlsConfig = PackageRepositoryTlsConfig.decode( + reader, + reader.uint32() + ); break; case 9: message.auth = PackageRepositoryAuth.decode(reader, reader.uint32()); @@ -574,92 +618,177 @@ export const AddPackageRepositoryRequest = { }, fromJSON(object: any): AddPackageRepositoryRequest { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : "", - namespaceScoped: isSet(object.namespaceScoped) ? Boolean(object.namespaceScoped) : false, - type: isSet(object.type) ? String(object.type) : "", - url: isSet(object.url) ? String(object.url) : "", - interval: isSet(object.interval) ? Number(object.interval) : 0, - tlsConfig: isSet(object.tlsConfig) - ? PackageRepositoryTlsConfig.fromJSON(object.tlsConfig) - : undefined, - auth: isSet(object.auth) ? PackageRepositoryAuth.fromJSON(object.auth) : undefined, - plugin: isSet(object.plugin) ? Plugin.fromJSON(object.plugin) : undefined, - customDetail: isSet(object.customDetail) ? Any.fromJSON(object.customDetail) : undefined, - }; + const message = { + ...baseAddPackageRepositoryRequest, + } as AddPackageRepositoryRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if ( + object.namespaceScoped !== undefined && + object.namespaceScoped !== null + ) { + message.namespaceScoped = Boolean(object.namespaceScoped); + } else { + message.namespaceScoped = false; + } + if (object.type !== undefined && object.type !== null) { + message.type = String(object.type); + } else { + message.type = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = String(object.url); + } else { + message.url = ""; + } + if (object.interval !== undefined && object.interval !== null) { + message.interval = Number(object.interval); + } else { + message.interval = 0; + } + if (object.tlsConfig !== undefined && object.tlsConfig !== null) { + message.tlsConfig = PackageRepositoryTlsConfig.fromJSON(object.tlsConfig); + } else { + message.tlsConfig = undefined; + } + if (object.auth !== undefined && object.auth !== null) { + message.auth = PackageRepositoryAuth.fromJSON(object.auth); + } else { + message.auth = undefined; + } + if (object.plugin !== undefined && object.plugin !== null) { + message.plugin = Plugin.fromJSON(object.plugin); + } else { + message.plugin = undefined; + } + if (object.customDetail !== undefined && object.customDetail !== null) { + message.customDetail = Any.fromJSON(object.customDetail); + } else { + message.customDetail = undefined; + } + return message; }, toJSON(message: AddPackageRepositoryRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.namespaceScoped !== undefined && (obj.namespaceScoped = message.namespaceScoped); + message.description !== undefined && + (obj.description = message.description); + message.namespaceScoped !== undefined && + (obj.namespaceScoped = message.namespaceScoped); message.type !== undefined && (obj.type = message.type); message.url !== undefined && (obj.url = message.url); - message.interval !== undefined && (obj.interval = Math.round(message.interval)); + message.interval !== undefined && (obj.interval = message.interval); message.tlsConfig !== undefined && (obj.tlsConfig = message.tlsConfig ? PackageRepositoryTlsConfig.toJSON(message.tlsConfig) : undefined); message.auth !== undefined && - (obj.auth = message.auth ? PackageRepositoryAuth.toJSON(message.auth) : undefined); + (obj.auth = message.auth + ? PackageRepositoryAuth.toJSON(message.auth) + : undefined); message.plugin !== undefined && (obj.plugin = message.plugin ? Plugin.toJSON(message.plugin) : undefined); message.customDetail !== undefined && - (obj.customDetail = message.customDetail ? Any.toJSON(message.customDetail) : undefined); + (obj.customDetail = message.customDetail + ? Any.toJSON(message.customDetail) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): AddPackageRepositoryRequest { - const message = createBaseAddPackageRepositoryRequest(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; - message.name = object.name ?? ""; - message.description = object.description ?? ""; - message.namespaceScoped = object.namespaceScoped ?? false; - message.type = object.type ?? ""; - message.url = object.url ?? ""; - message.interval = object.interval ?? 0; - message.tlsConfig = - object.tlsConfig !== undefined && object.tlsConfig !== null - ? PackageRepositoryTlsConfig.fromPartial(object.tlsConfig) - : undefined; - message.auth = - object.auth !== undefined && object.auth !== null - ? PackageRepositoryAuth.fromPartial(object.auth) - : undefined; - message.plugin = - object.plugin !== undefined && object.plugin !== null - ? Plugin.fromPartial(object.plugin) - : undefined; - message.customDetail = - object.customDetail !== undefined && object.customDetail !== null - ? Any.fromPartial(object.customDetail) - : undefined; + const message = { + ...baseAddPackageRepositoryRequest, + } as AddPackageRepositoryRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if ( + object.namespaceScoped !== undefined && + object.namespaceScoped !== null + ) { + message.namespaceScoped = object.namespaceScoped; + } else { + message.namespaceScoped = false; + } + if (object.type !== undefined && object.type !== null) { + message.type = object.type; + } else { + message.type = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = object.url; + } else { + message.url = ""; + } + if (object.interval !== undefined && object.interval !== null) { + message.interval = object.interval; + } else { + message.interval = 0; + } + if (object.tlsConfig !== undefined && object.tlsConfig !== null) { + message.tlsConfig = PackageRepositoryTlsConfig.fromPartial( + object.tlsConfig + ); + } else { + message.tlsConfig = undefined; + } + if (object.auth !== undefined && object.auth !== null) { + message.auth = PackageRepositoryAuth.fromPartial(object.auth); + } else { + message.auth = undefined; + } + if (object.plugin !== undefined && object.plugin !== null) { + message.plugin = Plugin.fromPartial(object.plugin); + } else { + message.plugin = undefined; + } + if (object.customDetail !== undefined && object.customDetail !== null) { + message.customDetail = Any.fromPartial(object.customDetail); + } else { + message.customDetail = undefined; + } return message; }, }; -function createBasePackageRepositoryTlsConfig(): PackageRepositoryTlsConfig { - return { - insecureSkipVerify: false, - certAuthority: undefined, - secretRef: undefined, - }; -} +const basePackageRepositoryTlsConfig: object = { insecureSkipVerify: false }; export const PackageRepositoryTlsConfig = { encode( message: PackageRepositoryTlsConfig, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.insecureSkipVerify === true) { writer.uint32(8).bool(message.insecureSkipVerify); @@ -668,15 +797,23 @@ export const PackageRepositoryTlsConfig = { writer.uint32(18).string(message.certAuthority); } if (message.secretRef !== undefined) { - SecretKeyReference.encode(message.secretRef, writer.uint32(26).fork()).ldelim(); + SecretKeyReference.encode( + message.secretRef, + writer.uint32(26).fork() + ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): PackageRepositoryTlsConfig { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): PackageRepositoryTlsConfig { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePackageRepositoryTlsConfig(); + const message = { + ...basePackageRepositoryTlsConfig, + } as PackageRepositoryTlsConfig; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -687,7 +824,10 @@ export const PackageRepositoryTlsConfig = { message.certAuthority = reader.string(); break; case 3: - message.secretRef = SecretKeyReference.decode(reader, reader.uint32()); + message.secretRef = SecretKeyReference.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -698,22 +838,36 @@ export const PackageRepositoryTlsConfig = { }, fromJSON(object: any): PackageRepositoryTlsConfig { - return { - insecureSkipVerify: isSet(object.insecureSkipVerify) - ? Boolean(object.insecureSkipVerify) - : false, - certAuthority: isSet(object.certAuthority) ? String(object.certAuthority) : undefined, - secretRef: isSet(object.secretRef) - ? SecretKeyReference.fromJSON(object.secretRef) - : undefined, - }; + const message = { + ...basePackageRepositoryTlsConfig, + } as PackageRepositoryTlsConfig; + if ( + object.insecureSkipVerify !== undefined && + object.insecureSkipVerify !== null + ) { + message.insecureSkipVerify = Boolean(object.insecureSkipVerify); + } else { + message.insecureSkipVerify = false; + } + if (object.certAuthority !== undefined && object.certAuthority !== null) { + message.certAuthority = String(object.certAuthority); + } else { + message.certAuthority = undefined; + } + if (object.secretRef !== undefined && object.secretRef !== null) { + message.secretRef = SecretKeyReference.fromJSON(object.secretRef); + } else { + message.secretRef = undefined; + } + return message; }, toJSON(message: PackageRepositoryTlsConfig): unknown { const obj: any = {}; message.insecureSkipVerify !== undefined && (obj.insecureSkipVerify = message.insecureSkipVerify); - message.certAuthority !== undefined && (obj.certAuthority = message.certAuthority); + message.certAuthority !== undefined && + (obj.certAuthority = message.certAuthority); message.secretRef !== undefined && (obj.secretRef = message.secretRef ? SecretKeyReference.toJSON(message.secretRef) @@ -721,51 +875,67 @@ export const PackageRepositoryTlsConfig = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): PackageRepositoryTlsConfig { - const message = createBasePackageRepositoryTlsConfig(); - message.insecureSkipVerify = object.insecureSkipVerify ?? false; - message.certAuthority = object.certAuthority ?? undefined; - message.secretRef = - object.secretRef !== undefined && object.secretRef !== null - ? SecretKeyReference.fromPartial(object.secretRef) - : undefined; + const message = { + ...basePackageRepositoryTlsConfig, + } as PackageRepositoryTlsConfig; + if ( + object.insecureSkipVerify !== undefined && + object.insecureSkipVerify !== null + ) { + message.insecureSkipVerify = object.insecureSkipVerify; + } else { + message.insecureSkipVerify = false; + } + if (object.certAuthority !== undefined && object.certAuthority !== null) { + message.certAuthority = object.certAuthority; + } else { + message.certAuthority = undefined; + } + if (object.secretRef !== undefined && object.secretRef !== null) { + message.secretRef = SecretKeyReference.fromPartial(object.secretRef); + } else { + message.secretRef = undefined; + } return message; }, }; -function createBasePackageRepositoryAuth(): PackageRepositoryAuth { - return { - type: 0, - usernamePassword: undefined, - tlsCertKey: undefined, - dockerCreds: undefined, - header: undefined, - secretRef: undefined, - passCredentials: false, - }; -} +const basePackageRepositoryAuth: object = { type: 0, passCredentials: false }; export const PackageRepositoryAuth = { - encode(message: PackageRepositoryAuth, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: PackageRepositoryAuth, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.type !== 0) { writer.uint32(8).int32(message.type); } if (message.usernamePassword !== undefined) { - UsernamePassword.encode(message.usernamePassword, writer.uint32(18).fork()).ldelim(); + UsernamePassword.encode( + message.usernamePassword, + writer.uint32(18).fork() + ).ldelim(); } if (message.tlsCertKey !== undefined) { TlsCertKey.encode(message.tlsCertKey, writer.uint32(26).fork()).ldelim(); } if (message.dockerCreds !== undefined) { - DockerCredentials.encode(message.dockerCreds, writer.uint32(34).fork()).ldelim(); + DockerCredentials.encode( + message.dockerCreds, + writer.uint32(34).fork() + ).ldelim(); } if (message.header !== undefined) { writer.uint32(42).string(message.header); } if (message.secretRef !== undefined) { - SecretKeyReference.encode(message.secretRef, writer.uint32(50).fork()).ldelim(); + SecretKeyReference.encode( + message.secretRef, + writer.uint32(50).fork() + ).ldelim(); } if (message.passCredentials === true) { writer.uint32(56).bool(message.passCredentials); @@ -773,10 +943,13 @@ export const PackageRepositoryAuth = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): PackageRepositoryAuth { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): PackageRepositoryAuth { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePackageRepositoryAuth(); + const message = { ...basePackageRepositoryAuth } as PackageRepositoryAuth; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -784,19 +957,28 @@ export const PackageRepositoryAuth = { message.type = reader.int32() as any; break; case 2: - message.usernamePassword = UsernamePassword.decode(reader, reader.uint32()); + message.usernamePassword = UsernamePassword.decode( + reader, + reader.uint32() + ); break; case 3: message.tlsCertKey = TlsCertKey.decode(reader, reader.uint32()); break; case 4: - message.dockerCreds = DockerCredentials.decode(reader, reader.uint32()); + message.dockerCreds = DockerCredentials.decode( + reader, + reader.uint32() + ); break; case 5: message.header = reader.string(); break; case 6: - message.secretRef = SecretKeyReference.decode(reader, reader.uint32()); + message.secretRef = SecretKeyReference.decode( + reader, + reader.uint32() + ); break; case 7: message.passCredentials = reader.bool(); @@ -810,35 +992,69 @@ export const PackageRepositoryAuth = { }, fromJSON(object: any): PackageRepositoryAuth { - return { - type: isSet(object.type) - ? packageRepositoryAuth_PackageRepositoryAuthTypeFromJSON(object.type) - : 0, - usernamePassword: isSet(object.usernamePassword) - ? UsernamePassword.fromJSON(object.usernamePassword) - : undefined, - tlsCertKey: isSet(object.tlsCertKey) ? TlsCertKey.fromJSON(object.tlsCertKey) : undefined, - dockerCreds: isSet(object.dockerCreds) - ? DockerCredentials.fromJSON(object.dockerCreds) - : undefined, - header: isSet(object.header) ? String(object.header) : undefined, - secretRef: isSet(object.secretRef) - ? SecretKeyReference.fromJSON(object.secretRef) - : undefined, - passCredentials: isSet(object.passCredentials) ? Boolean(object.passCredentials) : false, - }; + const message = { ...basePackageRepositoryAuth } as PackageRepositoryAuth; + if (object.type !== undefined && object.type !== null) { + message.type = packageRepositoryAuth_PackageRepositoryAuthTypeFromJSON( + object.type + ); + } else { + message.type = 0; + } + if ( + object.usernamePassword !== undefined && + object.usernamePassword !== null + ) { + message.usernamePassword = UsernamePassword.fromJSON( + object.usernamePassword + ); + } else { + message.usernamePassword = undefined; + } + if (object.tlsCertKey !== undefined && object.tlsCertKey !== null) { + message.tlsCertKey = TlsCertKey.fromJSON(object.tlsCertKey); + } else { + message.tlsCertKey = undefined; + } + if (object.dockerCreds !== undefined && object.dockerCreds !== null) { + message.dockerCreds = DockerCredentials.fromJSON(object.dockerCreds); + } else { + message.dockerCreds = undefined; + } + if (object.header !== undefined && object.header !== null) { + message.header = String(object.header); + } else { + message.header = undefined; + } + if (object.secretRef !== undefined && object.secretRef !== null) { + message.secretRef = SecretKeyReference.fromJSON(object.secretRef); + } else { + message.secretRef = undefined; + } + if ( + object.passCredentials !== undefined && + object.passCredentials !== null + ) { + message.passCredentials = Boolean(object.passCredentials); + } else { + message.passCredentials = false; + } + return message; }, toJSON(message: PackageRepositoryAuth): unknown { const obj: any = {}; message.type !== undefined && - (obj.type = packageRepositoryAuth_PackageRepositoryAuthTypeToJSON(message.type)); + (obj.type = packageRepositoryAuth_PackageRepositoryAuthTypeToJSON( + message.type + )); message.usernamePassword !== undefined && (obj.usernamePassword = message.usernamePassword ? UsernamePassword.toJSON(message.usernamePassword) : undefined); message.tlsCertKey !== undefined && - (obj.tlsCertKey = message.tlsCertKey ? TlsCertKey.toJSON(message.tlsCertKey) : undefined); + (obj.tlsCertKey = message.tlsCertKey + ? TlsCertKey.toJSON(message.tlsCertKey) + : undefined); message.dockerCreds !== undefined && (obj.dockerCreds = message.dockerCreds ? DockerCredentials.toJSON(message.dockerCreds) @@ -848,43 +1064,69 @@ export const PackageRepositoryAuth = { (obj.secretRef = message.secretRef ? SecretKeyReference.toJSON(message.secretRef) : undefined); - message.passCredentials !== undefined && (obj.passCredentials = message.passCredentials); + message.passCredentials !== undefined && + (obj.passCredentials = message.passCredentials); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): PackageRepositoryAuth { - const message = createBasePackageRepositoryAuth(); - message.type = object.type ?? 0; - message.usernamePassword = - object.usernamePassword !== undefined && object.usernamePassword !== null - ? UsernamePassword.fromPartial(object.usernamePassword) - : undefined; - message.tlsCertKey = - object.tlsCertKey !== undefined && object.tlsCertKey !== null - ? TlsCertKey.fromPartial(object.tlsCertKey) - : undefined; - message.dockerCreds = - object.dockerCreds !== undefined && object.dockerCreds !== null - ? DockerCredentials.fromPartial(object.dockerCreds) - : undefined; - message.header = object.header ?? undefined; - message.secretRef = - object.secretRef !== undefined && object.secretRef !== null - ? SecretKeyReference.fromPartial(object.secretRef) - : undefined; - message.passCredentials = object.passCredentials ?? false; + const message = { ...basePackageRepositoryAuth } as PackageRepositoryAuth; + if (object.type !== undefined && object.type !== null) { + message.type = object.type; + } else { + message.type = 0; + } + if ( + object.usernamePassword !== undefined && + object.usernamePassword !== null + ) { + message.usernamePassword = UsernamePassword.fromPartial( + object.usernamePassword + ); + } else { + message.usernamePassword = undefined; + } + if (object.tlsCertKey !== undefined && object.tlsCertKey !== null) { + message.tlsCertKey = TlsCertKey.fromPartial(object.tlsCertKey); + } else { + message.tlsCertKey = undefined; + } + if (object.dockerCreds !== undefined && object.dockerCreds !== null) { + message.dockerCreds = DockerCredentials.fromPartial(object.dockerCreds); + } else { + message.dockerCreds = undefined; + } + if (object.header !== undefined && object.header !== null) { + message.header = object.header; + } else { + message.header = undefined; + } + if (object.secretRef !== undefined && object.secretRef !== null) { + message.secretRef = SecretKeyReference.fromPartial(object.secretRef); + } else { + message.secretRef = undefined; + } + if ( + object.passCredentials !== undefined && + object.passCredentials !== null + ) { + message.passCredentials = object.passCredentials; + } else { + message.passCredentials = false; + } return message; }, }; -function createBaseUsernamePassword(): UsernamePassword { - return { username: "", password: "" }; -} +const baseUsernamePassword: object = { username: "", password: "" }; export const UsernamePassword = { - encode(message: UsernamePassword, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: UsernamePassword, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.username !== "") { writer.uint32(10).string(message.username); } @@ -897,7 +1139,7 @@ export const UsernamePassword = { decode(input: _m0.Reader | Uint8Array, length?: number): UsernamePassword { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUsernamePassword(); + const message = { ...baseUsernamePassword } as UsernamePassword; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -916,10 +1158,18 @@ export const UsernamePassword = { }, fromJSON(object: any): UsernamePassword { - return { - username: isSet(object.username) ? String(object.username) : "", - password: isSet(object.password) ? String(object.password) : "", - }; + const message = { ...baseUsernamePassword } as UsernamePassword; + if (object.username !== undefined && object.username !== null) { + message.username = String(object.username); + } else { + message.username = ""; + } + if (object.password !== undefined && object.password !== null) { + message.password = String(object.password); + } else { + message.password = ""; + } + return message; }, toJSON(message: UsernamePassword): unknown { @@ -929,20 +1179,29 @@ export const UsernamePassword = { return obj; }, - fromPartial, I>>(object: I): UsernamePassword { - const message = createBaseUsernamePassword(); - message.username = object.username ?? ""; - message.password = object.password ?? ""; + fromPartial(object: DeepPartial): UsernamePassword { + const message = { ...baseUsernamePassword } as UsernamePassword; + if (object.username !== undefined && object.username !== null) { + message.username = object.username; + } else { + message.username = ""; + } + if (object.password !== undefined && object.password !== null) { + message.password = object.password; + } else { + message.password = ""; + } return message; }, }; -function createBaseTlsCertKey(): TlsCertKey { - return { cert: "", key: "" }; -} +const baseTlsCertKey: object = { cert: "", key: "" }; export const TlsCertKey = { - encode(message: TlsCertKey, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: TlsCertKey, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.cert !== "") { writer.uint32(10).string(message.cert); } @@ -955,7 +1214,7 @@ export const TlsCertKey = { decode(input: _m0.Reader | Uint8Array, length?: number): TlsCertKey { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTlsCertKey(); + const message = { ...baseTlsCertKey } as TlsCertKey; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -974,10 +1233,18 @@ export const TlsCertKey = { }, fromJSON(object: any): TlsCertKey { - return { - cert: isSet(object.cert) ? String(object.cert) : "", - key: isSet(object.key) ? String(object.key) : "", - }; + const message = { ...baseTlsCertKey } as TlsCertKey; + if (object.cert !== undefined && object.cert !== null) { + message.cert = String(object.cert); + } else { + message.cert = ""; + } + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + return message; }, toJSON(message: TlsCertKey): unknown { @@ -987,20 +1254,34 @@ export const TlsCertKey = { return obj; }, - fromPartial, I>>(object: I): TlsCertKey { - const message = createBaseTlsCertKey(); - message.cert = object.cert ?? ""; - message.key = object.key ?? ""; + fromPartial(object: DeepPartial): TlsCertKey { + const message = { ...baseTlsCertKey } as TlsCertKey; + if (object.cert !== undefined && object.cert !== null) { + message.cert = object.cert; + } else { + message.cert = ""; + } + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } return message; }, }; -function createBaseDockerCredentials(): DockerCredentials { - return { server: "", username: "", password: "", email: "" }; -} +const baseDockerCredentials: object = { + server: "", + username: "", + password: "", + email: "", +}; export const DockerCredentials = { - encode(message: DockerCredentials, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: DockerCredentials, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.server !== "") { writer.uint32(10).string(message.server); } @@ -1019,7 +1300,7 @@ export const DockerCredentials = { decode(input: _m0.Reader | Uint8Array, length?: number): DockerCredentials { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDockerCredentials(); + const message = { ...baseDockerCredentials } as DockerCredentials; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1044,12 +1325,28 @@ export const DockerCredentials = { }, fromJSON(object: any): DockerCredentials { - return { - server: isSet(object.server) ? String(object.server) : "", - username: isSet(object.username) ? String(object.username) : "", - password: isSet(object.password) ? String(object.password) : "", - email: isSet(object.email) ? String(object.email) : "", - }; + const message = { ...baseDockerCredentials } as DockerCredentials; + if (object.server !== undefined && object.server !== null) { + message.server = String(object.server); + } else { + message.server = ""; + } + if (object.username !== undefined && object.username !== null) { + message.username = String(object.username); + } else { + message.username = ""; + } + if (object.password !== undefined && object.password !== null) { + message.password = String(object.password); + } else { + message.password = ""; + } + if (object.email !== undefined && object.email !== null) { + message.email = String(object.email); + } else { + message.email = ""; + } + return message; }, toJSON(message: DockerCredentials): unknown { @@ -1061,22 +1358,39 @@ export const DockerCredentials = { return obj; }, - fromPartial, I>>(object: I): DockerCredentials { - const message = createBaseDockerCredentials(); - message.server = object.server ?? ""; - message.username = object.username ?? ""; - message.password = object.password ?? ""; - message.email = object.email ?? ""; + fromPartial(object: DeepPartial): DockerCredentials { + const message = { ...baseDockerCredentials } as DockerCredentials; + if (object.server !== undefined && object.server !== null) { + message.server = object.server; + } else { + message.server = ""; + } + if (object.username !== undefined && object.username !== null) { + message.username = object.username; + } else { + message.username = ""; + } + if (object.password !== undefined && object.password !== null) { + message.password = object.password; + } else { + message.password = ""; + } + if (object.email !== undefined && object.email !== null) { + message.email = object.email; + } else { + message.email = ""; + } return message; }, }; -function createBaseSecretKeyReference(): SecretKeyReference { - return { name: "", key: "" }; -} +const baseSecretKeyReference: object = { name: "", key: "" }; export const SecretKeyReference = { - encode(message: SecretKeyReference, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: SecretKeyReference, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -1089,7 +1403,7 @@ export const SecretKeyReference = { decode(input: _m0.Reader | Uint8Array, length?: number): SecretKeyReference { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSecretKeyReference(); + const message = { ...baseSecretKeyReference } as SecretKeyReference; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1108,10 +1422,18 @@ export const SecretKeyReference = { }, fromJSON(object: any): SecretKeyReference { - return { - name: isSet(object.name) ? String(object.name) : "", - key: isSet(object.key) ? String(object.key) : "", - }; + const message = { ...baseSecretKeyReference } as SecretKeyReference; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + return message; }, toJSON(message: SecretKeyReference): unknown { @@ -1121,38 +1443,55 @@ export const SecretKeyReference = { return obj; }, - fromPartial, I>>(object: I): SecretKeyReference { - const message = createBaseSecretKeyReference(); - message.name = object.name ?? ""; - message.key = object.key ?? ""; + fromPartial(object: DeepPartial): SecretKeyReference { + const message = { ...baseSecretKeyReference } as SecretKeyReference; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } return message; }, }; -function createBaseGetPackageRepositoryDetailRequest(): GetPackageRepositoryDetailRequest { - return { packageRepoRef: undefined }; -} +const baseGetPackageRepositoryDetailRequest: object = {}; export const GetPackageRepositoryDetailRequest = { encode( message: GetPackageRepositoryDetailRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.packageRepoRef !== undefined) { - PackageRepositoryReference.encode(message.packageRepoRef, writer.uint32(10).fork()).ldelim(); + PackageRepositoryReference.encode( + message.packageRepoRef, + writer.uint32(10).fork() + ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetPackageRepositoryDetailRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetPackageRepositoryDetailRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetPackageRepositoryDetailRequest(); + const message = { + ...baseGetPackageRepositoryDetailRequest, + } as GetPackageRepositoryDetailRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.packageRepoRef = PackageRepositoryReference.decode(reader, reader.uint32()); + message.packageRepoRef = PackageRepositoryReference.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1163,11 +1502,17 @@ export const GetPackageRepositoryDetailRequest = { }, fromJSON(object: any): GetPackageRepositoryDetailRequest { - return { - packageRepoRef: isSet(object.packageRepoRef) - ? PackageRepositoryReference.fromJSON(object.packageRepoRef) - : undefined, - }; + const message = { + ...baseGetPackageRepositoryDetailRequest, + } as GetPackageRepositoryDetailRequest; + if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { + message.packageRepoRef = PackageRepositoryReference.fromJSON( + object.packageRepoRef + ); + } else { + message.packageRepoRef = undefined; + } + return message; }, toJSON(message: GetPackageRepositoryDetailRequest): unknown { @@ -1179,26 +1524,29 @@ export const GetPackageRepositoryDetailRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetPackageRepositoryDetailRequest { - const message = createBaseGetPackageRepositoryDetailRequest(); - message.packageRepoRef = - object.packageRepoRef !== undefined && object.packageRepoRef !== null - ? PackageRepositoryReference.fromPartial(object.packageRepoRef) - : undefined; + const message = { + ...baseGetPackageRepositoryDetailRequest, + } as GetPackageRepositoryDetailRequest; + if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { + message.packageRepoRef = PackageRepositoryReference.fromPartial( + object.packageRepoRef + ); + } else { + message.packageRepoRef = undefined; + } return message; }, }; -function createBaseGetPackageRepositorySummariesRequest(): GetPackageRepositorySummariesRequest { - return { context: undefined }; -} +const baseGetPackageRepositorySummariesRequest: object = {}; export const GetPackageRepositorySummariesRequest = { encode( message: GetPackageRepositorySummariesRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); @@ -1206,10 +1554,15 @@ export const GetPackageRepositorySummariesRequest = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetPackageRepositorySummariesRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetPackageRepositorySummariesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetPackageRepositorySummariesRequest(); + const message = { + ...baseGetPackageRepositorySummariesRequest, + } as GetPackageRepositorySummariesRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1225,66 +1578,124 @@ export const GetPackageRepositorySummariesRequest = { }, fromJSON(object: any): GetPackageRepositorySummariesRequest { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - }; + const message = { + ...baseGetPackageRepositorySummariesRequest, + } as GetPackageRepositorySummariesRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + return message; }, toJSON(message: GetPackageRepositorySummariesRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetPackageRepositorySummariesRequest { - const message = createBaseGetPackageRepositorySummariesRequest(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; + const message = { + ...baseGetPackageRepositorySummariesRequest, + } as GetPackageRepositorySummariesRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } return message; }, }; -function createBasePackageRepositoryReference(): PackageRepositoryReference { - return { context: undefined, identifier: "", plugin: undefined }; -} +const baseUpdatePackageRepositoryRequest: object = { + url: "", + description: "", + type: "", + interval: 0, +}; -export const PackageRepositoryReference = { +export const UpdatePackageRepositoryRequest = { encode( - message: PackageRepositoryReference, - writer: _m0.Writer = _m0.Writer.create(), + message: UpdatePackageRepositoryRequest, + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { - if (message.context !== undefined) { - Context.encode(message.context, writer.uint32(10).fork()).ldelim(); + if (message.packageRepoRef !== undefined) { + PackageRepositoryReference.encode( + message.packageRepoRef, + writer.uint32(10).fork() + ).ldelim(); } - if (message.identifier !== "") { - writer.uint32(18).string(message.identifier); + if (message.url !== "") { + writer.uint32(18).string(message.url); } - if (message.plugin !== undefined) { - Plugin.encode(message.plugin, writer.uint32(26).fork()).ldelim(); + if (message.description !== "") { + writer.uint32(26).string(message.description); + } + if (message.type !== "") { + writer.uint32(34).string(message.type); + } + if (message.interval !== 0) { + writer.uint32(40).uint32(message.interval); + } + if (message.tlsConfig !== undefined) { + PackageRepositoryTlsConfig.encode( + message.tlsConfig, + writer.uint32(50).fork() + ).ldelim(); + } + if (message.auth !== undefined) { + PackageRepositoryAuth.encode( + message.auth, + writer.uint32(58).fork() + ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): PackageRepositoryReference { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): UpdatePackageRepositoryRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePackageRepositoryReference(); + const message = { + ...baseUpdatePackageRepositoryRequest, + } as UpdatePackageRepositoryRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.context = Context.decode(reader, reader.uint32()); + message.packageRepoRef = PackageRepositoryReference.decode( + reader, + reader.uint32() + ); break; case 2: - message.identifier = reader.string(); + message.url = reader.string(); break; case 3: - message.plugin = Plugin.decode(reader, reader.uint32()); + message.description = reader.string(); + break; + case 4: + message.type = reader.string(); + break; + case 5: + message.interval = reader.uint32(); + break; + case 6: + message.tlsConfig = PackageRepositoryTlsConfig.decode( + reader, + reader.uint32() + ); + break; + case 7: + message.auth = PackageRepositoryAuth.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1294,65 +1705,261 @@ export const PackageRepositoryReference = { return message; }, - fromJSON(object: any): PackageRepositoryReference { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - identifier: isSet(object.identifier) ? String(object.identifier) : "", - plugin: isSet(object.plugin) ? Plugin.fromJSON(object.plugin) : undefined, - }; - }, - - toJSON(message: PackageRepositoryReference): unknown { + fromJSON(object: any): UpdatePackageRepositoryRequest { + const message = { + ...baseUpdatePackageRepositoryRequest, + } as UpdatePackageRepositoryRequest; + if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { + message.packageRepoRef = PackageRepositoryReference.fromJSON( + object.packageRepoRef + ); + } else { + message.packageRepoRef = undefined; + } + if (object.url !== undefined && object.url !== null) { + message.url = String(object.url); + } else { + message.url = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if (object.type !== undefined && object.type !== null) { + message.type = String(object.type); + } else { + message.type = ""; + } + if (object.interval !== undefined && object.interval !== null) { + message.interval = Number(object.interval); + } else { + message.interval = 0; + } + if (object.tlsConfig !== undefined && object.tlsConfig !== null) { + message.tlsConfig = PackageRepositoryTlsConfig.fromJSON(object.tlsConfig); + } else { + message.tlsConfig = undefined; + } + if (object.auth !== undefined && object.auth !== null) { + message.auth = PackageRepositoryAuth.fromJSON(object.auth); + } else { + message.auth = undefined; + } + return message; + }, + + toJSON(message: UpdatePackageRepositoryRequest): unknown { + const obj: any = {}; + message.packageRepoRef !== undefined && + (obj.packageRepoRef = message.packageRepoRef + ? PackageRepositoryReference.toJSON(message.packageRepoRef) + : undefined); + message.url !== undefined && (obj.url = message.url); + message.description !== undefined && + (obj.description = message.description); + message.type !== undefined && (obj.type = message.type); + message.interval !== undefined && (obj.interval = message.interval); + message.tlsConfig !== undefined && + (obj.tlsConfig = message.tlsConfig + ? PackageRepositoryTlsConfig.toJSON(message.tlsConfig) + : undefined); + message.auth !== undefined && + (obj.auth = message.auth + ? PackageRepositoryAuth.toJSON(message.auth) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): UpdatePackageRepositoryRequest { + const message = { + ...baseUpdatePackageRepositoryRequest, + } as UpdatePackageRepositoryRequest; + if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { + message.packageRepoRef = PackageRepositoryReference.fromPartial( + object.packageRepoRef + ); + } else { + message.packageRepoRef = undefined; + } + if (object.url !== undefined && object.url !== null) { + message.url = object.url; + } else { + message.url = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if (object.type !== undefined && object.type !== null) { + message.type = object.type; + } else { + message.type = ""; + } + if (object.interval !== undefined && object.interval !== null) { + message.interval = object.interval; + } else { + message.interval = 0; + } + if (object.tlsConfig !== undefined && object.tlsConfig !== null) { + message.tlsConfig = PackageRepositoryTlsConfig.fromPartial( + object.tlsConfig + ); + } else { + message.tlsConfig = undefined; + } + if (object.auth !== undefined && object.auth !== null) { + message.auth = PackageRepositoryAuth.fromPartial(object.auth); + } else { + message.auth = undefined; + } + return message; + }, +}; + +const basePackageRepositoryReference: object = { identifier: "" }; + +export const PackageRepositoryReference = { + encode( + message: PackageRepositoryReference, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { + if (message.context !== undefined) { + Context.encode(message.context, writer.uint32(10).fork()).ldelim(); + } + if (message.identifier !== "") { + writer.uint32(18).string(message.identifier); + } + if (message.plugin !== undefined) { + Plugin.encode(message.plugin, writer.uint32(26).fork()).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): PackageRepositoryReference { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...basePackageRepositoryReference, + } as PackageRepositoryReference; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.context = Context.decode(reader, reader.uint32()); + break; + case 2: + message.identifier = reader.string(); + break; + case 3: + message.plugin = Plugin.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): PackageRepositoryReference { + const message = { + ...basePackageRepositoryReference, + } as PackageRepositoryReference; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + if (object.identifier !== undefined && object.identifier !== null) { + message.identifier = String(object.identifier); + } else { + message.identifier = ""; + } + if (object.plugin !== undefined && object.plugin !== null) { + message.plugin = Plugin.fromJSON(object.plugin); + } else { + message.plugin = undefined; + } + return message; + }, + + toJSON(message: PackageRepositoryReference): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); message.identifier !== undefined && (obj.identifier = message.identifier); message.plugin !== undefined && (obj.plugin = message.plugin ? Plugin.toJSON(message.plugin) : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): PackageRepositoryReference { - const message = createBasePackageRepositoryReference(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; - message.identifier = object.identifier ?? ""; - message.plugin = - object.plugin !== undefined && object.plugin !== null - ? Plugin.fromPartial(object.plugin) - : undefined; + const message = { + ...basePackageRepositoryReference, + } as PackageRepositoryReference; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } + if (object.identifier !== undefined && object.identifier !== null) { + message.identifier = object.identifier; + } else { + message.identifier = ""; + } + if (object.plugin !== undefined && object.plugin !== null) { + message.plugin = Plugin.fromPartial(object.plugin); + } else { + message.plugin = undefined; + } return message; }, }; -function createBaseAddPackageRepositoryResponse(): AddPackageRepositoryResponse { - return { packageRepoRef: undefined }; -} +const baseAddPackageRepositoryResponse: object = {}; export const AddPackageRepositoryResponse = { encode( message: AddPackageRepositoryResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.packageRepoRef !== undefined) { - PackageRepositoryReference.encode(message.packageRepoRef, writer.uint32(10).fork()).ldelim(); + PackageRepositoryReference.encode( + message.packageRepoRef, + writer.uint32(10).fork() + ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): AddPackageRepositoryResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): AddPackageRepositoryResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddPackageRepositoryResponse(); + const message = { + ...baseAddPackageRepositoryResponse, + } as AddPackageRepositoryResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.packageRepoRef = PackageRepositoryReference.decode(reader, reader.uint32()); + message.packageRepoRef = PackageRepositoryReference.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1363,11 +1970,17 @@ export const AddPackageRepositoryResponse = { }, fromJSON(object: any): AddPackageRepositoryResponse { - return { - packageRepoRef: isSet(object.packageRepoRef) - ? PackageRepositoryReference.fromJSON(object.packageRepoRef) - : undefined, - }; + const message = { + ...baseAddPackageRepositoryResponse, + } as AddPackageRepositoryResponse; + if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { + message.packageRepoRef = PackageRepositoryReference.fromJSON( + object.packageRepoRef + ); + } else { + message.packageRepoRef = undefined; + } + return message; }, toJSON(message: AddPackageRepositoryResponse): unknown { @@ -1379,24 +1992,34 @@ export const AddPackageRepositoryResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): AddPackageRepositoryResponse { - const message = createBaseAddPackageRepositoryResponse(); - message.packageRepoRef = - object.packageRepoRef !== undefined && object.packageRepoRef !== null - ? PackageRepositoryReference.fromPartial(object.packageRepoRef) - : undefined; + const message = { + ...baseAddPackageRepositoryResponse, + } as AddPackageRepositoryResponse; + if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { + message.packageRepoRef = PackageRepositoryReference.fromPartial( + object.packageRepoRef + ); + } else { + message.packageRepoRef = undefined; + } return message; }, }; -function createBasePackageRepositoryStatus(): PackageRepositoryStatus { - return { ready: false, reason: 0, userReason: "" }; -} +const basePackageRepositoryStatus: object = { + ready: false, + reason: 0, + userReason: "", +}; export const PackageRepositoryStatus = { - encode(message: PackageRepositoryStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: PackageRepositoryStatus, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.ready === true) { writer.uint32(8).bool(message.ready); } @@ -1409,10 +2032,15 @@ export const PackageRepositoryStatus = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): PackageRepositoryStatus { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): PackageRepositoryStatus { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePackageRepositoryStatus(); + const message = { + ...basePackageRepositoryStatus, + } as PackageRepositoryStatus; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1434,13 +2062,27 @@ export const PackageRepositoryStatus = { }, fromJSON(object: any): PackageRepositoryStatus { - return { - ready: isSet(object.ready) ? Boolean(object.ready) : false, - reason: isSet(object.reason) - ? packageRepositoryStatus_StatusReasonFromJSON(object.reason) - : 0, - userReason: isSet(object.userReason) ? String(object.userReason) : "", - }; + const message = { + ...basePackageRepositoryStatus, + } as PackageRepositoryStatus; + if (object.ready !== undefined && object.ready !== null) { + message.ready = Boolean(object.ready); + } else { + message.ready = false; + } + if (object.reason !== undefined && object.reason !== null) { + message.reason = packageRepositoryStatus_StatusReasonFromJSON( + object.reason + ); + } else { + message.reason = 0; + } + if (object.userReason !== undefined && object.userReason !== null) { + message.userReason = String(object.userReason); + } else { + message.userReason = ""; + } + return message; }, toJSON(message: PackageRepositoryStatus): unknown { @@ -1452,37 +2094,50 @@ export const PackageRepositoryStatus = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): PackageRepositoryStatus { - const message = createBasePackageRepositoryStatus(); - message.ready = object.ready ?? false; - message.reason = object.reason ?? 0; - message.userReason = object.userReason ?? ""; + const message = { + ...basePackageRepositoryStatus, + } as PackageRepositoryStatus; + if (object.ready !== undefined && object.ready !== null) { + message.ready = object.ready; + } else { + message.ready = false; + } + if (object.reason !== undefined && object.reason !== null) { + message.reason = object.reason; + } else { + message.reason = 0; + } + if (object.userReason !== undefined && object.userReason !== null) { + message.userReason = object.userReason; + } else { + message.userReason = ""; + } return message; }, }; -function createBasePackageRepositoryDetail(): PackageRepositoryDetail { - return { - packageRepoRef: undefined, - name: "", - description: "", - namespaceScoped: false, - type: "", - url: "", - interval: 0, - tlsConfig: undefined, - auth: undefined, - customDetail: undefined, - status: undefined, - }; -} +const basePackageRepositoryDetail: object = { + name: "", + description: "", + namespaceScoped: false, + type: "", + url: "", + interval: 0, +}; export const PackageRepositoryDetail = { - encode(message: PackageRepositoryDetail, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: PackageRepositoryDetail, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.packageRepoRef !== undefined) { - PackageRepositoryReference.encode(message.packageRepoRef, writer.uint32(10).fork()).ldelim(); + PackageRepositoryReference.encode( + message.packageRepoRef, + writer.uint32(10).fork() + ).ldelim(); } if (message.name !== "") { writer.uint32(18).string(message.name); @@ -1503,29 +2158,46 @@ export const PackageRepositoryDetail = { writer.uint32(56).uint32(message.interval); } if (message.tlsConfig !== undefined) { - PackageRepositoryTlsConfig.encode(message.tlsConfig, writer.uint32(66).fork()).ldelim(); + PackageRepositoryTlsConfig.encode( + message.tlsConfig, + writer.uint32(66).fork() + ).ldelim(); } if (message.auth !== undefined) { - PackageRepositoryAuth.encode(message.auth, writer.uint32(74).fork()).ldelim(); + PackageRepositoryAuth.encode( + message.auth, + writer.uint32(74).fork() + ).ldelim(); } if (message.customDetail !== undefined) { Any.encode(message.customDetail, writer.uint32(82).fork()).ldelim(); } if (message.status !== undefined) { - PackageRepositoryStatus.encode(message.status, writer.uint32(90).fork()).ldelim(); + PackageRepositoryStatus.encode( + message.status, + writer.uint32(90).fork() + ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): PackageRepositoryDetail { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): PackageRepositoryDetail { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePackageRepositoryDetail(); + const message = { + ...basePackageRepositoryDetail, + } as PackageRepositoryDetail; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.packageRepoRef = PackageRepositoryReference.decode(reader, reader.uint32()); + message.packageRepoRef = PackageRepositoryReference.decode( + reader, + reader.uint32() + ); break; case 2: message.name = reader.string(); @@ -1546,7 +2218,10 @@ export const PackageRepositoryDetail = { message.interval = reader.uint32(); break; case 8: - message.tlsConfig = PackageRepositoryTlsConfig.decode(reader, reader.uint32()); + message.tlsConfig = PackageRepositoryTlsConfig.decode( + reader, + reader.uint32() + ); break; case 9: message.auth = PackageRepositoryAuth.decode(reader, reader.uint32()); @@ -1555,7 +2230,10 @@ export const PackageRepositoryDetail = { message.customDetail = Any.decode(reader, reader.uint32()); break; case 11: - message.status = PackageRepositoryStatus.decode(reader, reader.uint32()); + message.status = PackageRepositoryStatus.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1566,23 +2244,70 @@ export const PackageRepositoryDetail = { }, fromJSON(object: any): PackageRepositoryDetail { - return { - packageRepoRef: isSet(object.packageRepoRef) - ? PackageRepositoryReference.fromJSON(object.packageRepoRef) - : undefined, - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : "", - namespaceScoped: isSet(object.namespaceScoped) ? Boolean(object.namespaceScoped) : false, - type: isSet(object.type) ? String(object.type) : "", - url: isSet(object.url) ? String(object.url) : "", - interval: isSet(object.interval) ? Number(object.interval) : 0, - tlsConfig: isSet(object.tlsConfig) - ? PackageRepositoryTlsConfig.fromJSON(object.tlsConfig) - : undefined, - auth: isSet(object.auth) ? PackageRepositoryAuth.fromJSON(object.auth) : undefined, - customDetail: isSet(object.customDetail) ? Any.fromJSON(object.customDetail) : undefined, - status: isSet(object.status) ? PackageRepositoryStatus.fromJSON(object.status) : undefined, - }; + const message = { + ...basePackageRepositoryDetail, + } as PackageRepositoryDetail; + if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { + message.packageRepoRef = PackageRepositoryReference.fromJSON( + object.packageRepoRef + ); + } else { + message.packageRepoRef = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if ( + object.namespaceScoped !== undefined && + object.namespaceScoped !== null + ) { + message.namespaceScoped = Boolean(object.namespaceScoped); + } else { + message.namespaceScoped = false; + } + if (object.type !== undefined && object.type !== null) { + message.type = String(object.type); + } else { + message.type = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = String(object.url); + } else { + message.url = ""; + } + if (object.interval !== undefined && object.interval !== null) { + message.interval = Number(object.interval); + } else { + message.interval = 0; + } + if (object.tlsConfig !== undefined && object.tlsConfig !== null) { + message.tlsConfig = PackageRepositoryTlsConfig.fromJSON(object.tlsConfig); + } else { + message.tlsConfig = undefined; + } + if (object.auth !== undefined && object.auth !== null) { + message.auth = PackageRepositoryAuth.fromJSON(object.auth); + } else { + message.auth = undefined; + } + if (object.customDetail !== undefined && object.customDetail !== null) { + message.customDetail = Any.fromJSON(object.customDetail); + } else { + message.customDetail = undefined; + } + if (object.status !== undefined && object.status !== null) { + message.status = PackageRepositoryStatus.fromJSON(object.status); + } else { + message.status = undefined; + } + return message; }, toJSON(message: PackageRepositoryDetail): unknown { @@ -1592,82 +2317,137 @@ export const PackageRepositoryDetail = { ? PackageRepositoryReference.toJSON(message.packageRepoRef) : undefined); message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.namespaceScoped !== undefined && (obj.namespaceScoped = message.namespaceScoped); + message.description !== undefined && + (obj.description = message.description); + message.namespaceScoped !== undefined && + (obj.namespaceScoped = message.namespaceScoped); message.type !== undefined && (obj.type = message.type); message.url !== undefined && (obj.url = message.url); - message.interval !== undefined && (obj.interval = Math.round(message.interval)); + message.interval !== undefined && (obj.interval = message.interval); message.tlsConfig !== undefined && (obj.tlsConfig = message.tlsConfig ? PackageRepositoryTlsConfig.toJSON(message.tlsConfig) : undefined); message.auth !== undefined && - (obj.auth = message.auth ? PackageRepositoryAuth.toJSON(message.auth) : undefined); + (obj.auth = message.auth + ? PackageRepositoryAuth.toJSON(message.auth) + : undefined); message.customDetail !== undefined && - (obj.customDetail = message.customDetail ? Any.toJSON(message.customDetail) : undefined); + (obj.customDetail = message.customDetail + ? Any.toJSON(message.customDetail) + : undefined); message.status !== undefined && - (obj.status = message.status ? PackageRepositoryStatus.toJSON(message.status) : undefined); + (obj.status = message.status + ? PackageRepositoryStatus.toJSON(message.status) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): PackageRepositoryDetail { - const message = createBasePackageRepositoryDetail(); - message.packageRepoRef = - object.packageRepoRef !== undefined && object.packageRepoRef !== null - ? PackageRepositoryReference.fromPartial(object.packageRepoRef) - : undefined; - message.name = object.name ?? ""; - message.description = object.description ?? ""; - message.namespaceScoped = object.namespaceScoped ?? false; - message.type = object.type ?? ""; - message.url = object.url ?? ""; - message.interval = object.interval ?? 0; - message.tlsConfig = - object.tlsConfig !== undefined && object.tlsConfig !== null - ? PackageRepositoryTlsConfig.fromPartial(object.tlsConfig) - : undefined; - message.auth = - object.auth !== undefined && object.auth !== null - ? PackageRepositoryAuth.fromPartial(object.auth) - : undefined; - message.customDetail = - object.customDetail !== undefined && object.customDetail !== null - ? Any.fromPartial(object.customDetail) - : undefined; - message.status = - object.status !== undefined && object.status !== null - ? PackageRepositoryStatus.fromPartial(object.status) - : undefined; + const message = { + ...basePackageRepositoryDetail, + } as PackageRepositoryDetail; + if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { + message.packageRepoRef = PackageRepositoryReference.fromPartial( + object.packageRepoRef + ); + } else { + message.packageRepoRef = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if ( + object.namespaceScoped !== undefined && + object.namespaceScoped !== null + ) { + message.namespaceScoped = object.namespaceScoped; + } else { + message.namespaceScoped = false; + } + if (object.type !== undefined && object.type !== null) { + message.type = object.type; + } else { + message.type = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = object.url; + } else { + message.url = ""; + } + if (object.interval !== undefined && object.interval !== null) { + message.interval = object.interval; + } else { + message.interval = 0; + } + if (object.tlsConfig !== undefined && object.tlsConfig !== null) { + message.tlsConfig = PackageRepositoryTlsConfig.fromPartial( + object.tlsConfig + ); + } else { + message.tlsConfig = undefined; + } + if (object.auth !== undefined && object.auth !== null) { + message.auth = PackageRepositoryAuth.fromPartial(object.auth); + } else { + message.auth = undefined; + } + if (object.customDetail !== undefined && object.customDetail !== null) { + message.customDetail = Any.fromPartial(object.customDetail); + } else { + message.customDetail = undefined; + } + if (object.status !== undefined && object.status !== null) { + message.status = PackageRepositoryStatus.fromPartial(object.status); + } else { + message.status = undefined; + } return message; }, }; -function createBaseGetPackageRepositoryDetailResponse(): GetPackageRepositoryDetailResponse { - return { detail: undefined }; -} +const baseGetPackageRepositoryDetailResponse: object = {}; export const GetPackageRepositoryDetailResponse = { encode( message: GetPackageRepositoryDetailResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.detail !== undefined) { - PackageRepositoryDetail.encode(message.detail, writer.uint32(10).fork()).ldelim(); + PackageRepositoryDetail.encode( + message.detail, + writer.uint32(10).fork() + ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetPackageRepositoryDetailResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetPackageRepositoryDetailResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetPackageRepositoryDetailResponse(); + const message = { + ...baseGetPackageRepositoryDetailResponse, + } as GetPackageRepositoryDetailResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.detail = PackageRepositoryDetail.decode(reader, reader.uint32()); + message.detail = PackageRepositoryDetail.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1678,46 +2458,59 @@ export const GetPackageRepositoryDetailResponse = { }, fromJSON(object: any): GetPackageRepositoryDetailResponse { - return { - detail: isSet(object.detail) ? PackageRepositoryDetail.fromJSON(object.detail) : undefined, - }; + const message = { + ...baseGetPackageRepositoryDetailResponse, + } as GetPackageRepositoryDetailResponse; + if (object.detail !== undefined && object.detail !== null) { + message.detail = PackageRepositoryDetail.fromJSON(object.detail); + } else { + message.detail = undefined; + } + return message; }, toJSON(message: GetPackageRepositoryDetailResponse): unknown { const obj: any = {}; message.detail !== undefined && - (obj.detail = message.detail ? PackageRepositoryDetail.toJSON(message.detail) : undefined); + (obj.detail = message.detail + ? PackageRepositoryDetail.toJSON(message.detail) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetPackageRepositoryDetailResponse { - const message = createBaseGetPackageRepositoryDetailResponse(); - message.detail = - object.detail !== undefined && object.detail !== null - ? PackageRepositoryDetail.fromPartial(object.detail) - : undefined; + const message = { + ...baseGetPackageRepositoryDetailResponse, + } as GetPackageRepositoryDetailResponse; + if (object.detail !== undefined && object.detail !== null) { + message.detail = PackageRepositoryDetail.fromPartial(object.detail); + } else { + message.detail = undefined; + } return message; }, }; -function createBasePackageRepositorySummary(): PackageRepositorySummary { - return { - packageRepoRef: undefined, - name: "", - description: "", - namespaceScoped: false, - type: "", - url: "", - status: undefined, - }; -} +const basePackageRepositorySummary: object = { + name: "", + description: "", + namespaceScoped: false, + type: "", + url: "", +}; export const PackageRepositorySummary = { - encode(message: PackageRepositorySummary, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: PackageRepositorySummary, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.packageRepoRef !== undefined) { - PackageRepositoryReference.encode(message.packageRepoRef, writer.uint32(10).fork()).ldelim(); + PackageRepositoryReference.encode( + message.packageRepoRef, + writer.uint32(10).fork() + ).ldelim(); } if (message.name !== "") { writer.uint32(18).string(message.name); @@ -1735,20 +2528,31 @@ export const PackageRepositorySummary = { writer.uint32(50).string(message.url); } if (message.status !== undefined) { - PackageRepositoryStatus.encode(message.status, writer.uint32(58).fork()).ldelim(); + PackageRepositoryStatus.encode( + message.status, + writer.uint32(58).fork() + ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): PackageRepositorySummary { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): PackageRepositorySummary { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePackageRepositorySummary(); + const message = { + ...basePackageRepositorySummary, + } as PackageRepositorySummary; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.packageRepoRef = PackageRepositoryReference.decode(reader, reader.uint32()); + message.packageRepoRef = PackageRepositoryReference.decode( + reader, + reader.uint32() + ); break; case 2: message.name = reader.string(); @@ -1766,7 +2570,10 @@ export const PackageRepositorySummary = { message.url = reader.string(); break; case 7: - message.status = PackageRepositoryStatus.decode(reader, reader.uint32()); + message.status = PackageRepositoryStatus.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -1777,17 +2584,50 @@ export const PackageRepositorySummary = { }, fromJSON(object: any): PackageRepositorySummary { - return { - packageRepoRef: isSet(object.packageRepoRef) - ? PackageRepositoryReference.fromJSON(object.packageRepoRef) - : undefined, - name: isSet(object.name) ? String(object.name) : "", - description: isSet(object.description) ? String(object.description) : "", - namespaceScoped: isSet(object.namespaceScoped) ? Boolean(object.namespaceScoped) : false, - type: isSet(object.type) ? String(object.type) : "", - url: isSet(object.url) ? String(object.url) : "", - status: isSet(object.status) ? PackageRepositoryStatus.fromJSON(object.status) : undefined, - }; + const message = { + ...basePackageRepositorySummary, + } as PackageRepositorySummary; + if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { + message.packageRepoRef = PackageRepositoryReference.fromJSON( + object.packageRepoRef + ); + } else { + message.packageRepoRef = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if ( + object.namespaceScoped !== undefined && + object.namespaceScoped !== null + ) { + message.namespaceScoped = Boolean(object.namespaceScoped); + } else { + message.namespaceScoped = false; + } + if (object.type !== undefined && object.type !== null) { + message.type = String(object.type); + } else { + message.type = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = String(object.url); + } else { + message.url = ""; + } + if (object.status !== undefined && object.status !== null) { + message.status = PackageRepositoryStatus.fromJSON(object.status); + } else { + message.status = undefined; + } + return message; }, toJSON(message: PackageRepositorySummary): unknown { @@ -1797,44 +2637,75 @@ export const PackageRepositorySummary = { ? PackageRepositoryReference.toJSON(message.packageRepoRef) : undefined); message.name !== undefined && (obj.name = message.name); - message.description !== undefined && (obj.description = message.description); - message.namespaceScoped !== undefined && (obj.namespaceScoped = message.namespaceScoped); + message.description !== undefined && + (obj.description = message.description); + message.namespaceScoped !== undefined && + (obj.namespaceScoped = message.namespaceScoped); message.type !== undefined && (obj.type = message.type); message.url !== undefined && (obj.url = message.url); message.status !== undefined && - (obj.status = message.status ? PackageRepositoryStatus.toJSON(message.status) : undefined); + (obj.status = message.status + ? PackageRepositoryStatus.toJSON(message.status) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): PackageRepositorySummary { - const message = createBasePackageRepositorySummary(); - message.packageRepoRef = - object.packageRepoRef !== undefined && object.packageRepoRef !== null - ? PackageRepositoryReference.fromPartial(object.packageRepoRef) - : undefined; - message.name = object.name ?? ""; - message.description = object.description ?? ""; - message.namespaceScoped = object.namespaceScoped ?? false; - message.type = object.type ?? ""; - message.url = object.url ?? ""; - message.status = - object.status !== undefined && object.status !== null - ? PackageRepositoryStatus.fromPartial(object.status) - : undefined; + const message = { + ...basePackageRepositorySummary, + } as PackageRepositorySummary; + if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { + message.packageRepoRef = PackageRepositoryReference.fromPartial( + object.packageRepoRef + ); + } else { + message.packageRepoRef = undefined; + } + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if ( + object.namespaceScoped !== undefined && + object.namespaceScoped !== null + ) { + message.namespaceScoped = object.namespaceScoped; + } else { + message.namespaceScoped = false; + } + if (object.type !== undefined && object.type !== null) { + message.type = object.type; + } else { + message.type = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = object.url; + } else { + message.url = ""; + } + if (object.status !== undefined && object.status !== null) { + message.status = PackageRepositoryStatus.fromPartial(object.status); + } else { + message.status = undefined; + } return message; }, }; -function createBaseGetPackageRepositorySummariesResponse(): GetPackageRepositorySummariesResponse { - return { packageRepositorySummaries: [] }; -} +const baseGetPackageRepositorySummariesResponse: object = {}; export const GetPackageRepositorySummariesResponse = { encode( message: GetPackageRepositorySummariesResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { for (const v of message.packageRepositorySummaries) { PackageRepositorySummary.encode(v!, writer.uint32(10).fork()).ldelim(); @@ -1842,16 +2713,22 @@ export const GetPackageRepositorySummariesResponse = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetPackageRepositorySummariesResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetPackageRepositorySummariesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetPackageRepositorySummariesResponse(); + const message = { + ...baseGetPackageRepositorySummariesResponse, + } as GetPackageRepositorySummariesResponse; + message.packageRepositorySummaries = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: message.packageRepositorySummaries.push( - PackageRepositorySummary.decode(reader, reader.uint32()), + PackageRepositorySummary.decode(reader, reader.uint32()) ); break; default: @@ -1863,18 +2740,28 @@ export const GetPackageRepositorySummariesResponse = { }, fromJSON(object: any): GetPackageRepositorySummariesResponse { - return { - packageRepositorySummaries: Array.isArray(object?.packageRepositorySummaries) - ? object.packageRepositorySummaries.map((e: any) => PackageRepositorySummary.fromJSON(e)) - : [], - }; + const message = { + ...baseGetPackageRepositorySummariesResponse, + } as GetPackageRepositorySummariesResponse; + message.packageRepositorySummaries = []; + if ( + object.packageRepositorySummaries !== undefined && + object.packageRepositorySummaries !== null + ) { + for (const e of object.packageRepositorySummaries) { + message.packageRepositorySummaries.push( + PackageRepositorySummary.fromJSON(e) + ); + } + } + return message; }, toJSON(message: GetPackageRepositorySummariesResponse): unknown { const obj: any = {}; if (message.packageRepositorySummaries) { - obj.packageRepositorySummaries = message.packageRepositorySummaries.map(e => - e ? PackageRepositorySummary.toJSON(e) : undefined, + obj.packageRepositorySummaries = message.packageRepositorySummaries.map( + (e) => (e ? PackageRepositorySummary.toJSON(e) : undefined) ); } else { obj.packageRepositorySummaries = []; @@ -1882,12 +2769,105 @@ export const GetPackageRepositorySummariesResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetPackageRepositorySummariesResponse { - const message = createBaseGetPackageRepositorySummariesResponse(); - message.packageRepositorySummaries = - object.packageRepositorySummaries?.map(e => PackageRepositorySummary.fromPartial(e)) || []; + const message = { + ...baseGetPackageRepositorySummariesResponse, + } as GetPackageRepositorySummariesResponse; + message.packageRepositorySummaries = []; + if ( + object.packageRepositorySummaries !== undefined && + object.packageRepositorySummaries !== null + ) { + for (const e of object.packageRepositorySummaries) { + message.packageRepositorySummaries.push( + PackageRepositorySummary.fromPartial(e) + ); + } + } + return message; + }, +}; + +const baseUpdatePackageRepositoryResponse: object = {}; + +export const UpdatePackageRepositoryResponse = { + encode( + message: UpdatePackageRepositoryResponse, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { + if (message.packageRepoRef !== undefined) { + PackageRepositoryReference.encode( + message.packageRepoRef, + writer.uint32(10).fork() + ).ldelim(); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): UpdatePackageRepositoryResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseUpdatePackageRepositoryResponse, + } as UpdatePackageRepositoryResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.packageRepoRef = PackageRepositoryReference.decode( + reader, + reader.uint32() + ); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): UpdatePackageRepositoryResponse { + const message = { + ...baseUpdatePackageRepositoryResponse, + } as UpdatePackageRepositoryResponse; + if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { + message.packageRepoRef = PackageRepositoryReference.fromJSON( + object.packageRepoRef + ); + } else { + message.packageRepoRef = undefined; + } + return message; + }, + + toJSON(message: UpdatePackageRepositoryResponse): unknown { + const obj: any = {}; + message.packageRepoRef !== undefined && + (obj.packageRepoRef = message.packageRepoRef + ? PackageRepositoryReference.toJSON(message.packageRepoRef) + : undefined); + return obj; + }, + + fromPartial( + object: DeepPartial + ): UpdatePackageRepositoryResponse { + const message = { + ...baseUpdatePackageRepositoryResponse, + } as UpdatePackageRepositoryResponse; + if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { + message.packageRepoRef = PackageRepositoryReference.fromPartial( + object.packageRepoRef + ); + } else { + message.packageRepoRef = undefined; + } return message; }, }; @@ -1896,16 +2876,20 @@ export const GetPackageRepositorySummariesResponse = { export interface RepositoriesService { AddPackageRepository( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; GetPackageRepositoryDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; GetPackageRepositorySummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; + UpdatePackageRepository( + request: DeepPartial, + metadata?: grpc.Metadata + ): Promise; } export class RepositoriesServiceClientImpl implements RepositoriesService { @@ -1914,40 +2898,54 @@ export class RepositoriesServiceClientImpl implements RepositoriesService { constructor(rpc: Rpc) { this.rpc = rpc; this.AddPackageRepository = this.AddPackageRepository.bind(this); - this.GetPackageRepositoryDetail = this.GetPackageRepositoryDetail.bind(this); - this.GetPackageRepositorySummaries = this.GetPackageRepositorySummaries.bind(this); + this.GetPackageRepositoryDetail = + this.GetPackageRepositoryDetail.bind(this); + this.GetPackageRepositorySummaries = + this.GetPackageRepositorySummaries.bind(this); + this.UpdatePackageRepository = this.UpdatePackageRepository.bind(this); } AddPackageRepository( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( RepositoriesServiceAddPackageRepositoryDesc, AddPackageRepositoryRequest.fromPartial(request), - metadata, + metadata ); } GetPackageRepositoryDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( RepositoriesServiceGetPackageRepositoryDetailDesc, GetPackageRepositoryDetailRequest.fromPartial(request), - metadata, + metadata ); } GetPackageRepositorySummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( RepositoriesServiceGetPackageRepositorySummariesDesc, GetPackageRepositorySummariesRequest.fromPartial(request), - metadata, + metadata + ); + } + + UpdatePackageRepository( + request: DeepPartial, + metadata?: grpc.Metadata + ): Promise { + return this.rpc.unary( + RepositoriesServiceUpdatePackageRepositoryDesc, + UpdatePackageRepositoryRequest.fromPartial(request), + metadata ); } } @@ -1956,73 +2954,100 @@ export const RepositoriesServiceDesc = { serviceName: "kubeappsapis.core.packages.v1alpha1.RepositoriesService", }; -export const RepositoriesServiceAddPackageRepositoryDesc: UnaryMethodDefinitionish = { - methodName: "AddPackageRepository", - service: RepositoriesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return AddPackageRepositoryRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...AddPackageRepositoryResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const RepositoriesServiceAddPackageRepositoryDesc: UnaryMethodDefinitionish = + { + methodName: "AddPackageRepository", + service: RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return AddPackageRepositoryRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...AddPackageRepositoryResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const RepositoriesServiceGetPackageRepositoryDetailDesc: UnaryMethodDefinitionish = { - methodName: "GetPackageRepositoryDetail", - service: RepositoriesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetPackageRepositoryDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetPackageRepositoryDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const RepositoriesServiceGetPackageRepositoryDetailDesc: UnaryMethodDefinitionish = + { + methodName: "GetPackageRepositoryDetail", + service: RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetPackageRepositoryDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetPackageRepositoryDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const RepositoriesServiceGetPackageRepositorySummariesDesc: UnaryMethodDefinitionish = { - methodName: "GetPackageRepositorySummaries", - service: RepositoriesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetPackageRepositorySummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetPackageRepositorySummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const RepositoriesServiceGetPackageRepositorySummariesDesc: UnaryMethodDefinitionish = + { + methodName: "GetPackageRepositorySummaries", + service: RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetPackageRepositorySummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetPackageRepositorySummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; + +export const RepositoriesServiceUpdatePackageRepositoryDesc: UnaryMethodDefinitionish = + { + methodName: "UpdatePackageRepository", + service: RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return UpdatePackageRepositoryRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...UpdatePackageRepositoryResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { +interface UnaryMethodDefinitionishR + extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -2033,7 +3058,7 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise; } @@ -2053,7 +3078,7 @@ export class GrpcWebImpl { debug?: boolean; metadata?: grpc.Metadata; - }, + } ) { this.host = host; this.options = options; @@ -2062,7 +3087,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -2094,8 +3119,14 @@ export class GrpcWebImpl { } } -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array @@ -2106,16 +3137,7 @@ export type DeepPartial = T extends Builtin ? { [K in keyof T]?: DeepPartial } : Partial; -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record>, never>; - if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; _m0.configure(); } - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/dashboard/src/gen/kubeappsapis/core/plugins/v1alpha1/plugins.ts b/dashboard/src/gen/kubeappsapis/core/plugins/v1alpha1/plugins.ts index c9f26031391..a7559e731c1 100644 --- a/dashboard/src/gen/kubeappsapis/core/plugins/v1alpha1/plugins.ts +++ b/dashboard/src/gen/kubeappsapis/core/plugins/v1alpha1/plugins.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import Long from "long"; import { grpc } from "@improbable-eng/grpc-web"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; import { BrowserHeaders } from "browser-headers"; export const protobufPackage = "kubeappsapis.core.plugins.v1alpha1"; @@ -47,19 +47,25 @@ export interface Plugin { version: string; } -function createBaseGetConfiguredPluginsRequest(): GetConfiguredPluginsRequest { - return {}; -} +const baseGetConfiguredPluginsRequest: object = {}; export const GetConfiguredPluginsRequest = { - encode(_: GetConfiguredPluginsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + _: GetConfiguredPluginsRequest, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetConfiguredPluginsRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetConfiguredPluginsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetConfiguredPluginsRequest(); + const message = { + ...baseGetConfiguredPluginsRequest, + } as GetConfiguredPluginsRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -72,7 +78,10 @@ export const GetConfiguredPluginsRequest = { }, fromJSON(_: any): GetConfiguredPluginsRequest { - return {}; + const message = { + ...baseGetConfiguredPluginsRequest, + } as GetConfiguredPluginsRequest; + return message; }, toJSON(_: GetConfiguredPluginsRequest): unknown { @@ -80,22 +89,22 @@ export const GetConfiguredPluginsRequest = { return obj; }, - fromPartial, I>>( - _: I, + fromPartial( + _: DeepPartial ): GetConfiguredPluginsRequest { - const message = createBaseGetConfiguredPluginsRequest(); + const message = { + ...baseGetConfiguredPluginsRequest, + } as GetConfiguredPluginsRequest; return message; }, }; -function createBaseGetConfiguredPluginsResponse(): GetConfiguredPluginsResponse { - return { plugins: [] }; -} +const baseGetConfiguredPluginsResponse: object = {}; export const GetConfiguredPluginsResponse = { encode( message: GetConfiguredPluginsResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { for (const v of message.plugins) { Plugin.encode(v!, writer.uint32(10).fork()).ldelim(); @@ -103,10 +112,16 @@ export const GetConfiguredPluginsResponse = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetConfiguredPluginsResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetConfiguredPluginsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetConfiguredPluginsResponse(); + const message = { + ...baseGetConfiguredPluginsResponse, + } as GetConfiguredPluginsResponse; + message.plugins = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -122,38 +137,53 @@ export const GetConfiguredPluginsResponse = { }, fromJSON(object: any): GetConfiguredPluginsResponse { - return { - plugins: Array.isArray(object?.plugins) - ? object.plugins.map((e: any) => Plugin.fromJSON(e)) - : [], - }; + const message = { + ...baseGetConfiguredPluginsResponse, + } as GetConfiguredPluginsResponse; + message.plugins = []; + if (object.plugins !== undefined && object.plugins !== null) { + for (const e of object.plugins) { + message.plugins.push(Plugin.fromJSON(e)); + } + } + return message; }, toJSON(message: GetConfiguredPluginsResponse): unknown { const obj: any = {}; if (message.plugins) { - obj.plugins = message.plugins.map(e => (e ? Plugin.toJSON(e) : undefined)); + obj.plugins = message.plugins.map((e) => + e ? Plugin.toJSON(e) : undefined + ); } else { obj.plugins = []; } return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetConfiguredPluginsResponse { - const message = createBaseGetConfiguredPluginsResponse(); - message.plugins = object.plugins?.map(e => Plugin.fromPartial(e)) || []; + const message = { + ...baseGetConfiguredPluginsResponse, + } as GetConfiguredPluginsResponse; + message.plugins = []; + if (object.plugins !== undefined && object.plugins !== null) { + for (const e of object.plugins) { + message.plugins.push(Plugin.fromPartial(e)); + } + } return message; }, }; -function createBasePlugin(): Plugin { - return { name: "", version: "" }; -} +const basePlugin: object = { name: "", version: "" }; export const Plugin = { - encode(message: Plugin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Plugin, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -166,7 +196,7 @@ export const Plugin = { decode(input: _m0.Reader | Uint8Array, length?: number): Plugin { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePlugin(); + const message = { ...basePlugin } as Plugin; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -185,10 +215,18 @@ export const Plugin = { }, fromJSON(object: any): Plugin { - return { - name: isSet(object.name) ? String(object.name) : "", - version: isSet(object.version) ? String(object.version) : "", - }; + const message = { ...basePlugin } as Plugin; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.version !== undefined && object.version !== null) { + message.version = String(object.version); + } else { + message.version = ""; + } + return message; }, toJSON(message: Plugin): unknown { @@ -198,10 +236,18 @@ export const Plugin = { return obj; }, - fromPartial, I>>(object: I): Plugin { - const message = createBasePlugin(); - message.name = object.name ?? ""; - message.version = object.version ?? ""; + fromPartial(object: DeepPartial): Plugin { + const message = { ...basePlugin } as Plugin; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.version !== undefined && object.version !== null) { + message.version = object.version; + } else { + message.version = ""; + } return message; }, }; @@ -210,7 +256,7 @@ export interface PluginsService { /** GetConfiguredPlugins returns a map of short and longnames for the configured plugins. */ GetConfiguredPlugins( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; } @@ -224,12 +270,12 @@ export class PluginsServiceClientImpl implements PluginsService { GetConfiguredPlugins( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( PluginsServiceGetConfiguredPluginsDesc, GetConfiguredPluginsRequest.fromPartial(request), - metadata, + metadata ); } } @@ -238,29 +284,31 @@ export const PluginsServiceDesc = { serviceName: "kubeappsapis.core.plugins.v1alpha1.PluginsService", }; -export const PluginsServiceGetConfiguredPluginsDesc: UnaryMethodDefinitionish = { - methodName: "GetConfiguredPlugins", - service: PluginsServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetConfiguredPluginsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetConfiguredPluginsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const PluginsServiceGetConfiguredPluginsDesc: UnaryMethodDefinitionish = + { + methodName: "GetConfiguredPlugins", + service: PluginsServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetConfiguredPluginsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetConfiguredPluginsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { +interface UnaryMethodDefinitionishR + extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -271,7 +319,7 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise; } @@ -291,7 +339,7 @@ export class GrpcWebImpl { debug?: boolean; metadata?: grpc.Metadata; - }, + } ) { this.host = host; this.options = options; @@ -300,7 +348,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -332,8 +380,14 @@ export class GrpcWebImpl { } } -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array @@ -344,16 +398,7 @@ export type DeepPartial = T extends Builtin ? { [K in keyof T]?: DeepPartial } : Partial; -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record>, never>; - if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; _m0.configure(); } - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/dashboard/src/gen/kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.ts b/dashboard/src/gen/kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.ts index e9df3e4c8bd..29a0ae9e9db 100644 --- a/dashboard/src/gen/kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.ts +++ b/dashboard/src/gen/kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import Long from "long"; import { grpc } from "@improbable-eng/grpc-web"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; import { GetAvailablePackageSummariesRequest, GetAvailablePackageDetailRequest, @@ -26,54 +26,202 @@ import { AddPackageRepositoryRequest, GetPackageRepositoryDetailRequest, GetPackageRepositorySummariesRequest, + UpdatePackageRepositoryRequest, AddPackageRepositoryResponse, GetPackageRepositoryDetailResponse, GetPackageRepositorySummariesResponse, + UpdatePackageRepositoryResponse, } from "../../../../../kubeappsapis/core/packages/v1alpha1/repositories"; import { BrowserHeaders } from "browser-headers"; export const protobufPackage = "kubeappsapis.plugins.fluxv2.packages.v1alpha1"; +export interface SetUserManagedSecretsRequest { + value: boolean; +} + +export interface SetUserManagedSecretsResponse { + value: boolean; +} + +const baseSetUserManagedSecretsRequest: object = { value: false }; + +export const SetUserManagedSecretsRequest = { + encode( + message: SetUserManagedSecretsRequest, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { + if (message.value === true) { + writer.uint32(8).bool(message.value); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): SetUserManagedSecretsRequest { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseSetUserManagedSecretsRequest, + } as SetUserManagedSecretsRequest; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): SetUserManagedSecretsRequest { + const message = { + ...baseSetUserManagedSecretsRequest, + } as SetUserManagedSecretsRequest; + if (object.value !== undefined && object.value !== null) { + message.value = Boolean(object.value); + } else { + message.value = false; + } + return message; + }, + + toJSON(message: SetUserManagedSecretsRequest): unknown { + const obj: any = {}; + message.value !== undefined && (obj.value = message.value); + return obj; + }, + + fromPartial( + object: DeepPartial + ): SetUserManagedSecretsRequest { + const message = { + ...baseSetUserManagedSecretsRequest, + } as SetUserManagedSecretsRequest; + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = false; + } + return message; + }, +}; + +const baseSetUserManagedSecretsResponse: object = { value: false }; + +export const SetUserManagedSecretsResponse = { + encode( + message: SetUserManagedSecretsResponse, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { + if (message.value === true) { + writer.uint32(8).bool(message.value); + } + return writer; + }, + + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): SetUserManagedSecretsResponse { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { + ...baseSetUserManagedSecretsResponse, + } as SetUserManagedSecretsResponse; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): SetUserManagedSecretsResponse { + const message = { + ...baseSetUserManagedSecretsResponse, + } as SetUserManagedSecretsResponse; + if (object.value !== undefined && object.value !== null) { + message.value = Boolean(object.value); + } else { + message.value = false; + } + return message; + }, + + toJSON(message: SetUserManagedSecretsResponse): unknown { + const obj: any = {}; + message.value !== undefined && (obj.value = message.value); + return obj; + }, + + fromPartial( + object: DeepPartial + ): SetUserManagedSecretsResponse { + const message = { + ...baseSetUserManagedSecretsResponse, + } as SetUserManagedSecretsResponse; + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = false; + } + return message; + }, +}; + export interface FluxV2PackagesService { /** GetAvailablePackageSummaries returns the available packages managed by the 'fluxv2' plugin */ GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** GetAvailablePackageDetail returns the package metadata managed by the 'fluxv2' plugin */ GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** GetAvailablePackageVersions returns the package versions managed by the 'fluxv2' plugin */ GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** GetInstalledPackageSummaries returns the installed packages managed by the 'fluxv2' plugin */ GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** GetInstalledPackageDetail returns the requested installed package managed by the 'fluxv2' plugin */ GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** CreateInstalledPackage creates an installed package based on the request. */ CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** UpdateInstalledPackage updates an installed package based on the request. */ UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** DeleteInstalledPackage deletes an installed package based on the request. */ DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** * GetInstalledPackageResourceRefs returns the references for the Kubernetes @@ -81,7 +229,7 @@ export interface FluxV2PackagesService { */ GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; } @@ -90,318 +238,332 @@ export class FluxV2PackagesServiceClientImpl implements FluxV2PackagesService { constructor(rpc: Rpc) { this.rpc = rpc; - this.GetAvailablePackageSummaries = this.GetAvailablePackageSummaries.bind(this); + this.GetAvailablePackageSummaries = + this.GetAvailablePackageSummaries.bind(this); this.GetAvailablePackageDetail = this.GetAvailablePackageDetail.bind(this); - this.GetAvailablePackageVersions = this.GetAvailablePackageVersions.bind(this); - this.GetInstalledPackageSummaries = this.GetInstalledPackageSummaries.bind(this); + this.GetAvailablePackageVersions = + this.GetAvailablePackageVersions.bind(this); + this.GetInstalledPackageSummaries = + this.GetInstalledPackageSummaries.bind(this); this.GetInstalledPackageDetail = this.GetInstalledPackageDetail.bind(this); this.CreateInstalledPackage = this.CreateInstalledPackage.bind(this); this.UpdateInstalledPackage = this.UpdateInstalledPackage.bind(this); this.DeleteInstalledPackage = this.DeleteInstalledPackage.bind(this); - this.GetInstalledPackageResourceRefs = this.GetInstalledPackageResourceRefs.bind(this); + this.GetInstalledPackageResourceRefs = + this.GetInstalledPackageResourceRefs.bind(this); } GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( FluxV2PackagesServiceGetAvailablePackageSummariesDesc, GetAvailablePackageSummariesRequest.fromPartial(request), - metadata, + metadata ); } GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( FluxV2PackagesServiceGetAvailablePackageDetailDesc, GetAvailablePackageDetailRequest.fromPartial(request), - metadata, + metadata ); } GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( FluxV2PackagesServiceGetAvailablePackageVersionsDesc, GetAvailablePackageVersionsRequest.fromPartial(request), - metadata, + metadata ); } GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( FluxV2PackagesServiceGetInstalledPackageSummariesDesc, GetInstalledPackageSummariesRequest.fromPartial(request), - metadata, + metadata ); } GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( FluxV2PackagesServiceGetInstalledPackageDetailDesc, GetInstalledPackageDetailRequest.fromPartial(request), - metadata, + metadata ); } CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( FluxV2PackagesServiceCreateInstalledPackageDesc, CreateInstalledPackageRequest.fromPartial(request), - metadata, + metadata ); } UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( FluxV2PackagesServiceUpdateInstalledPackageDesc, UpdateInstalledPackageRequest.fromPartial(request), - metadata, + metadata ); } DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( FluxV2PackagesServiceDeleteInstalledPackageDesc, DeleteInstalledPackageRequest.fromPartial(request), - metadata, + metadata ); } GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( FluxV2PackagesServiceGetInstalledPackageResourceRefsDesc, GetInstalledPackageResourceRefsRequest.fromPartial(request), - metadata, + metadata ); } } export const FluxV2PackagesServiceDesc = { - serviceName: "kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService", + serviceName: + "kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService", }; -export const FluxV2PackagesServiceGetAvailablePackageSummariesDesc: UnaryMethodDefinitionish = { - methodName: "GetAvailablePackageSummaries", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageSummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageSummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const FluxV2PackagesServiceGetAvailablePackageSummariesDesc: UnaryMethodDefinitionish = + { + methodName: "GetAvailablePackageSummaries", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageSummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageSummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const FluxV2PackagesServiceGetAvailablePackageDetailDesc: UnaryMethodDefinitionish = { - methodName: "GetAvailablePackageDetail", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const FluxV2PackagesServiceGetAvailablePackageDetailDesc: UnaryMethodDefinitionish = + { + methodName: "GetAvailablePackageDetail", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const FluxV2PackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = { - methodName: "GetAvailablePackageVersions", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageVersionsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageVersionsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const FluxV2PackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = + { + methodName: "GetAvailablePackageVersions", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageVersionsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageVersionsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const FluxV2PackagesServiceGetInstalledPackageSummariesDesc: UnaryMethodDefinitionish = { - methodName: "GetInstalledPackageSummaries", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageSummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageSummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const FluxV2PackagesServiceGetInstalledPackageSummariesDesc: UnaryMethodDefinitionish = + { + methodName: "GetInstalledPackageSummaries", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageSummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageSummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const FluxV2PackagesServiceGetInstalledPackageDetailDesc: UnaryMethodDefinitionish = { - methodName: "GetInstalledPackageDetail", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const FluxV2PackagesServiceGetInstalledPackageDetailDesc: UnaryMethodDefinitionish = + { + methodName: "GetInstalledPackageDetail", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const FluxV2PackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = { - methodName: "CreateInstalledPackage", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return CreateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...CreateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const FluxV2PackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = + { + methodName: "CreateInstalledPackage", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return CreateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...CreateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const FluxV2PackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = { - methodName: "UpdateInstalledPackage", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return UpdateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...UpdateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const FluxV2PackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = + { + methodName: "UpdateInstalledPackage", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return UpdateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...UpdateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const FluxV2PackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = { - methodName: "DeleteInstalledPackage", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return DeleteInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...DeleteInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const FluxV2PackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = + { + methodName: "DeleteInstalledPackage", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return DeleteInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...DeleteInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const FluxV2PackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = { - methodName: "GetInstalledPackageResourceRefs", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageResourceRefsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageResourceRefsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const FluxV2PackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = + { + methodName: "GetInstalledPackageResourceRefs", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageResourceRefsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageResourceRefsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; export interface FluxV2RepositoriesService { /** @@ -410,109 +572,149 @@ export interface FluxV2RepositoriesService { */ AddPackageRepository( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; GetPackageRepositoryDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; GetPackageRepositorySummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; + UpdatePackageRepository( + request: DeepPartial, + metadata?: grpc.Metadata + ): Promise; + /** this endpoint only exists for the purpose of integration tests */ + SetUserManagedSecrets( + request: DeepPartial, + metadata?: grpc.Metadata + ): Promise; } -export class FluxV2RepositoriesServiceClientImpl implements FluxV2RepositoriesService { +export class FluxV2RepositoriesServiceClientImpl + implements FluxV2RepositoriesService +{ private readonly rpc: Rpc; constructor(rpc: Rpc) { this.rpc = rpc; this.AddPackageRepository = this.AddPackageRepository.bind(this); - this.GetPackageRepositoryDetail = this.GetPackageRepositoryDetail.bind(this); - this.GetPackageRepositorySummaries = this.GetPackageRepositorySummaries.bind(this); + this.GetPackageRepositoryDetail = + this.GetPackageRepositoryDetail.bind(this); + this.GetPackageRepositorySummaries = + this.GetPackageRepositorySummaries.bind(this); + this.UpdatePackageRepository = this.UpdatePackageRepository.bind(this); + this.SetUserManagedSecrets = this.SetUserManagedSecrets.bind(this); } AddPackageRepository( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( FluxV2RepositoriesServiceAddPackageRepositoryDesc, AddPackageRepositoryRequest.fromPartial(request), - metadata, + metadata ); } GetPackageRepositoryDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( FluxV2RepositoriesServiceGetPackageRepositoryDetailDesc, GetPackageRepositoryDetailRequest.fromPartial(request), - metadata, + metadata ); } GetPackageRepositorySummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( FluxV2RepositoriesServiceGetPackageRepositorySummariesDesc, GetPackageRepositorySummariesRequest.fromPartial(request), - metadata, + metadata + ); + } + + UpdatePackageRepository( + request: DeepPartial, + metadata?: grpc.Metadata + ): Promise { + return this.rpc.unary( + FluxV2RepositoriesServiceUpdatePackageRepositoryDesc, + UpdatePackageRepositoryRequest.fromPartial(request), + metadata + ); + } + + SetUserManagedSecrets( + request: DeepPartial, + metadata?: grpc.Metadata + ): Promise { + return this.rpc.unary( + FluxV2RepositoriesServiceSetUserManagedSecretsDesc, + SetUserManagedSecretsRequest.fromPartial(request), + metadata ); } } export const FluxV2RepositoriesServiceDesc = { - serviceName: "kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService", + serviceName: + "kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService", }; -export const FluxV2RepositoriesServiceAddPackageRepositoryDesc: UnaryMethodDefinitionish = { - methodName: "AddPackageRepository", - service: FluxV2RepositoriesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return AddPackageRepositoryRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...AddPackageRepositoryResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const FluxV2RepositoriesServiceAddPackageRepositoryDesc: UnaryMethodDefinitionish = + { + methodName: "AddPackageRepository", + service: FluxV2RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return AddPackageRepositoryRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...AddPackageRepositoryResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const FluxV2RepositoriesServiceGetPackageRepositoryDetailDesc: UnaryMethodDefinitionish = { - methodName: "GetPackageRepositoryDetail", - service: FluxV2RepositoriesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetPackageRepositoryDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetPackageRepositoryDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const FluxV2RepositoriesServiceGetPackageRepositoryDetailDesc: UnaryMethodDefinitionish = + { + methodName: "GetPackageRepositoryDetail", + service: FluxV2RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetPackageRepositoryDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetPackageRepositoryDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; export const FluxV2RepositoriesServiceGetPackageRepositorySummariesDesc: UnaryMethodDefinitionish = { @@ -537,7 +739,54 @@ export const FluxV2RepositoriesServiceGetPackageRepositorySummariesDesc: UnaryMe } as any, }; -interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { +export const FluxV2RepositoriesServiceUpdatePackageRepositoryDesc: UnaryMethodDefinitionish = + { + methodName: "UpdatePackageRepository", + service: FluxV2RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return UpdatePackageRepositoryRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...UpdatePackageRepositoryResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; + +export const FluxV2RepositoriesServiceSetUserManagedSecretsDesc: UnaryMethodDefinitionish = + { + methodName: "SetUserManagedSecrets", + service: FluxV2RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return SetUserManagedSecretsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...SetUserManagedSecretsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; + +interface UnaryMethodDefinitionishR + extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -548,7 +797,7 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise; } @@ -568,7 +817,7 @@ export class GrpcWebImpl { debug?: boolean; metadata?: grpc.Metadata; - }, + } ) { this.host = host; this.options = options; @@ -577,7 +826,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -609,8 +858,14 @@ export class GrpcWebImpl { } } -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array diff --git a/dashboard/src/gen/kubeappsapis/plugins/helm/packages/v1alpha1/helm.ts b/dashboard/src/gen/kubeappsapis/plugins/helm/packages/v1alpha1/helm.ts index b6235757c21..ee34f397a54 100644 --- a/dashboard/src/gen/kubeappsapis/plugins/helm/packages/v1alpha1/helm.ts +++ b/dashboard/src/gen/kubeappsapis/plugins/helm/packages/v1alpha1/helm.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import Long from "long"; import { grpc } from "@improbable-eng/grpc-web"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; import { InstalledPackageReference, GetAvailablePackageSummariesRequest, @@ -72,14 +72,12 @@ export interface RollbackInstalledPackageResponse { installedPackageRef?: InstalledPackageReference; } -function createBaseInstalledPackageDetailCustomDataHelm(): InstalledPackageDetailCustomDataHelm { - return { releaseRevision: 0 }; -} +const baseInstalledPackageDetailCustomDataHelm: object = { releaseRevision: 0 }; export const InstalledPackageDetailCustomDataHelm = { encode( message: InstalledPackageDetailCustomDataHelm, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.releaseRevision !== 0) { writer.uint32(16).int32(message.releaseRevision); @@ -87,10 +85,15 @@ export const InstalledPackageDetailCustomDataHelm = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): InstalledPackageDetailCustomDataHelm { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): InstalledPackageDetailCustomDataHelm { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInstalledPackageDetailCustomDataHelm(); + const message = { + ...baseInstalledPackageDetailCustomDataHelm, + } as InstalledPackageDetailCustomDataHelm; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -106,40 +109,56 @@ export const InstalledPackageDetailCustomDataHelm = { }, fromJSON(object: any): InstalledPackageDetailCustomDataHelm { - return { - releaseRevision: isSet(object.releaseRevision) ? Number(object.releaseRevision) : 0, - }; + const message = { + ...baseInstalledPackageDetailCustomDataHelm, + } as InstalledPackageDetailCustomDataHelm; + if ( + object.releaseRevision !== undefined && + object.releaseRevision !== null + ) { + message.releaseRevision = Number(object.releaseRevision); + } else { + message.releaseRevision = 0; + } + return message; }, toJSON(message: InstalledPackageDetailCustomDataHelm): unknown { const obj: any = {}; message.releaseRevision !== undefined && - (obj.releaseRevision = Math.round(message.releaseRevision)); + (obj.releaseRevision = message.releaseRevision); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): InstalledPackageDetailCustomDataHelm { - const message = createBaseInstalledPackageDetailCustomDataHelm(); - message.releaseRevision = object.releaseRevision ?? 0; + const message = { + ...baseInstalledPackageDetailCustomDataHelm, + } as InstalledPackageDetailCustomDataHelm; + if ( + object.releaseRevision !== undefined && + object.releaseRevision !== null + ) { + message.releaseRevision = object.releaseRevision; + } else { + message.releaseRevision = 0; + } return message; }, }; -function createBaseRollbackInstalledPackageRequest(): RollbackInstalledPackageRequest { - return { installedPackageRef: undefined, releaseRevision: 0 }; -} +const baseRollbackInstalledPackageRequest: object = { releaseRevision: 0 }; export const RollbackInstalledPackageRequest = { encode( message: RollbackInstalledPackageRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } if (message.releaseRevision !== 0) { @@ -148,15 +167,23 @@ export const RollbackInstalledPackageRequest = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): RollbackInstalledPackageRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): RollbackInstalledPackageRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRollbackInstalledPackageRequest(); + const message = { + ...baseRollbackInstalledPackageRequest, + } as RollbackInstalledPackageRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); + message.installedPackageRef = InstalledPackageReference.decode( + reader, + reader.uint32() + ); break; case 2: message.releaseRevision = reader.int32(); @@ -170,12 +197,28 @@ export const RollbackInstalledPackageRequest = { }, fromJSON(object: any): RollbackInstalledPackageRequest { - return { - installedPackageRef: isSet(object.installedPackageRef) - ? InstalledPackageReference.fromJSON(object.installedPackageRef) - : undefined, - releaseRevision: isSet(object.releaseRevision) ? Number(object.releaseRevision) : 0, - }; + const message = { + ...baseRollbackInstalledPackageRequest, + } as RollbackInstalledPackageRequest; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromJSON( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + if ( + object.releaseRevision !== undefined && + object.releaseRevision !== null + ) { + message.releaseRevision = Number(object.releaseRevision); + } else { + message.releaseRevision = 0; + } + return message; }, toJSON(message: RollbackInstalledPackageRequest): unknown { @@ -185,50 +228,71 @@ export const RollbackInstalledPackageRequest = { ? InstalledPackageReference.toJSON(message.installedPackageRef) : undefined); message.releaseRevision !== undefined && - (obj.releaseRevision = Math.round(message.releaseRevision)); + (obj.releaseRevision = message.releaseRevision); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): RollbackInstalledPackageRequest { - const message = createBaseRollbackInstalledPackageRequest(); - message.installedPackageRef = - object.installedPackageRef !== undefined && object.installedPackageRef !== null - ? InstalledPackageReference.fromPartial(object.installedPackageRef) - : undefined; - message.releaseRevision = object.releaseRevision ?? 0; + const message = { + ...baseRollbackInstalledPackageRequest, + } as RollbackInstalledPackageRequest; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromPartial( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + if ( + object.releaseRevision !== undefined && + object.releaseRevision !== null + ) { + message.releaseRevision = object.releaseRevision; + } else { + message.releaseRevision = 0; + } return message; }, }; -function createBaseRollbackInstalledPackageResponse(): RollbackInstalledPackageResponse { - return { installedPackageRef: undefined }; -} +const baseRollbackInstalledPackageResponse: object = {}; export const RollbackInstalledPackageResponse = { encode( message: RollbackInstalledPackageResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): RollbackInstalledPackageResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): RollbackInstalledPackageResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseRollbackInstalledPackageResponse(); + const message = { + ...baseRollbackInstalledPackageResponse, + } as RollbackInstalledPackageResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); + message.installedPackageRef = InstalledPackageReference.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -239,11 +303,20 @@ export const RollbackInstalledPackageResponse = { }, fromJSON(object: any): RollbackInstalledPackageResponse { - return { - installedPackageRef: isSet(object.installedPackageRef) - ? InstalledPackageReference.fromJSON(object.installedPackageRef) - : undefined, - }; + const message = { + ...baseRollbackInstalledPackageResponse, + } as RollbackInstalledPackageResponse; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromJSON( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + return message; }, toJSON(message: RollbackInstalledPackageResponse): unknown { @@ -255,14 +328,22 @@ export const RollbackInstalledPackageResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): RollbackInstalledPackageResponse { - const message = createBaseRollbackInstalledPackageResponse(); - message.installedPackageRef = - object.installedPackageRef !== undefined && object.installedPackageRef !== null - ? InstalledPackageReference.fromPartial(object.installedPackageRef) - : undefined; + const message = { + ...baseRollbackInstalledPackageResponse, + } as RollbackInstalledPackageResponse; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromPartial( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } return message; }, }; @@ -271,47 +352,47 @@ export interface HelmPackagesService { /** GetAvailablePackageSummaries returns the available packages managed by the 'helm' plugin */ GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** GetAvailablePackageDetail returns the package details managed by the 'helm' plugin */ GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** GetAvailablePackageVersions returns the package versions managed by the 'helm' plugin */ GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** GetInstalledPackageSummaries returns the installed packages managed by the 'helm' plugin */ GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** GetInstalledPackageDetail returns the requested installed package managed by the 'helm' plugin */ GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** CreateInstalledPackage creates an installed package based on the request. */ CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** UpdateInstalledPackage updates an installed package based on the request. */ UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** DeleteInstalledPackage deletes an installed package based on the request. */ DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** RollbackInstalledPackage updates an installed package based on the request. */ RollbackInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** * GetInstalledPackageResourceRefs returns the references for the Kubernetes resources created by @@ -319,7 +400,7 @@ export interface HelmPackagesService { */ GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; } @@ -328,354 +409,370 @@ export class HelmPackagesServiceClientImpl implements HelmPackagesService { constructor(rpc: Rpc) { this.rpc = rpc; - this.GetAvailablePackageSummaries = this.GetAvailablePackageSummaries.bind(this); + this.GetAvailablePackageSummaries = + this.GetAvailablePackageSummaries.bind(this); this.GetAvailablePackageDetail = this.GetAvailablePackageDetail.bind(this); - this.GetAvailablePackageVersions = this.GetAvailablePackageVersions.bind(this); - this.GetInstalledPackageSummaries = this.GetInstalledPackageSummaries.bind(this); + this.GetAvailablePackageVersions = + this.GetAvailablePackageVersions.bind(this); + this.GetInstalledPackageSummaries = + this.GetInstalledPackageSummaries.bind(this); this.GetInstalledPackageDetail = this.GetInstalledPackageDetail.bind(this); this.CreateInstalledPackage = this.CreateInstalledPackage.bind(this); this.UpdateInstalledPackage = this.UpdateInstalledPackage.bind(this); this.DeleteInstalledPackage = this.DeleteInstalledPackage.bind(this); this.RollbackInstalledPackage = this.RollbackInstalledPackage.bind(this); - this.GetInstalledPackageResourceRefs = this.GetInstalledPackageResourceRefs.bind(this); + this.GetInstalledPackageResourceRefs = + this.GetInstalledPackageResourceRefs.bind(this); } GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( HelmPackagesServiceGetAvailablePackageSummariesDesc, GetAvailablePackageSummariesRequest.fromPartial(request), - metadata, + metadata ); } GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( HelmPackagesServiceGetAvailablePackageDetailDesc, GetAvailablePackageDetailRequest.fromPartial(request), - metadata, + metadata ); } GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( HelmPackagesServiceGetAvailablePackageVersionsDesc, GetAvailablePackageVersionsRequest.fromPartial(request), - metadata, + metadata ); } GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( HelmPackagesServiceGetInstalledPackageSummariesDesc, GetInstalledPackageSummariesRequest.fromPartial(request), - metadata, + metadata ); } GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( HelmPackagesServiceGetInstalledPackageDetailDesc, GetInstalledPackageDetailRequest.fromPartial(request), - metadata, + metadata ); } CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( HelmPackagesServiceCreateInstalledPackageDesc, CreateInstalledPackageRequest.fromPartial(request), - metadata, + metadata ); } UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( HelmPackagesServiceUpdateInstalledPackageDesc, UpdateInstalledPackageRequest.fromPartial(request), - metadata, + metadata ); } DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( HelmPackagesServiceDeleteInstalledPackageDesc, DeleteInstalledPackageRequest.fromPartial(request), - metadata, + metadata ); } RollbackInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( HelmPackagesServiceRollbackInstalledPackageDesc, RollbackInstalledPackageRequest.fromPartial(request), - metadata, + metadata ); } GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( HelmPackagesServiceGetInstalledPackageResourceRefsDesc, GetInstalledPackageResourceRefsRequest.fromPartial(request), - metadata, + metadata ); } } export const HelmPackagesServiceDesc = { - serviceName: "kubeappsapis.plugins.helm.packages.v1alpha1.HelmPackagesService", + serviceName: + "kubeappsapis.plugins.helm.packages.v1alpha1.HelmPackagesService", }; -export const HelmPackagesServiceGetAvailablePackageSummariesDesc: UnaryMethodDefinitionish = { - methodName: "GetAvailablePackageSummaries", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageSummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageSummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const HelmPackagesServiceGetAvailablePackageSummariesDesc: UnaryMethodDefinitionish = + { + methodName: "GetAvailablePackageSummaries", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageSummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageSummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const HelmPackagesServiceGetAvailablePackageDetailDesc: UnaryMethodDefinitionish = { - methodName: "GetAvailablePackageDetail", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const HelmPackagesServiceGetAvailablePackageDetailDesc: UnaryMethodDefinitionish = + { + methodName: "GetAvailablePackageDetail", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const HelmPackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = { - methodName: "GetAvailablePackageVersions", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageVersionsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageVersionsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const HelmPackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = + { + methodName: "GetAvailablePackageVersions", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageVersionsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageVersionsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const HelmPackagesServiceGetInstalledPackageSummariesDesc: UnaryMethodDefinitionish = { - methodName: "GetInstalledPackageSummaries", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageSummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageSummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const HelmPackagesServiceGetInstalledPackageSummariesDesc: UnaryMethodDefinitionish = + { + methodName: "GetInstalledPackageSummaries", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageSummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageSummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const HelmPackagesServiceGetInstalledPackageDetailDesc: UnaryMethodDefinitionish = { - methodName: "GetInstalledPackageDetail", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const HelmPackagesServiceGetInstalledPackageDetailDesc: UnaryMethodDefinitionish = + { + methodName: "GetInstalledPackageDetail", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const HelmPackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = { - methodName: "CreateInstalledPackage", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return CreateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...CreateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const HelmPackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = + { + methodName: "CreateInstalledPackage", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return CreateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...CreateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const HelmPackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = { - methodName: "UpdateInstalledPackage", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return UpdateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...UpdateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const HelmPackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = + { + methodName: "UpdateInstalledPackage", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return UpdateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...UpdateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const HelmPackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = { - methodName: "DeleteInstalledPackage", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return DeleteInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...DeleteInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const HelmPackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = + { + methodName: "DeleteInstalledPackage", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return DeleteInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...DeleteInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const HelmPackagesServiceRollbackInstalledPackageDesc: UnaryMethodDefinitionish = { - methodName: "RollbackInstalledPackage", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return RollbackInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...RollbackInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const HelmPackagesServiceRollbackInstalledPackageDesc: UnaryMethodDefinitionish = + { + methodName: "RollbackInstalledPackage", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return RollbackInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...RollbackInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const HelmPackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = { - methodName: "GetInstalledPackageResourceRefs", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageResourceRefsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageResourceRefsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const HelmPackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = + { + methodName: "GetInstalledPackageResourceRefs", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageResourceRefsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageResourceRefsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { +interface UnaryMethodDefinitionishR + extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -686,7 +783,7 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise; } @@ -706,7 +803,7 @@ export class GrpcWebImpl { debug?: boolean; metadata?: grpc.Metadata; - }, + } ) { this.host = host; this.options = options; @@ -715,7 +812,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -747,8 +844,14 @@ export class GrpcWebImpl { } } -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array @@ -759,16 +862,7 @@ export type DeepPartial = T extends Builtin ? { [K in keyof T]?: DeepPartial } : Partial; -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record>, never>; - if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; _m0.configure(); } - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/dashboard/src/gen/kubeappsapis/plugins/kapp_controller/packages/v1alpha1/kapp_controller.ts b/dashboard/src/gen/kubeappsapis/plugins/kapp_controller/packages/v1alpha1/kapp_controller.ts index 25e582f32d2..54012fe02e0 100644 --- a/dashboard/src/gen/kubeappsapis/plugins/kapp_controller/packages/v1alpha1/kapp_controller.ts +++ b/dashboard/src/gen/kubeappsapis/plugins/kapp_controller/packages/v1alpha1/kapp_controller.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import Long from "long"; import { grpc } from "@improbable-eng/grpc-web"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; import { Context, GetAvailablePackageSummariesRequest, @@ -26,7 +26,8 @@ import { import { Plugin } from "../../../../../kubeappsapis/core/plugins/v1alpha1/plugins"; import { BrowserHeaders } from "browser-headers"; -export const protobufPackage = "kubeappsapis.plugins.kapp_controller.packages.v1alpha1"; +export const protobufPackage = + "kubeappsapis.plugins.kapp_controller.packages.v1alpha1"; /** * GetPackageRepositories @@ -84,14 +85,12 @@ export interface PackageRepository { plugin?: Plugin; } -function createBaseGetPackageRepositoriesRequest(): GetPackageRepositoriesRequest { - return { context: undefined }; -} +const baseGetPackageRepositoriesRequest: object = {}; export const GetPackageRepositoriesRequest = { encode( message: GetPackageRepositoriesRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); @@ -99,10 +98,15 @@ export const GetPackageRepositoriesRequest = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetPackageRepositoriesRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetPackageRepositoriesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetPackageRepositoriesRequest(); + const message = { + ...baseGetPackageRepositoriesRequest, + } as GetPackageRepositoriesRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -118,38 +122,47 @@ export const GetPackageRepositoriesRequest = { }, fromJSON(object: any): GetPackageRepositoriesRequest { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - }; + const message = { + ...baseGetPackageRepositoriesRequest, + } as GetPackageRepositoriesRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + return message; }, toJSON(message: GetPackageRepositoriesRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetPackageRepositoriesRequest { - const message = createBaseGetPackageRepositoriesRequest(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; + const message = { + ...baseGetPackageRepositoriesRequest, + } as GetPackageRepositoriesRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } return message; }, }; -function createBaseGetPackageRepositoriesResponse(): GetPackageRepositoriesResponse { - return { repositories: [] }; -} +const baseGetPackageRepositoriesResponse: object = {}; export const GetPackageRepositoriesResponse = { encode( message: GetPackageRepositoriesResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { for (const v of message.repositories) { PackageRepository.encode(v!, writer.uint32(10).fork()).ldelim(); @@ -157,15 +170,23 @@ export const GetPackageRepositoriesResponse = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetPackageRepositoriesResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetPackageRepositoriesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetPackageRepositoriesResponse(); + const message = { + ...baseGetPackageRepositoriesResponse, + } as GetPackageRepositoriesResponse; + message.repositories = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.repositories.push(PackageRepository.decode(reader, reader.uint32())); + message.repositories.push( + PackageRepository.decode(reader, reader.uint32()) + ); break; default: reader.skipType(tag & 7); @@ -176,18 +197,23 @@ export const GetPackageRepositoriesResponse = { }, fromJSON(object: any): GetPackageRepositoriesResponse { - return { - repositories: Array.isArray(object?.repositories) - ? object.repositories.map((e: any) => PackageRepository.fromJSON(e)) - : [], - }; + const message = { + ...baseGetPackageRepositoriesResponse, + } as GetPackageRepositoriesResponse; + message.repositories = []; + if (object.repositories !== undefined && object.repositories !== null) { + for (const e of object.repositories) { + message.repositories.push(PackageRepository.fromJSON(e)); + } + } + return message; }, toJSON(message: GetPackageRepositoriesResponse): unknown { const obj: any = {}; if (message.repositories) { - obj.repositories = message.repositories.map(e => - e ? PackageRepository.toJSON(e) : undefined, + obj.repositories = message.repositories.map((e) => + e ? PackageRepository.toJSON(e) : undefined ); } else { obj.repositories = []; @@ -195,21 +221,29 @@ export const GetPackageRepositoriesResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetPackageRepositoriesResponse { - const message = createBaseGetPackageRepositoriesResponse(); - message.repositories = object.repositories?.map(e => PackageRepository.fromPartial(e)) || []; + const message = { + ...baseGetPackageRepositoriesResponse, + } as GetPackageRepositoriesResponse; + message.repositories = []; + if (object.repositories !== undefined && object.repositories !== null) { + for (const e of object.repositories) { + message.repositories.push(PackageRepository.fromPartial(e)); + } + } return message; }, }; -function createBasePackageRepository(): PackageRepository { - return { name: "", namespace: "", url: "", plugin: undefined }; -} +const basePackageRepository: object = { name: "", namespace: "", url: "" }; export const PackageRepository = { - encode(message: PackageRepository, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: PackageRepository, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -228,7 +262,7 @@ export const PackageRepository = { decode(input: _m0.Reader | Uint8Array, length?: number): PackageRepository { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBasePackageRepository(); + const message = { ...basePackageRepository } as PackageRepository; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -253,12 +287,28 @@ export const PackageRepository = { }, fromJSON(object: any): PackageRepository { - return { - name: isSet(object.name) ? String(object.name) : "", - namespace: isSet(object.namespace) ? String(object.namespace) : "", - url: isSet(object.url) ? String(object.url) : "", - plugin: isSet(object.plugin) ? Plugin.fromJSON(object.plugin) : undefined, - }; + const message = { ...basePackageRepository } as PackageRepository; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.namespace !== undefined && object.namespace !== null) { + message.namespace = String(object.namespace); + } else { + message.namespace = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = String(object.url); + } else { + message.url = ""; + } + if (object.plugin !== undefined && object.plugin !== null) { + message.plugin = Plugin.fromJSON(object.plugin); + } else { + message.plugin = undefined; + } + return message; }, toJSON(message: PackageRepository): unknown { @@ -271,15 +321,28 @@ export const PackageRepository = { return obj; }, - fromPartial, I>>(object: I): PackageRepository { - const message = createBasePackageRepository(); - message.name = object.name ?? ""; - message.namespace = object.namespace ?? ""; - message.url = object.url ?? ""; - message.plugin = - object.plugin !== undefined && object.plugin !== null - ? Plugin.fromPartial(object.plugin) - : undefined; + fromPartial(object: DeepPartial): PackageRepository { + const message = { ...basePackageRepository } as PackageRepository; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.namespace !== undefined && object.namespace !== null) { + message.namespace = object.namespace; + } else { + message.namespace = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = object.url; + } else { + message.url = ""; + } + if (object.plugin !== undefined && object.plugin !== null) { + message.plugin = Plugin.fromPartial(object.plugin); + } else { + message.plugin = undefined; + } return message; }, }; @@ -288,47 +351,47 @@ export interface KappControllerPackagesService { /** GetAvailablePackageSummaries returns the available packages managed by the 'kapp_controller' plugin */ GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** GetAvailablePackageDetail returns the package details managed by the 'kapp_controller' plugin */ GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** GetPackageRepositories returns the repositories managed by the 'kapp_controller' plugin */ GetPackageRepositories( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** GetAvailablePackageVersions returns the package versions managed by the 'kapp_controller' plugin */ GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** GetInstalledPackageSummaries returns the installed packages managed by the 'kapp_controller' plugin */ GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** GetInstalledPackageDetail returns the requested installed package managed by the 'kapp_controller' plugin */ GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** CreateInstalledPackage creates an installed package based on the request. */ CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** UpdateInstalledPackage updates an installed package based on the request. */ UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** DeleteInstalledPackage deletes an installed package based on the request. */ DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; /** * GetInstalledPackageResourceRefs returns the references for the Kubernetes resources created by @@ -336,134 +399,140 @@ export interface KappControllerPackagesService { */ GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; } -export class KappControllerPackagesServiceClientImpl implements KappControllerPackagesService { +export class KappControllerPackagesServiceClientImpl + implements KappControllerPackagesService +{ private readonly rpc: Rpc; constructor(rpc: Rpc) { this.rpc = rpc; - this.GetAvailablePackageSummaries = this.GetAvailablePackageSummaries.bind(this); + this.GetAvailablePackageSummaries = + this.GetAvailablePackageSummaries.bind(this); this.GetAvailablePackageDetail = this.GetAvailablePackageDetail.bind(this); this.GetPackageRepositories = this.GetPackageRepositories.bind(this); - this.GetAvailablePackageVersions = this.GetAvailablePackageVersions.bind(this); - this.GetInstalledPackageSummaries = this.GetInstalledPackageSummaries.bind(this); + this.GetAvailablePackageVersions = + this.GetAvailablePackageVersions.bind(this); + this.GetInstalledPackageSummaries = + this.GetInstalledPackageSummaries.bind(this); this.GetInstalledPackageDetail = this.GetInstalledPackageDetail.bind(this); this.CreateInstalledPackage = this.CreateInstalledPackage.bind(this); this.UpdateInstalledPackage = this.UpdateInstalledPackage.bind(this); this.DeleteInstalledPackage = this.DeleteInstalledPackage.bind(this); - this.GetInstalledPackageResourceRefs = this.GetInstalledPackageResourceRefs.bind(this); + this.GetInstalledPackageResourceRefs = + this.GetInstalledPackageResourceRefs.bind(this); } GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetAvailablePackageSummariesDesc, GetAvailablePackageSummariesRequest.fromPartial(request), - metadata, + metadata ); } GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetAvailablePackageDetailDesc, GetAvailablePackageDetailRequest.fromPartial(request), - metadata, + metadata ); } GetPackageRepositories( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetPackageRepositoriesDesc, GetPackageRepositoriesRequest.fromPartial(request), - metadata, + metadata ); } GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetAvailablePackageVersionsDesc, GetAvailablePackageVersionsRequest.fromPartial(request), - metadata, + metadata ); } GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetInstalledPackageSummariesDesc, GetInstalledPackageSummariesRequest.fromPartial(request), - metadata, + metadata ); } GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetInstalledPackageDetailDesc, GetInstalledPackageDetailRequest.fromPartial(request), - metadata, + metadata ); } CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( KappControllerPackagesServiceCreateInstalledPackageDesc, CreateInstalledPackageRequest.fromPartial(request), - metadata, + metadata ); } UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( KappControllerPackagesServiceUpdateInstalledPackageDesc, UpdateInstalledPackageRequest.fromPartial(request), - metadata, + metadata ); } DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( KappControllerPackagesServiceDeleteInstalledPackageDesc, DeleteInstalledPackageRequest.fromPartial(request), - metadata, + metadata ); } GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetInstalledPackageResourceRefsDesc, GetInstalledPackageResourceRefsRequest.fromPartial(request), - metadata, + metadata ); } } @@ -519,27 +588,28 @@ export const KappControllerPackagesServiceGetAvailablePackageDetailDesc: UnaryMe } as any, }; -export const KappControllerPackagesServiceGetPackageRepositoriesDesc: UnaryMethodDefinitionish = { - methodName: "GetPackageRepositories", - service: KappControllerPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetPackageRepositoriesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetPackageRepositoriesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const KappControllerPackagesServiceGetPackageRepositoriesDesc: UnaryMethodDefinitionish = + { + methodName: "GetPackageRepositories", + service: KappControllerPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetPackageRepositoriesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetPackageRepositoriesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; export const KappControllerPackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = { @@ -610,71 +680,74 @@ export const KappControllerPackagesServiceGetInstalledPackageDetailDesc: UnaryMe } as any, }; -export const KappControllerPackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = { - methodName: "CreateInstalledPackage", - service: KappControllerPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return CreateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...CreateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const KappControllerPackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = + { + methodName: "CreateInstalledPackage", + service: KappControllerPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return CreateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...CreateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const KappControllerPackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = { - methodName: "UpdateInstalledPackage", - service: KappControllerPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return UpdateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...UpdateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const KappControllerPackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = + { + methodName: "UpdateInstalledPackage", + service: KappControllerPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return UpdateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...UpdateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; -export const KappControllerPackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = { - methodName: "DeleteInstalledPackage", - service: KappControllerPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return DeleteInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...DeleteInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const KappControllerPackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = + { + methodName: "DeleteInstalledPackage", + service: KappControllerPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return DeleteInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...DeleteInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; export const KappControllerPackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = { @@ -699,7 +772,8 @@ export const KappControllerPackagesServiceGetInstalledPackageResourceRefsDesc: U } as any, }; -interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { +interface UnaryMethodDefinitionishR + extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -710,7 +784,7 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise; } @@ -730,7 +804,7 @@ export class GrpcWebImpl { debug?: boolean; metadata?: grpc.Metadata; - }, + } ) { this.host = host; this.options = options; @@ -739,7 +813,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -771,8 +845,14 @@ export class GrpcWebImpl { } } -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array @@ -783,16 +863,7 @@ export type DeepPartial = T extends Builtin ? { [K in keyof T]?: DeepPartial } : Partial; -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record>, never>; - if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; _m0.configure(); } - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/dashboard/src/gen/kubeappsapis/plugins/resources/v1alpha1/resources.ts b/dashboard/src/gen/kubeappsapis/plugins/resources/v1alpha1/resources.ts index 12360c293bb..a02f15711a1 100644 --- a/dashboard/src/gen/kubeappsapis/plugins/resources/v1alpha1/resources.ts +++ b/dashboard/src/gen/kubeappsapis/plugins/resources/v1alpha1/resources.ts @@ -1,7 +1,7 @@ /* eslint-disable */ import Long from "long"; import { grpc } from "@improbable-eng/grpc-web"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; import { InstalledPackageReference, ResourceRef, @@ -320,16 +320,17 @@ export interface GetSecretNamesResponse_SecretNamesEntry { value: SecretType; } -function createBaseGetResourcesRequest(): GetResourcesRequest { - return { installedPackageRef: undefined, resourceRefs: [], watch: false }; -} +const baseGetResourcesRequest: object = { watch: false }; export const GetResourcesRequest = { - encode(message: GetResourcesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: GetResourcesRequest, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); } for (const v of message.resourceRefs) { @@ -344,15 +345,21 @@ export const GetResourcesRequest = { decode(input: _m0.Reader | Uint8Array, length?: number): GetResourcesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetResourcesRequest(); + const message = { ...baseGetResourcesRequest } as GetResourcesRequest; + message.resourceRefs = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); + message.installedPackageRef = InstalledPackageReference.decode( + reader, + reader.uint32() + ); break; case 2: - message.resourceRefs.push(ResourceRef.decode(reader, reader.uint32())); + message.resourceRefs.push( + ResourceRef.decode(reader, reader.uint32()) + ); break; case 3: message.watch = reader.bool(); @@ -366,15 +373,29 @@ export const GetResourcesRequest = { }, fromJSON(object: any): GetResourcesRequest { - return { - installedPackageRef: isSet(object.installedPackageRef) - ? InstalledPackageReference.fromJSON(object.installedPackageRef) - : undefined, - resourceRefs: Array.isArray(object?.resourceRefs) - ? object.resourceRefs.map((e: any) => ResourceRef.fromJSON(e)) - : [], - watch: isSet(object.watch) ? Boolean(object.watch) : false, - }; + const message = { ...baseGetResourcesRequest } as GetResourcesRequest; + message.resourceRefs = []; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromJSON( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + if (object.resourceRefs !== undefined && object.resourceRefs !== null) { + for (const e of object.resourceRefs) { + message.resourceRefs.push(ResourceRef.fromJSON(e)); + } + } + if (object.watch !== undefined && object.watch !== null) { + message.watch = Boolean(object.watch); + } else { + message.watch = false; + } + return message; }, toJSON(message: GetResourcesRequest): unknown { @@ -384,7 +405,9 @@ export const GetResourcesRequest = { ? InstalledPackageReference.toJSON(message.installedPackageRef) : undefined); if (message.resourceRefs) { - obj.resourceRefs = message.resourceRefs.map(e => (e ? ResourceRef.toJSON(e) : undefined)); + obj.resourceRefs = message.resourceRefs.map((e) => + e ? ResourceRef.toJSON(e) : undefined + ); } else { obj.resourceRefs = []; } @@ -392,28 +415,45 @@ export const GetResourcesRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): GetResourcesRequest { - const message = createBaseGetResourcesRequest(); - message.installedPackageRef = - object.installedPackageRef !== undefined && object.installedPackageRef !== null - ? InstalledPackageReference.fromPartial(object.installedPackageRef) - : undefined; - message.resourceRefs = object.resourceRefs?.map(e => ResourceRef.fromPartial(e)) || []; - message.watch = object.watch ?? false; + fromPartial(object: DeepPartial): GetResourcesRequest { + const message = { ...baseGetResourcesRequest } as GetResourcesRequest; + message.resourceRefs = []; + if ( + object.installedPackageRef !== undefined && + object.installedPackageRef !== null + ) { + message.installedPackageRef = InstalledPackageReference.fromPartial( + object.installedPackageRef + ); + } else { + message.installedPackageRef = undefined; + } + if (object.resourceRefs !== undefined && object.resourceRefs !== null) { + for (const e of object.resourceRefs) { + message.resourceRefs.push(ResourceRef.fromPartial(e)); + } + } + if (object.watch !== undefined && object.watch !== null) { + message.watch = object.watch; + } else { + message.watch = false; + } return message; }, }; -function createBaseGetResourcesResponse(): GetResourcesResponse { - return { resourceRef: undefined, manifest: "" }; -} +const baseGetResourcesResponse: object = { manifest: "" }; export const GetResourcesResponse = { - encode(message: GetResourcesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: GetResourcesResponse, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.resourceRef !== undefined) { - ResourceRef.encode(message.resourceRef, writer.uint32(10).fork()).ldelim(); + ResourceRef.encode( + message.resourceRef, + writer.uint32(10).fork() + ).ldelim(); } if (message.manifest !== "") { writer.uint32(18).string(message.manifest); @@ -421,10 +461,13 @@ export const GetResourcesResponse = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetResourcesResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetResourcesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetResourcesResponse(); + const message = { ...baseGetResourcesResponse } as GetResourcesResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -443,41 +486,52 @@ export const GetResourcesResponse = { }, fromJSON(object: any): GetResourcesResponse { - return { - resourceRef: isSet(object.resourceRef) ? ResourceRef.fromJSON(object.resourceRef) : undefined, - manifest: isSet(object.manifest) ? String(object.manifest) : "", - }; + const message = { ...baseGetResourcesResponse } as GetResourcesResponse; + if (object.resourceRef !== undefined && object.resourceRef !== null) { + message.resourceRef = ResourceRef.fromJSON(object.resourceRef); + } else { + message.resourceRef = undefined; + } + if (object.manifest !== undefined && object.manifest !== null) { + message.manifest = String(object.manifest); + } else { + message.manifest = ""; + } + return message; }, toJSON(message: GetResourcesResponse): unknown { const obj: any = {}; message.resourceRef !== undefined && - (obj.resourceRef = message.resourceRef ? ResourceRef.toJSON(message.resourceRef) : undefined); + (obj.resourceRef = message.resourceRef + ? ResourceRef.toJSON(message.resourceRef) + : undefined); message.manifest !== undefined && (obj.manifest = message.manifest); return obj; }, - fromPartial, I>>( - object: I, - ): GetResourcesResponse { - const message = createBaseGetResourcesResponse(); - message.resourceRef = - object.resourceRef !== undefined && object.resourceRef !== null - ? ResourceRef.fromPartial(object.resourceRef) - : undefined; - message.manifest = object.manifest ?? ""; + fromPartial(object: DeepPartial): GetResourcesResponse { + const message = { ...baseGetResourcesResponse } as GetResourcesResponse; + if (object.resourceRef !== undefined && object.resourceRef !== null) { + message.resourceRef = ResourceRef.fromPartial(object.resourceRef); + } else { + message.resourceRef = undefined; + } + if (object.manifest !== undefined && object.manifest !== null) { + message.manifest = object.manifest; + } else { + message.manifest = ""; + } return message; }, }; -function createBaseGetServiceAccountNamesRequest(): GetServiceAccountNamesRequest { - return { context: undefined }; -} +const baseGetServiceAccountNamesRequest: object = {}; export const GetServiceAccountNamesRequest = { encode( message: GetServiceAccountNamesRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); @@ -485,10 +539,15 @@ export const GetServiceAccountNamesRequest = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetServiceAccountNamesRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetServiceAccountNamesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetServiceAccountNamesRequest(); + const message = { + ...baseGetServiceAccountNamesRequest, + } as GetServiceAccountNamesRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -504,38 +563,47 @@ export const GetServiceAccountNamesRequest = { }, fromJSON(object: any): GetServiceAccountNamesRequest { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - }; + const message = { + ...baseGetServiceAccountNamesRequest, + } as GetServiceAccountNamesRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + return message; }, toJSON(message: GetServiceAccountNamesRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetServiceAccountNamesRequest { - const message = createBaseGetServiceAccountNamesRequest(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; + const message = { + ...baseGetServiceAccountNamesRequest, + } as GetServiceAccountNamesRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } return message; }, }; -function createBaseGetServiceAccountNamesResponse(): GetServiceAccountNamesResponse { - return { serviceaccountNames: [] }; -} +const baseGetServiceAccountNamesResponse: object = { serviceaccountNames: "" }; export const GetServiceAccountNamesResponse = { encode( message: GetServiceAccountNamesResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { for (const v of message.serviceaccountNames) { writer.uint32(10).string(v!); @@ -543,10 +611,16 @@ export const GetServiceAccountNamesResponse = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetServiceAccountNamesResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetServiceAccountNamesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetServiceAccountNamesResponse(); + const message = { + ...baseGetServiceAccountNamesResponse, + } as GetServiceAccountNamesResponse; + message.serviceaccountNames = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -562,48 +636,72 @@ export const GetServiceAccountNamesResponse = { }, fromJSON(object: any): GetServiceAccountNamesResponse { - return { - serviceaccountNames: Array.isArray(object?.serviceaccountNames) - ? object.serviceaccountNames.map((e: any) => String(e)) - : [], - }; + const message = { + ...baseGetServiceAccountNamesResponse, + } as GetServiceAccountNamesResponse; + message.serviceaccountNames = []; + if ( + object.serviceaccountNames !== undefined && + object.serviceaccountNames !== null + ) { + for (const e of object.serviceaccountNames) { + message.serviceaccountNames.push(String(e)); + } + } + return message; }, toJSON(message: GetServiceAccountNamesResponse): unknown { const obj: any = {}; if (message.serviceaccountNames) { - obj.serviceaccountNames = message.serviceaccountNames.map(e => e); + obj.serviceaccountNames = message.serviceaccountNames.map((e) => e); } else { obj.serviceaccountNames = []; } return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetServiceAccountNamesResponse { - const message = createBaseGetServiceAccountNamesResponse(); - message.serviceaccountNames = object.serviceaccountNames?.map(e => e) || []; + const message = { + ...baseGetServiceAccountNamesResponse, + } as GetServiceAccountNamesResponse; + message.serviceaccountNames = []; + if ( + object.serviceaccountNames !== undefined && + object.serviceaccountNames !== null + ) { + for (const e of object.serviceaccountNames) { + message.serviceaccountNames.push(e); + } + } return message; }, }; -function createBaseGetNamespaceNamesRequest(): GetNamespaceNamesRequest { - return { cluster: "" }; -} +const baseGetNamespaceNamesRequest: object = { cluster: "" }; export const GetNamespaceNamesRequest = { - encode(message: GetNamespaceNamesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: GetNamespaceNamesRequest, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.cluster !== "") { writer.uint32(10).string(message.cluster); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetNamespaceNamesRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetNamespaceNamesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetNamespaceNamesRequest(); + const message = { + ...baseGetNamespaceNamesRequest, + } as GetNamespaceNamesRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -619,9 +717,15 @@ export const GetNamespaceNamesRequest = { }, fromJSON(object: any): GetNamespaceNamesRequest { - return { - cluster: isSet(object.cluster) ? String(object.cluster) : "", - }; + const message = { + ...baseGetNamespaceNamesRequest, + } as GetNamespaceNamesRequest; + if (object.cluster !== undefined && object.cluster !== null) { + message.cluster = String(object.cluster); + } else { + message.cluster = ""; + } + return message; }, toJSON(message: GetNamespaceNamesRequest): unknown { @@ -630,31 +734,44 @@ export const GetNamespaceNamesRequest = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetNamespaceNamesRequest { - const message = createBaseGetNamespaceNamesRequest(); - message.cluster = object.cluster ?? ""; + const message = { + ...baseGetNamespaceNamesRequest, + } as GetNamespaceNamesRequest; + if (object.cluster !== undefined && object.cluster !== null) { + message.cluster = object.cluster; + } else { + message.cluster = ""; + } return message; }, }; -function createBaseGetNamespaceNamesResponse(): GetNamespaceNamesResponse { - return { namespaceNames: [] }; -} +const baseGetNamespaceNamesResponse: object = { namespaceNames: "" }; export const GetNamespaceNamesResponse = { - encode(message: GetNamespaceNamesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: GetNamespaceNamesResponse, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { for (const v of message.namespaceNames) { writer.uint32(10).string(v!); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetNamespaceNamesResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetNamespaceNamesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetNamespaceNamesResponse(); + const message = { + ...baseGetNamespaceNamesResponse, + } as GetNamespaceNamesResponse; + message.namespaceNames = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -670,48 +787,64 @@ export const GetNamespaceNamesResponse = { }, fromJSON(object: any): GetNamespaceNamesResponse { - return { - namespaceNames: Array.isArray(object?.namespaceNames) - ? object.namespaceNames.map((e: any) => String(e)) - : [], - }; + const message = { + ...baseGetNamespaceNamesResponse, + } as GetNamespaceNamesResponse; + message.namespaceNames = []; + if (object.namespaceNames !== undefined && object.namespaceNames !== null) { + for (const e of object.namespaceNames) { + message.namespaceNames.push(String(e)); + } + } + return message; }, toJSON(message: GetNamespaceNamesResponse): unknown { const obj: any = {}; if (message.namespaceNames) { - obj.namespaceNames = message.namespaceNames.map(e => e); + obj.namespaceNames = message.namespaceNames.map((e) => e); } else { obj.namespaceNames = []; } return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetNamespaceNamesResponse { - const message = createBaseGetNamespaceNamesResponse(); - message.namespaceNames = object.namespaceNames?.map(e => e) || []; + const message = { + ...baseGetNamespaceNamesResponse, + } as GetNamespaceNamesResponse; + message.namespaceNames = []; + if (object.namespaceNames !== undefined && object.namespaceNames !== null) { + for (const e of object.namespaceNames) { + message.namespaceNames.push(e); + } + } return message; }, }; -function createBaseCreateNamespaceRequest(): CreateNamespaceRequest { - return { context: undefined }; -} +const baseCreateNamespaceRequest: object = {}; export const CreateNamespaceRequest = { - encode(message: CreateNamespaceRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: CreateNamespaceRequest, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateNamespaceRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): CreateNamespaceRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateNamespaceRequest(); + const message = { ...baseCreateNamespaceRequest } as CreateNamespaceRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -727,43 +860,56 @@ export const CreateNamespaceRequest = { }, fromJSON(object: any): CreateNamespaceRequest { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - }; + const message = { ...baseCreateNamespaceRequest } as CreateNamespaceRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + return message; }, toJSON(message: CreateNamespaceRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): CreateNamespaceRequest { - const message = createBaseCreateNamespaceRequest(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; + const message = { ...baseCreateNamespaceRequest } as CreateNamespaceRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } return message; }, }; -function createBaseCreateNamespaceResponse(): CreateNamespaceResponse { - return {}; -} +const baseCreateNamespaceResponse: object = {}; export const CreateNamespaceResponse = { - encode(_: CreateNamespaceResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + _: CreateNamespaceResponse, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateNamespaceResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): CreateNamespaceResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateNamespaceResponse(); + const message = { + ...baseCreateNamespaceResponse, + } as CreateNamespaceResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -776,7 +922,10 @@ export const CreateNamespaceResponse = { }, fromJSON(_: any): CreateNamespaceResponse { - return {}; + const message = { + ...baseCreateNamespaceResponse, + } as CreateNamespaceResponse; + return message; }, toJSON(_: CreateNamespaceResponse): unknown { @@ -784,22 +933,22 @@ export const CreateNamespaceResponse = { return obj; }, - fromPartial, I>>( - _: I, + fromPartial( + _: DeepPartial ): CreateNamespaceResponse { - const message = createBaseCreateNamespaceResponse(); + const message = { + ...baseCreateNamespaceResponse, + } as CreateNamespaceResponse; return message; }, }; -function createBaseCheckNamespaceExistsRequest(): CheckNamespaceExistsRequest { - return { context: undefined }; -} +const baseCheckNamespaceExistsRequest: object = {}; export const CheckNamespaceExistsRequest = { encode( message: CheckNamespaceExistsRequest, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); @@ -807,10 +956,15 @@ export const CheckNamespaceExistsRequest = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CheckNamespaceExistsRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): CheckNamespaceExistsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCheckNamespaceExistsRequest(); + const message = { + ...baseCheckNamespaceExistsRequest, + } as CheckNamespaceExistsRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -826,38 +980,47 @@ export const CheckNamespaceExistsRequest = { }, fromJSON(object: any): CheckNamespaceExistsRequest { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - }; + const message = { + ...baseCheckNamespaceExistsRequest, + } as CheckNamespaceExistsRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + return message; }, toJSON(message: CheckNamespaceExistsRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): CheckNamespaceExistsRequest { - const message = createBaseCheckNamespaceExistsRequest(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; + const message = { + ...baseCheckNamespaceExistsRequest, + } as CheckNamespaceExistsRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } return message; }, }; -function createBaseCheckNamespaceExistsResponse(): CheckNamespaceExistsResponse { - return { exists: false }; -} +const baseCheckNamespaceExistsResponse: object = { exists: false }; export const CheckNamespaceExistsResponse = { encode( message: CheckNamespaceExistsResponse, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.exists === true) { writer.uint32(8).bool(message.exists); @@ -865,10 +1028,15 @@ export const CheckNamespaceExistsResponse = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CheckNamespaceExistsResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): CheckNamespaceExistsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCheckNamespaceExistsResponse(); + const message = { + ...baseCheckNamespaceExistsResponse, + } as CheckNamespaceExistsResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -884,9 +1052,15 @@ export const CheckNamespaceExistsResponse = { }, fromJSON(object: any): CheckNamespaceExistsResponse { - return { - exists: isSet(object.exists) ? Boolean(object.exists) : false, - }; + const message = { + ...baseCheckNamespaceExistsResponse, + } as CheckNamespaceExistsResponse; + if (object.exists !== undefined && object.exists !== null) { + message.exists = Boolean(object.exists); + } else { + message.exists = false; + } + return message; }, toJSON(message: CheckNamespaceExistsResponse): unknown { @@ -895,21 +1069,28 @@ export const CheckNamespaceExistsResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): CheckNamespaceExistsResponse { - const message = createBaseCheckNamespaceExistsResponse(); - message.exists = object.exists ?? false; + const message = { + ...baseCheckNamespaceExistsResponse, + } as CheckNamespaceExistsResponse; + if (object.exists !== undefined && object.exists !== null) { + message.exists = object.exists; + } else { + message.exists = false; + } return message; }, }; -function createBaseCreateSecretRequest(): CreateSecretRequest { - return { context: undefined, type: 0, name: "", stringData: {} }; -} +const baseCreateSecretRequest: object = { type: 0, name: "" }; export const CreateSecretRequest = { - encode(message: CreateSecretRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: CreateSecretRequest, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } @@ -922,7 +1103,7 @@ export const CreateSecretRequest = { Object.entries(message.stringData).forEach(([key, value]) => { CreateSecretRequest_StringDataEntry.encode( { key: key as any, value }, - writer.uint32(34).fork(), + writer.uint32(34).fork() ).ldelim(); }); return writer; @@ -931,7 +1112,8 @@ export const CreateSecretRequest = { decode(input: _m0.Reader | Uint8Array, length?: number): CreateSecretRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateSecretRequest(); + const message = { ...baseCreateSecretRequest } as CreateSecretRequest; + message.stringData = {}; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -945,7 +1127,10 @@ export const CreateSecretRequest = { message.name = reader.string(); break; case 4: - const entry4 = CreateSecretRequest_StringDataEntry.decode(reader, reader.uint32()); + const entry4 = CreateSecretRequest_StringDataEntry.decode( + reader, + reader.uint32() + ); if (entry4.value !== undefined) { message.stringData[entry4.key] = entry4.value; } @@ -959,26 +1144,37 @@ export const CreateSecretRequest = { }, fromJSON(object: any): CreateSecretRequest { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - type: isSet(object.type) ? secretTypeFromJSON(object.type) : 0, - name: isSet(object.name) ? String(object.name) : "", - stringData: isObject(object.stringData) - ? Object.entries(object.stringData).reduce<{ [key: string]: string }>( - (acc, [key, value]) => { - acc[key] = String(value); - return acc; - }, - {}, - ) - : {}, - }; + const message = { ...baseCreateSecretRequest } as CreateSecretRequest; + message.stringData = {}; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + if (object.type !== undefined && object.type !== null) { + message.type = secretTypeFromJSON(object.type); + } else { + message.type = 0; + } + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.stringData !== undefined && object.stringData !== null) { + Object.entries(object.stringData).forEach(([key, value]) => { + message.stringData[key] = String(value); + }); + } + return message; }, toJSON(message: CreateSecretRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); message.type !== undefined && (obj.type = secretTypeToJSON(message.type)); message.name !== undefined && (obj.name = message.name); obj.stringData = {}; @@ -990,36 +1186,41 @@ export const CreateSecretRequest = { return obj; }, - fromPartial, I>>( - object: I, - ): CreateSecretRequest { - const message = createBaseCreateSecretRequest(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; - message.type = object.type ?? 0; - message.name = object.name ?? ""; - message.stringData = Object.entries(object.stringData ?? {}).reduce<{ - [key: string]: string; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = String(value); - } - return acc; - }, {}); + fromPartial(object: DeepPartial): CreateSecretRequest { + const message = { ...baseCreateSecretRequest } as CreateSecretRequest; + message.stringData = {}; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } + if (object.type !== undefined && object.type !== null) { + message.type = object.type; + } else { + message.type = 0; + } + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.stringData !== undefined && object.stringData !== null) { + Object.entries(object.stringData).forEach(([key, value]) => { + if (value !== undefined) { + message.stringData[key] = String(value); + } + }); + } return message; }, }; -function createBaseCreateSecretRequest_StringDataEntry(): CreateSecretRequest_StringDataEntry { - return { key: "", value: "" }; -} +const baseCreateSecretRequest_StringDataEntry: object = { key: "", value: "" }; export const CreateSecretRequest_StringDataEntry = { encode( message: CreateSecretRequest_StringDataEntry, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); @@ -1030,10 +1231,15 @@ export const CreateSecretRequest_StringDataEntry = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateSecretRequest_StringDataEntry { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): CreateSecretRequest_StringDataEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateSecretRequest_StringDataEntry(); + const message = { + ...baseCreateSecretRequest_StringDataEntry, + } as CreateSecretRequest_StringDataEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1052,10 +1258,20 @@ export const CreateSecretRequest_StringDataEntry = { }, fromJSON(object: any): CreateSecretRequest_StringDataEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? String(object.value) : "", - }; + const message = { + ...baseCreateSecretRequest_StringDataEntry, + } as CreateSecretRequest_StringDataEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = String(object.value); + } else { + message.value = ""; + } + return message; }, toJSON(message: CreateSecretRequest_StringDataEntry): unknown { @@ -1065,29 +1281,43 @@ export const CreateSecretRequest_StringDataEntry = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): CreateSecretRequest_StringDataEntry { - const message = createBaseCreateSecretRequest_StringDataEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? ""; + const message = { + ...baseCreateSecretRequest_StringDataEntry, + } as CreateSecretRequest_StringDataEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = ""; + } return message; }, }; -function createBaseCreateSecretResponse(): CreateSecretResponse { - return {}; -} +const baseCreateSecretResponse: object = {}; export const CreateSecretResponse = { - encode(_: CreateSecretResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + _: CreateSecretResponse, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): CreateSecretResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): CreateSecretResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateSecretResponse(); + const message = { ...baseCreateSecretResponse } as CreateSecretResponse; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1100,7 +1330,8 @@ export const CreateSecretResponse = { }, fromJSON(_: any): CreateSecretResponse { - return {}; + const message = { ...baseCreateSecretResponse } as CreateSecretResponse; + return message; }, toJSON(_: CreateSecretResponse): unknown { @@ -1108,28 +1339,32 @@ export const CreateSecretResponse = { return obj; }, - fromPartial, I>>(_: I): CreateSecretResponse { - const message = createBaseCreateSecretResponse(); + fromPartial(_: DeepPartial): CreateSecretResponse { + const message = { ...baseCreateSecretResponse } as CreateSecretResponse; return message; }, }; -function createBaseGetSecretNamesRequest(): GetSecretNamesRequest { - return { context: undefined }; -} +const baseGetSecretNamesRequest: object = {}; export const GetSecretNamesRequest = { - encode(message: GetSecretNamesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: GetSecretNamesRequest, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetSecretNamesRequest { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetSecretNamesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetSecretNamesRequest(); + const message = { ...baseGetSecretNamesRequest } as GetSecretNamesRequest; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1145,54 +1380,69 @@ export const GetSecretNamesRequest = { }, fromJSON(object: any): GetSecretNamesRequest { - return { - context: isSet(object.context) ? Context.fromJSON(object.context) : undefined, - }; + const message = { ...baseGetSecretNamesRequest } as GetSecretNamesRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromJSON(object.context); + } else { + message.context = undefined; + } + return message; }, toJSON(message: GetSecretNamesRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context ? Context.toJSON(message.context) : undefined); + (obj.context = message.context + ? Context.toJSON(message.context) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetSecretNamesRequest { - const message = createBaseGetSecretNamesRequest(); - message.context = - object.context !== undefined && object.context !== null - ? Context.fromPartial(object.context) - : undefined; + const message = { ...baseGetSecretNamesRequest } as GetSecretNamesRequest; + if (object.context !== undefined && object.context !== null) { + message.context = Context.fromPartial(object.context); + } else { + message.context = undefined; + } return message; }, }; -function createBaseGetSecretNamesResponse(): GetSecretNamesResponse { - return { secretNames: {} }; -} +const baseGetSecretNamesResponse: object = {}; export const GetSecretNamesResponse = { - encode(message: GetSecretNamesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: GetSecretNamesResponse, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { Object.entries(message.secretNames).forEach(([key, value]) => { GetSecretNamesResponse_SecretNamesEntry.encode( { key: key as any, value }, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); }); return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetSecretNamesResponse { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetSecretNamesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetSecretNamesResponse(); + const message = { ...baseGetSecretNamesResponse } as GetSecretNamesResponse; + message.secretNames = {}; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - const entry1 = GetSecretNamesResponse_SecretNamesEntry.decode(reader, reader.uint32()); + const entry1 = GetSecretNamesResponse_SecretNamesEntry.decode( + reader, + reader.uint32() + ); if (entry1.value !== undefined) { message.secretNames[entry1.key] = entry1.value; } @@ -1206,16 +1456,14 @@ export const GetSecretNamesResponse = { }, fromJSON(object: any): GetSecretNamesResponse { - return { - secretNames: isObject(object.secretNames) - ? Object.entries(object.secretNames).reduce<{ - [key: string]: SecretType; - }>((acc, [key, value]) => { - acc[key] = value as SecretType; - return acc; - }, {}) - : {}, - }; + const message = { ...baseGetSecretNamesResponse } as GetSecretNamesResponse; + message.secretNames = {}; + if (object.secretNames !== undefined && object.secretNames !== null) { + Object.entries(object.secretNames).forEach(([key, value]) => { + message.secretNames[key] = value as number; + }); + } + return message; }, toJSON(message: GetSecretNamesResponse): unknown { @@ -1229,30 +1477,31 @@ export const GetSecretNamesResponse = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetSecretNamesResponse { - const message = createBaseGetSecretNamesResponse(); - message.secretNames = Object.entries(object.secretNames ?? {}).reduce<{ - [key: string]: SecretType; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = value as SecretType; - } - return acc; - }, {}); + const message = { ...baseGetSecretNamesResponse } as GetSecretNamesResponse; + message.secretNames = {}; + if (object.secretNames !== undefined && object.secretNames !== null) { + Object.entries(object.secretNames).forEach(([key, value]) => { + if (value !== undefined) { + message.secretNames[key] = value as number; + } + }); + } return message; }, }; -function createBaseGetSecretNamesResponse_SecretNamesEntry(): GetSecretNamesResponse_SecretNamesEntry { - return { key: "", value: 0 }; -} +const baseGetSecretNamesResponse_SecretNamesEntry: object = { + key: "", + value: 0, +}; export const GetSecretNamesResponse_SecretNamesEntry = { encode( message: GetSecretNamesResponse_SecretNamesEntry, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); @@ -1263,10 +1512,15 @@ export const GetSecretNamesResponse_SecretNamesEntry = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): GetSecretNamesResponse_SecretNamesEntry { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): GetSecretNamesResponse_SecretNamesEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetSecretNamesResponse_SecretNamesEntry(); + const message = { + ...baseGetSecretNamesResponse_SecretNamesEntry, + } as GetSecretNamesResponse_SecretNamesEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1285,25 +1539,46 @@ export const GetSecretNamesResponse_SecretNamesEntry = { }, fromJSON(object: any): GetSecretNamesResponse_SecretNamesEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? secretTypeFromJSON(object.value) : 0, - }; + const message = { + ...baseGetSecretNamesResponse_SecretNamesEntry, + } as GetSecretNamesResponse_SecretNamesEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = secretTypeFromJSON(object.value); + } else { + message.value = 0; + } + return message; }, toJSON(message: GetSecretNamesResponse_SecretNamesEntry): unknown { const obj: any = {}; message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = secretTypeToJSON(message.value)); + message.value !== undefined && + (obj.value = secretTypeToJSON(message.value)); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): GetSecretNamesResponse_SecretNamesEntry { - const message = createBaseGetSecretNamesResponse_SecretNamesEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? 0; + const message = { + ...baseGetSecretNamesResponse_SecretNamesEntry, + } as GetSecretNamesResponse_SecretNamesEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = 0; + } return message; }, }; @@ -1317,31 +1592,31 @@ export const GetSecretNamesResponse_SecretNamesEntry = { export interface ResourcesService { GetResources( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Observable; GetServiceAccountNames( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; GetNamespaceNames( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; CreateNamespace( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; CheckNamespaceExists( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; GetSecretNames( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; CreateSecret( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise; } @@ -1361,78 +1636,78 @@ export class ResourcesServiceClientImpl implements ResourcesService { GetResources( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Observable { return this.rpc.invoke( ResourcesServiceGetResourcesDesc, GetResourcesRequest.fromPartial(request), - metadata, + metadata ); } GetServiceAccountNames( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( ResourcesServiceGetServiceAccountNamesDesc, GetServiceAccountNamesRequest.fromPartial(request), - metadata, + metadata ); } GetNamespaceNames( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( ResourcesServiceGetNamespaceNamesDesc, GetNamespaceNamesRequest.fromPartial(request), - metadata, + metadata ); } CreateNamespace( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( ResourcesServiceCreateNamespaceDesc, CreateNamespaceRequest.fromPartial(request), - metadata, + metadata ); } CheckNamespaceExists( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( ResourcesServiceCheckNamespaceExistsDesc, CheckNamespaceExistsRequest.fromPartial(request), - metadata, + metadata ); } GetSecretNames( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( ResourcesServiceGetSecretNamesDesc, GetSecretNamesRequest.fromPartial(request), - metadata, + metadata ); } CreateSecret( request: DeepPartial, - metadata?: grpc.Metadata, + metadata?: grpc.Metadata ): Promise { return this.rpc.unary( ResourcesServiceCreateSecretDesc, CreateSecretRequest.fromPartial(request), - metadata, + metadata ); } } @@ -1463,27 +1738,28 @@ export const ResourcesServiceGetResourcesDesc: UnaryMethodDefinitionish = { } as any, }; -export const ResourcesServiceGetServiceAccountNamesDesc: UnaryMethodDefinitionish = { - methodName: "GetServiceAccountNames", - service: ResourcesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetServiceAccountNamesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetServiceAccountNamesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const ResourcesServiceGetServiceAccountNamesDesc: UnaryMethodDefinitionish = + { + methodName: "GetServiceAccountNames", + service: ResourcesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetServiceAccountNamesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetServiceAccountNamesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; export const ResourcesServiceGetNamespaceNamesDesc: UnaryMethodDefinitionish = { methodName: "GetNamespaceNames", @@ -1529,27 +1805,28 @@ export const ResourcesServiceCreateNamespaceDesc: UnaryMethodDefinitionish = { } as any, }; -export const ResourcesServiceCheckNamespaceExistsDesc: UnaryMethodDefinitionish = { - methodName: "CheckNamespaceExists", - service: ResourcesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return CheckNamespaceExistsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...CheckNamespaceExistsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, -}; +export const ResourcesServiceCheckNamespaceExistsDesc: UnaryMethodDefinitionish = + { + methodName: "CheckNamespaceExists", + service: ResourcesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return CheckNamespaceExistsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...CheckNamespaceExistsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, + }; export const ResourcesServiceGetSecretNamesDesc: UnaryMethodDefinitionish = { methodName: "GetSecretNames", @@ -1595,7 +1872,8 @@ export const ResourcesServiceCreateSecretDesc: UnaryMethodDefinitionish = { } as any, }; -interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { +interface UnaryMethodDefinitionishR + extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -1606,12 +1884,12 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise; invoke( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Observable; } @@ -1631,7 +1909,7 @@ export class GrpcWebImpl { streamingTransport?: grpc.TransportFactory; debug?: boolean; metadata?: grpc.Metadata; - }, + } ) { this.host = host; this.options = options; @@ -1640,7 +1918,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -1674,7 +1952,7 @@ export class GrpcWebImpl { invoke( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined, + metadata: grpc.Metadata | undefined ): Observable { // Status Response Codes (https://developers.google.com/maps-booking/reference/grpc-api/status_codes) const upStreamCodes = [2, 4, 8, 9, 10, 13, 14, 15]; @@ -1687,7 +1965,7 @@ export class GrpcWebImpl { ...metadata?.headersMap, }) : metadata || this.options.metadata; - return new Observable(observer => { + return new Observable((observer) => { const upStream = () => { const client = grpc.invoke(methodDesc, { host: this.host, @@ -1695,7 +1973,7 @@ export class GrpcWebImpl { transport: this.options.streamingTransport || this.options.transport, metadata: maybeCombinedMetadata, debug: this.options.debug, - onMessage: next => observer.next(next), + onMessage: (next) => observer.next(next), onEnd: (code: grpc.Code, message: string) => { if (code === 0) { observer.complete(); @@ -1713,8 +1991,14 @@ export class GrpcWebImpl { } } -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array @@ -1725,20 +2009,7 @@ export type DeepPartial = T extends Builtin ? { [K in keyof T]?: DeepPartial } : Partial; -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record>, never>; - if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; _m0.configure(); } - -function isObject(value: any): boolean { - return typeof value === "object" && value !== null; -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/dashboard/src/gen/protoc-gen-openapiv2/options/annotations.ts b/dashboard/src/gen/protoc-gen-openapiv2/options/annotations.ts index ca1dc9c999d..dbe99cbc4e8 100644 --- a/dashboard/src/gen/protoc-gen-openapiv2/options/annotations.ts +++ b/dashboard/src/gen/protoc-gen-openapiv2/options/annotations.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import Long from "long"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; export const protobufPackage = "grpc.gateway.protoc_gen_openapiv2.options"; diff --git a/dashboard/src/gen/protoc-gen-openapiv2/options/openapiv2.ts b/dashboard/src/gen/protoc-gen-openapiv2/options/openapiv2.ts index 37152a098a0..160df0aa9b1 100644 --- a/dashboard/src/gen/protoc-gen-openapiv2/options/openapiv2.ts +++ b/dashboard/src/gen/protoc-gen-openapiv2/options/openapiv2.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import Long from "long"; -import * as _m0 from "protobufjs/minimal"; +import _m0 from "protobufjs/minimal"; import { Value } from "../../google/protobuf/struct"; export const protobufPackage = "grpc.gateway.protoc_gen_openapiv2.options"; @@ -151,7 +151,7 @@ export interface Swagger { security: SecurityRequirement[]; /** Additional external documentation. */ externalDocs?: ExternalDocumentation; - extensions: { [key: string]: any }; + extensions: { [key: string]: Value }; } export interface Swagger_ResponsesEntry { @@ -161,7 +161,7 @@ export interface Swagger_ResponsesEntry { export interface Swagger_ExtensionsEntry { key: string; - value?: any; + value?: Value; } /** @@ -252,7 +252,7 @@ export interface Operation { * security declaration, an empty array can be used. */ security: SecurityRequirement[]; - extensions: { [key: string]: any }; + extensions: { [key: string]: Value }; } export interface Operation_ResponsesEntry { @@ -262,7 +262,7 @@ export interface Operation_ResponsesEntry { export interface Operation_ExtensionsEntry { key: string; - value?: any; + value?: Value; } /** @@ -314,7 +314,7 @@ export interface Response { * See: https://github.com/OAI/OpenAPI-Specification/blob/3.0.0/versions/2.0.md#example-object */ examples: { [key: string]: string }; - extensions: { [key: string]: any }; + extensions: { [key: string]: Value }; } export interface Response_HeadersEntry { @@ -329,7 +329,7 @@ export interface Response_ExamplesEntry { export interface Response_ExtensionsEntry { key: string; - value?: any; + value?: Value; } /** @@ -376,12 +376,12 @@ export interface Info { * with the specification version). */ version: string; - extensions: { [key: string]: any }; + extensions: { [key: string]: Value }; } export interface Info_ExtensionsEntry { key: string; - value?: any; + value?: Value; } /** @@ -604,7 +604,7 @@ export enum JSONSchema_JSONSchemaSimpleTypes { } export function jSONSchema_JSONSchemaSimpleTypesFromJSON( - object: any, + object: any ): JSONSchema_JSONSchemaSimpleTypes { switch (object) { case 0: @@ -639,7 +639,7 @@ export function jSONSchema_JSONSchemaSimpleTypesFromJSON( } export function jSONSchema_JSONSchemaSimpleTypesToJSON( - object: JSONSchema_JSONSchemaSimpleTypes, + object: JSONSchema_JSONSchemaSimpleTypes ): string { switch (object) { case JSONSchema_JSONSchemaSimpleTypes.UNKNOWN: @@ -768,7 +768,7 @@ export interface SecurityScheme { * Valid for oauth2. */ scopes?: Scopes; - extensions: { [key: string]: any }; + extensions: { [key: string]: Value }; } /** @@ -914,7 +914,7 @@ export function securityScheme_FlowToJSON(object: SecurityScheme_Flow): string { export interface SecurityScheme_ExtensionsEntry { key: string; - value?: any; + value?: Value; } /** @@ -976,25 +976,20 @@ export interface Scopes_ScopeEntry { value: string; } -function createBaseSwagger(): Swagger { - return { - swagger: "", - info: undefined, - host: "", - basePath: "", - schemes: [], - consumes: [], - produces: [], - responses: {}, - securityDefinitions: undefined, - security: [], - externalDocs: undefined, - extensions: {}, - }; -} +const baseSwagger: object = { + swagger: "", + host: "", + basePath: "", + schemes: 0, + consumes: "", + produces: "", +}; export const Swagger = { - encode(message: Swagger, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Swagger, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.swagger !== "") { writer.uint32(10).string(message.swagger); } @@ -1019,24 +1014,31 @@ export const Swagger = { writer.uint32(58).string(v!); } Object.entries(message.responses).forEach(([key, value]) => { - Swagger_ResponsesEntry.encode({ key: key as any, value }, writer.uint32(82).fork()).ldelim(); + Swagger_ResponsesEntry.encode( + { key: key as any, value }, + writer.uint32(82).fork() + ).ldelim(); }); if (message.securityDefinitions !== undefined) { - SecurityDefinitions.encode(message.securityDefinitions, writer.uint32(90).fork()).ldelim(); + SecurityDefinitions.encode( + message.securityDefinitions, + writer.uint32(90).fork() + ).ldelim(); } for (const v of message.security) { SecurityRequirement.encode(v!, writer.uint32(98).fork()).ldelim(); } if (message.externalDocs !== undefined) { - ExternalDocumentation.encode(message.externalDocs, writer.uint32(114).fork()).ldelim(); + ExternalDocumentation.encode( + message.externalDocs, + writer.uint32(114).fork() + ).ldelim(); } Object.entries(message.extensions).forEach(([key, value]) => { - if (value !== undefined) { - Swagger_ExtensionsEntry.encode( - { key: key as any, value }, - writer.uint32(122).fork(), - ).ldelim(); - } + Swagger_ExtensionsEntry.encode( + { key: key as any, value }, + writer.uint32(122).fork() + ).ldelim(); }); return writer; }, @@ -1044,7 +1046,13 @@ export const Swagger = { decode(input: _m0.Reader | Uint8Array, length?: number): Swagger { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSwagger(); + const message = { ...baseSwagger } as Swagger; + message.schemes = []; + message.consumes = []; + message.produces = []; + message.responses = {}; + message.security = []; + message.extensions = {}; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1077,22 +1085,36 @@ export const Swagger = { message.produces.push(reader.string()); break; case 10: - const entry10 = Swagger_ResponsesEntry.decode(reader, reader.uint32()); + const entry10 = Swagger_ResponsesEntry.decode( + reader, + reader.uint32() + ); if (entry10.value !== undefined) { message.responses[entry10.key] = entry10.value; } break; case 11: - message.securityDefinitions = SecurityDefinitions.decode(reader, reader.uint32()); + message.securityDefinitions = SecurityDefinitions.decode( + reader, + reader.uint32() + ); break; case 12: - message.security.push(SecurityRequirement.decode(reader, reader.uint32())); + message.security.push( + SecurityRequirement.decode(reader, reader.uint32()) + ); break; case 14: - message.externalDocs = ExternalDocumentation.decode(reader, reader.uint32()); + message.externalDocs = ExternalDocumentation.decode( + reader, + reader.uint32() + ); break; case 15: - const entry15 = Swagger_ExtensionsEntry.decode(reader, reader.uint32()); + const entry15 = Swagger_ExtensionsEntry.decode( + reader, + reader.uint32() + ); if (entry15.value !== undefined) { message.extensions[entry15.key] = entry15.value; } @@ -1106,61 +1128,102 @@ export const Swagger = { }, fromJSON(object: any): Swagger { - return { - swagger: isSet(object.swagger) ? String(object.swagger) : "", - info: isSet(object.info) ? Info.fromJSON(object.info) : undefined, - host: isSet(object.host) ? String(object.host) : "", - basePath: isSet(object.basePath) ? String(object.basePath) : "", - schemes: Array.isArray(object?.schemes) - ? object.schemes.map((e: any) => schemeFromJSON(e)) - : [], - consumes: Array.isArray(object?.consumes) ? object.consumes.map((e: any) => String(e)) : [], - produces: Array.isArray(object?.produces) ? object.produces.map((e: any) => String(e)) : [], - responses: isObject(object.responses) - ? Object.entries(object.responses).reduce<{ [key: string]: Response }>( - (acc, [key, value]) => { - acc[key] = Response.fromJSON(value); - return acc; - }, - {}, - ) - : {}, - securityDefinitions: isSet(object.securityDefinitions) - ? SecurityDefinitions.fromJSON(object.securityDefinitions) - : undefined, - security: Array.isArray(object?.security) - ? object.security.map((e: any) => SecurityRequirement.fromJSON(e)) - : [], - externalDocs: isSet(object.externalDocs) - ? ExternalDocumentation.fromJSON(object.externalDocs) - : undefined, - extensions: isObject(object.extensions) - ? Object.entries(object.extensions).reduce<{ [key: string]: any }>((acc, [key, value]) => { - acc[key] = value as any; - return acc; - }, {}) - : {}, - }; + const message = { ...baseSwagger } as Swagger; + message.schemes = []; + message.consumes = []; + message.produces = []; + message.responses = {}; + message.security = []; + message.extensions = {}; + if (object.swagger !== undefined && object.swagger !== null) { + message.swagger = String(object.swagger); + } else { + message.swagger = ""; + } + if (object.info !== undefined && object.info !== null) { + message.info = Info.fromJSON(object.info); + } else { + message.info = undefined; + } + if (object.host !== undefined && object.host !== null) { + message.host = String(object.host); + } else { + message.host = ""; + } + if (object.basePath !== undefined && object.basePath !== null) { + message.basePath = String(object.basePath); + } else { + message.basePath = ""; + } + if (object.schemes !== undefined && object.schemes !== null) { + for (const e of object.schemes) { + message.schemes.push(schemeFromJSON(e)); + } + } + if (object.consumes !== undefined && object.consumes !== null) { + for (const e of object.consumes) { + message.consumes.push(String(e)); + } + } + if (object.produces !== undefined && object.produces !== null) { + for (const e of object.produces) { + message.produces.push(String(e)); + } + } + if (object.responses !== undefined && object.responses !== null) { + Object.entries(object.responses).forEach(([key, value]) => { + message.responses[key] = Response.fromJSON(value); + }); + } + if ( + object.securityDefinitions !== undefined && + object.securityDefinitions !== null + ) { + message.securityDefinitions = SecurityDefinitions.fromJSON( + object.securityDefinitions + ); + } else { + message.securityDefinitions = undefined; + } + if (object.security !== undefined && object.security !== null) { + for (const e of object.security) { + message.security.push(SecurityRequirement.fromJSON(e)); + } + } + if (object.externalDocs !== undefined && object.externalDocs !== null) { + message.externalDocs = ExternalDocumentation.fromJSON( + object.externalDocs + ); + } else { + message.externalDocs = undefined; + } + if (object.extensions !== undefined && object.extensions !== null) { + Object.entries(object.extensions).forEach(([key, value]) => { + message.extensions[key] = Value.fromJSON(value); + }); + } + return message; }, toJSON(message: Swagger): unknown { const obj: any = {}; message.swagger !== undefined && (obj.swagger = message.swagger); - message.info !== undefined && (obj.info = message.info ? Info.toJSON(message.info) : undefined); + message.info !== undefined && + (obj.info = message.info ? Info.toJSON(message.info) : undefined); message.host !== undefined && (obj.host = message.host); message.basePath !== undefined && (obj.basePath = message.basePath); if (message.schemes) { - obj.schemes = message.schemes.map(e => schemeToJSON(e)); + obj.schemes = message.schemes.map((e) => schemeToJSON(e)); } else { obj.schemes = []; } if (message.consumes) { - obj.consumes = message.consumes.map(e => e); + obj.consumes = message.consumes.map((e) => e); } else { obj.consumes = []; } if (message.produces) { - obj.produces = message.produces.map(e => e); + obj.produces = message.produces.map((e) => e); } else { obj.produces = []; } @@ -1175,7 +1238,9 @@ export const Swagger = { ? SecurityDefinitions.toJSON(message.securityDefinitions) : undefined); if (message.security) { - obj.security = message.security.map(e => (e ? SecurityRequirement.toJSON(e) : undefined)); + obj.security = message.security.map((e) => + e ? SecurityRequirement.toJSON(e) : undefined + ); } else { obj.security = []; } @@ -1186,57 +1251,102 @@ export const Swagger = { obj.extensions = {}; if (message.extensions) { Object.entries(message.extensions).forEach(([k, v]) => { - obj.extensions[k] = v; + obj.extensions[k] = Value.toJSON(v); }); } return obj; }, - fromPartial, I>>(object: I): Swagger { - const message = createBaseSwagger(); - message.swagger = object.swagger ?? ""; - message.info = - object.info !== undefined && object.info !== null ? Info.fromPartial(object.info) : undefined; - message.host = object.host ?? ""; - message.basePath = object.basePath ?? ""; - message.schemes = object.schemes?.map(e => e) || []; - message.consumes = object.consumes?.map(e => e) || []; - message.produces = object.produces?.map(e => e) || []; - message.responses = Object.entries(object.responses ?? {}).reduce<{ - [key: string]: Response; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = Response.fromPartial(value); + fromPartial(object: DeepPartial): Swagger { + const message = { ...baseSwagger } as Swagger; + message.schemes = []; + message.consumes = []; + message.produces = []; + message.responses = {}; + message.security = []; + message.extensions = {}; + if (object.swagger !== undefined && object.swagger !== null) { + message.swagger = object.swagger; + } else { + message.swagger = ""; + } + if (object.info !== undefined && object.info !== null) { + message.info = Info.fromPartial(object.info); + } else { + message.info = undefined; + } + if (object.host !== undefined && object.host !== null) { + message.host = object.host; + } else { + message.host = ""; + } + if (object.basePath !== undefined && object.basePath !== null) { + message.basePath = object.basePath; + } else { + message.basePath = ""; + } + if (object.schemes !== undefined && object.schemes !== null) { + for (const e of object.schemes) { + message.schemes.push(e); + } + } + if (object.consumes !== undefined && object.consumes !== null) { + for (const e of object.consumes) { + message.consumes.push(e); + } + } + if (object.produces !== undefined && object.produces !== null) { + for (const e of object.produces) { + message.produces.push(e); } - return acc; - }, {}); - message.securityDefinitions = - object.securityDefinitions !== undefined && object.securityDefinitions !== null - ? SecurityDefinitions.fromPartial(object.securityDefinitions) - : undefined; - message.security = object.security?.map(e => SecurityRequirement.fromPartial(e)) || []; - message.externalDocs = - object.externalDocs !== undefined && object.externalDocs !== null - ? ExternalDocumentation.fromPartial(object.externalDocs) - : undefined; - message.extensions = Object.entries(object.extensions ?? {}).reduce<{ - [key: string]: any; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = value; + } + if (object.responses !== undefined && object.responses !== null) { + Object.entries(object.responses).forEach(([key, value]) => { + if (value !== undefined) { + message.responses[key] = Response.fromPartial(value); + } + }); + } + if ( + object.securityDefinitions !== undefined && + object.securityDefinitions !== null + ) { + message.securityDefinitions = SecurityDefinitions.fromPartial( + object.securityDefinitions + ); + } else { + message.securityDefinitions = undefined; + } + if (object.security !== undefined && object.security !== null) { + for (const e of object.security) { + message.security.push(SecurityRequirement.fromPartial(e)); } - return acc; - }, {}); + } + if (object.externalDocs !== undefined && object.externalDocs !== null) { + message.externalDocs = ExternalDocumentation.fromPartial( + object.externalDocs + ); + } else { + message.externalDocs = undefined; + } + if (object.extensions !== undefined && object.extensions !== null) { + Object.entries(object.extensions).forEach(([key, value]) => { + if (value !== undefined) { + message.extensions[key] = Value.fromPartial(value); + } + }); + } return message; }, }; -function createBaseSwagger_ResponsesEntry(): Swagger_ResponsesEntry { - return { key: "", value: undefined }; -} +const baseSwagger_ResponsesEntry: object = { key: "" }; export const Swagger_ResponsesEntry = { - encode(message: Swagger_ResponsesEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Swagger_ResponsesEntry, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -1246,10 +1356,13 @@ export const Swagger_ResponsesEntry = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Swagger_ResponsesEntry { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): Swagger_ResponsesEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSwagger_ResponsesEntry(); + const message = { ...baseSwagger_ResponsesEntry } as Swagger_ResponsesEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1268,10 +1381,18 @@ export const Swagger_ResponsesEntry = { }, fromJSON(object: any): Swagger_ResponsesEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? Response.fromJSON(object.value) : undefined, - }; + const message = { ...baseSwagger_ResponsesEntry } as Swagger_ResponsesEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Response.fromJSON(object.value); + } else { + message.value = undefined; + } + return message; }, toJSON(message: Swagger_ResponsesEntry): unknown { @@ -1282,38 +1403,49 @@ export const Swagger_ResponsesEntry = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): Swagger_ResponsesEntry { - const message = createBaseSwagger_ResponsesEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? Response.fromPartial(object.value) - : undefined; + const message = { ...baseSwagger_ResponsesEntry } as Swagger_ResponsesEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Response.fromPartial(object.value); + } else { + message.value = undefined; + } return message; }, }; -function createBaseSwagger_ExtensionsEntry(): Swagger_ExtensionsEntry { - return { key: "", value: undefined }; -} +const baseSwagger_ExtensionsEntry: object = { key: "" }; export const Swagger_ExtensionsEntry = { - encode(message: Swagger_ExtensionsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Swagger_ExtensionsEntry, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).ldelim(); + Value.encode(message.value, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Swagger_ExtensionsEntry { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): Swagger_ExtensionsEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSwagger_ExtensionsEntry(); + const message = { + ...baseSwagger_ExtensionsEntry, + } as Swagger_ExtensionsEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1321,7 +1453,7 @@ export const Swagger_ExtensionsEntry = { message.key = reader.string(); break; case 2: - message.value = Value.unwrap(Value.decode(reader, reader.uint32())); + message.value = Value.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1332,48 +1464,66 @@ export const Swagger_ExtensionsEntry = { }, fromJSON(object: any): Swagger_ExtensionsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object?.value) ? object.value : undefined, - }; + const message = { + ...baseSwagger_ExtensionsEntry, + } as Swagger_ExtensionsEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Value.fromJSON(object.value); + } else { + message.value = undefined; + } + return message; }, toJSON(message: Swagger_ExtensionsEntry): unknown { const obj: any = {}; message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); + message.value !== undefined && + (obj.value = message.value ? Value.toJSON(message.value) : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): Swagger_ExtensionsEntry { - const message = createBaseSwagger_ExtensionsEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? undefined; + const message = { + ...baseSwagger_ExtensionsEntry, + } as Swagger_ExtensionsEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Value.fromPartial(object.value); + } else { + message.value = undefined; + } return message; }, }; -function createBaseOperation(): Operation { - return { - tags: [], - summary: "", - description: "", - externalDocs: undefined, - operationId: "", - consumes: [], - produces: [], - responses: {}, - schemes: [], - deprecated: false, - security: [], - extensions: {}, - }; -} +const baseOperation: object = { + tags: "", + summary: "", + description: "", + operationId: "", + consumes: "", + produces: "", + schemes: 0, + deprecated: false, +}; export const Operation = { - encode(message: Operation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Operation, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { for (const v of message.tags) { writer.uint32(10).string(v!); } @@ -1384,7 +1534,10 @@ export const Operation = { writer.uint32(26).string(message.description); } if (message.externalDocs !== undefined) { - ExternalDocumentation.encode(message.externalDocs, writer.uint32(34).fork()).ldelim(); + ExternalDocumentation.encode( + message.externalDocs, + writer.uint32(34).fork() + ).ldelim(); } if (message.operationId !== "") { writer.uint32(42).string(message.operationId); @@ -1398,7 +1551,7 @@ export const Operation = { Object.entries(message.responses).forEach(([key, value]) => { Operation_ResponsesEntry.encode( { key: key as any, value }, - writer.uint32(74).fork(), + writer.uint32(74).fork() ).ldelim(); }); writer.uint32(82).fork(); @@ -1413,12 +1566,10 @@ export const Operation = { SecurityRequirement.encode(v!, writer.uint32(98).fork()).ldelim(); } Object.entries(message.extensions).forEach(([key, value]) => { - if (value !== undefined) { - Operation_ExtensionsEntry.encode( - { key: key as any, value }, - writer.uint32(106).fork(), - ).ldelim(); - } + Operation_ExtensionsEntry.encode( + { key: key as any, value }, + writer.uint32(106).fork() + ).ldelim(); }); return writer; }, @@ -1426,7 +1577,14 @@ export const Operation = { decode(input: _m0.Reader | Uint8Array, length?: number): Operation { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOperation(); + const message = { ...baseOperation } as Operation; + message.tags = []; + message.consumes = []; + message.produces = []; + message.responses = {}; + message.schemes = []; + message.security = []; + message.extensions = {}; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1440,7 +1598,10 @@ export const Operation = { message.description = reader.string(); break; case 4: - message.externalDocs = ExternalDocumentation.decode(reader, reader.uint32()); + message.externalDocs = ExternalDocumentation.decode( + reader, + reader.uint32() + ); break; case 5: message.operationId = reader.string(); @@ -1452,7 +1613,10 @@ export const Operation = { message.produces.push(reader.string()); break; case 9: - const entry9 = Operation_ResponsesEntry.decode(reader, reader.uint32()); + const entry9 = Operation_ResponsesEntry.decode( + reader, + reader.uint32() + ); if (entry9.value !== undefined) { message.responses[entry9.key] = entry9.value; } @@ -1471,10 +1635,15 @@ export const Operation = { message.deprecated = reader.bool(); break; case 12: - message.security.push(SecurityRequirement.decode(reader, reader.uint32())); + message.security.push( + SecurityRequirement.decode(reader, reader.uint32()) + ); break; case 13: - const entry13 = Operation_ExtensionsEntry.decode(reader, reader.uint32()); + const entry13 = Operation_ExtensionsEntry.decode( + reader, + reader.uint32() + ); if (entry13.value !== undefined) { message.extensions[entry13.key] = entry13.value; } @@ -1488,62 +1657,102 @@ export const Operation = { }, fromJSON(object: any): Operation { - return { - tags: Array.isArray(object?.tags) ? object.tags.map((e: any) => String(e)) : [], - summary: isSet(object.summary) ? String(object.summary) : "", - description: isSet(object.description) ? String(object.description) : "", - externalDocs: isSet(object.externalDocs) - ? ExternalDocumentation.fromJSON(object.externalDocs) - : undefined, - operationId: isSet(object.operationId) ? String(object.operationId) : "", - consumes: Array.isArray(object?.consumes) ? object.consumes.map((e: any) => String(e)) : [], - produces: Array.isArray(object?.produces) ? object.produces.map((e: any) => String(e)) : [], - responses: isObject(object.responses) - ? Object.entries(object.responses).reduce<{ [key: string]: Response }>( - (acc, [key, value]) => { - acc[key] = Response.fromJSON(value); - return acc; - }, - {}, - ) - : {}, - schemes: Array.isArray(object?.schemes) - ? object.schemes.map((e: any) => schemeFromJSON(e)) - : [], - deprecated: isSet(object.deprecated) ? Boolean(object.deprecated) : false, - security: Array.isArray(object?.security) - ? object.security.map((e: any) => SecurityRequirement.fromJSON(e)) - : [], - extensions: isObject(object.extensions) - ? Object.entries(object.extensions).reduce<{ [key: string]: any }>((acc, [key, value]) => { - acc[key] = value as any; - return acc; - }, {}) - : {}, - }; + const message = { ...baseOperation } as Operation; + message.tags = []; + message.consumes = []; + message.produces = []; + message.responses = {}; + message.schemes = []; + message.security = []; + message.extensions = {}; + if (object.tags !== undefined && object.tags !== null) { + for (const e of object.tags) { + message.tags.push(String(e)); + } + } + if (object.summary !== undefined && object.summary !== null) { + message.summary = String(object.summary); + } else { + message.summary = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if (object.externalDocs !== undefined && object.externalDocs !== null) { + message.externalDocs = ExternalDocumentation.fromJSON( + object.externalDocs + ); + } else { + message.externalDocs = undefined; + } + if (object.operationId !== undefined && object.operationId !== null) { + message.operationId = String(object.operationId); + } else { + message.operationId = ""; + } + if (object.consumes !== undefined && object.consumes !== null) { + for (const e of object.consumes) { + message.consumes.push(String(e)); + } + } + if (object.produces !== undefined && object.produces !== null) { + for (const e of object.produces) { + message.produces.push(String(e)); + } + } + if (object.responses !== undefined && object.responses !== null) { + Object.entries(object.responses).forEach(([key, value]) => { + message.responses[key] = Response.fromJSON(value); + }); + } + if (object.schemes !== undefined && object.schemes !== null) { + for (const e of object.schemes) { + message.schemes.push(schemeFromJSON(e)); + } + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = Boolean(object.deprecated); + } else { + message.deprecated = false; + } + if (object.security !== undefined && object.security !== null) { + for (const e of object.security) { + message.security.push(SecurityRequirement.fromJSON(e)); + } + } + if (object.extensions !== undefined && object.extensions !== null) { + Object.entries(object.extensions).forEach(([key, value]) => { + message.extensions[key] = Value.fromJSON(value); + }); + } + return message; }, toJSON(message: Operation): unknown { const obj: any = {}; if (message.tags) { - obj.tags = message.tags.map(e => e); + obj.tags = message.tags.map((e) => e); } else { obj.tags = []; } message.summary !== undefined && (obj.summary = message.summary); - message.description !== undefined && (obj.description = message.description); + message.description !== undefined && + (obj.description = message.description); message.externalDocs !== undefined && (obj.externalDocs = message.externalDocs ? ExternalDocumentation.toJSON(message.externalDocs) : undefined); - message.operationId !== undefined && (obj.operationId = message.operationId); + message.operationId !== undefined && + (obj.operationId = message.operationId); if (message.consumes) { - obj.consumes = message.consumes.map(e => e); + obj.consumes = message.consumes.map((e) => e); } else { obj.consumes = []; } if (message.produces) { - obj.produces = message.produces.map(e => e); + obj.produces = message.produces.map((e) => e); } else { obj.produces = []; } @@ -1554,66 +1763,113 @@ export const Operation = { }); } if (message.schemes) { - obj.schemes = message.schemes.map(e => schemeToJSON(e)); + obj.schemes = message.schemes.map((e) => schemeToJSON(e)); } else { obj.schemes = []; } message.deprecated !== undefined && (obj.deprecated = message.deprecated); if (message.security) { - obj.security = message.security.map(e => (e ? SecurityRequirement.toJSON(e) : undefined)); + obj.security = message.security.map((e) => + e ? SecurityRequirement.toJSON(e) : undefined + ); } else { obj.security = []; } obj.extensions = {}; if (message.extensions) { Object.entries(message.extensions).forEach(([k, v]) => { - obj.extensions[k] = v; + obj.extensions[k] = Value.toJSON(v); }); } return obj; }, - fromPartial, I>>(object: I): Operation { - const message = createBaseOperation(); - message.tags = object.tags?.map(e => e) || []; - message.summary = object.summary ?? ""; - message.description = object.description ?? ""; - message.externalDocs = - object.externalDocs !== undefined && object.externalDocs !== null - ? ExternalDocumentation.fromPartial(object.externalDocs) - : undefined; - message.operationId = object.operationId ?? ""; - message.consumes = object.consumes?.map(e => e) || []; - message.produces = object.produces?.map(e => e) || []; - message.responses = Object.entries(object.responses ?? {}).reduce<{ - [key: string]: Response; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = Response.fromPartial(value); + fromPartial(object: DeepPartial): Operation { + const message = { ...baseOperation } as Operation; + message.tags = []; + message.consumes = []; + message.produces = []; + message.responses = {}; + message.schemes = []; + message.security = []; + message.extensions = {}; + if (object.tags !== undefined && object.tags !== null) { + for (const e of object.tags) { + message.tags.push(e); } - return acc; - }, {}); - message.schemes = object.schemes?.map(e => e) || []; - message.deprecated = object.deprecated ?? false; - message.security = object.security?.map(e => SecurityRequirement.fromPartial(e)) || []; - message.extensions = Object.entries(object.extensions ?? {}).reduce<{ - [key: string]: any; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = value; + } + if (object.summary !== undefined && object.summary !== null) { + message.summary = object.summary; + } else { + message.summary = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if (object.externalDocs !== undefined && object.externalDocs !== null) { + message.externalDocs = ExternalDocumentation.fromPartial( + object.externalDocs + ); + } else { + message.externalDocs = undefined; + } + if (object.operationId !== undefined && object.operationId !== null) { + message.operationId = object.operationId; + } else { + message.operationId = ""; + } + if (object.consumes !== undefined && object.consumes !== null) { + for (const e of object.consumes) { + message.consumes.push(e); + } + } + if (object.produces !== undefined && object.produces !== null) { + for (const e of object.produces) { + message.produces.push(e); + } + } + if (object.responses !== undefined && object.responses !== null) { + Object.entries(object.responses).forEach(([key, value]) => { + if (value !== undefined) { + message.responses[key] = Response.fromPartial(value); + } + }); + } + if (object.schemes !== undefined && object.schemes !== null) { + for (const e of object.schemes) { + message.schemes.push(e); + } + } + if (object.deprecated !== undefined && object.deprecated !== null) { + message.deprecated = object.deprecated; + } else { + message.deprecated = false; + } + if (object.security !== undefined && object.security !== null) { + for (const e of object.security) { + message.security.push(SecurityRequirement.fromPartial(e)); } - return acc; - }, {}); + } + if (object.extensions !== undefined && object.extensions !== null) { + Object.entries(object.extensions).forEach(([key, value]) => { + if (value !== undefined) { + message.extensions[key] = Value.fromPartial(value); + } + }); + } return message; }, }; -function createBaseOperation_ResponsesEntry(): Operation_ResponsesEntry { - return { key: "", value: undefined }; -} +const baseOperation_ResponsesEntry: object = { key: "" }; export const Operation_ResponsesEntry = { - encode(message: Operation_ResponsesEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Operation_ResponsesEntry, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -1623,10 +1879,15 @@ export const Operation_ResponsesEntry = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Operation_ResponsesEntry { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): Operation_ResponsesEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOperation_ResponsesEntry(); + const message = { + ...baseOperation_ResponsesEntry, + } as Operation_ResponsesEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1645,10 +1906,20 @@ export const Operation_ResponsesEntry = { }, fromJSON(object: any): Operation_ResponsesEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? Response.fromJSON(object.value) : undefined, - }; + const message = { + ...baseOperation_ResponsesEntry, + } as Operation_ResponsesEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Response.fromJSON(object.value); + } else { + message.value = undefined; + } + return message; }, toJSON(message: Operation_ResponsesEntry): unknown { @@ -1659,38 +1930,51 @@ export const Operation_ResponsesEntry = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): Operation_ResponsesEntry { - const message = createBaseOperation_ResponsesEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? Response.fromPartial(object.value) - : undefined; + const message = { + ...baseOperation_ResponsesEntry, + } as Operation_ResponsesEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Response.fromPartial(object.value); + } else { + message.value = undefined; + } return message; }, }; -function createBaseOperation_ExtensionsEntry(): Operation_ExtensionsEntry { - return { key: "", value: undefined }; -} +const baseOperation_ExtensionsEntry: object = { key: "" }; export const Operation_ExtensionsEntry = { - encode(message: Operation_ExtensionsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Operation_ExtensionsEntry, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).ldelim(); + Value.encode(message.value, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Operation_ExtensionsEntry { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): Operation_ExtensionsEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseOperation_ExtensionsEntry(); + const message = { + ...baseOperation_ExtensionsEntry, + } as Operation_ExtensionsEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1698,7 +1982,7 @@ export const Operation_ExtensionsEntry = { message.key = reader.string(); break; case 2: - message.value = Value.unwrap(Value.decode(reader, reader.uint32())); + message.value = Value.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1709,35 +1993,63 @@ export const Operation_ExtensionsEntry = { }, fromJSON(object: any): Operation_ExtensionsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object?.value) ? object.value : undefined, - }; + const message = { + ...baseOperation_ExtensionsEntry, + } as Operation_ExtensionsEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Value.fromJSON(object.value); + } else { + message.value = undefined; + } + return message; }, toJSON(message: Operation_ExtensionsEntry): unknown { const obj: any = {}; message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); + message.value !== undefined && + (obj.value = message.value ? Value.toJSON(message.value) : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): Operation_ExtensionsEntry { - const message = createBaseOperation_ExtensionsEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? undefined; + const message = { + ...baseOperation_ExtensionsEntry, + } as Operation_ExtensionsEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Value.fromPartial(object.value); + } else { + message.value = undefined; + } return message; }, }; -function createBaseHeader(): Header { - return { description: "", type: "", format: "", default: "", pattern: "" }; -} +const baseHeader: object = { + description: "", + type: "", + format: "", + default: "", + pattern: "", +}; export const Header = { - encode(message: Header, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Header, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.description !== "") { writer.uint32(10).string(message.description); } @@ -1759,7 +2071,7 @@ export const Header = { decode(input: _m0.Reader | Uint8Array, length?: number): Header { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHeader(); + const message = { ...baseHeader } as Header; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1787,18 +2099,39 @@ export const Header = { }, fromJSON(object: any): Header { - return { - description: isSet(object.description) ? String(object.description) : "", - type: isSet(object.type) ? String(object.type) : "", - format: isSet(object.format) ? String(object.format) : "", - default: isSet(object.default) ? String(object.default) : "", - pattern: isSet(object.pattern) ? String(object.pattern) : "", - }; + const message = { ...baseHeader } as Header; + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if (object.type !== undefined && object.type !== null) { + message.type = String(object.type); + } else { + message.type = ""; + } + if (object.format !== undefined && object.format !== null) { + message.format = String(object.format); + } else { + message.format = ""; + } + if (object.default !== undefined && object.default !== null) { + message.default = String(object.default); + } else { + message.default = ""; + } + if (object.pattern !== undefined && object.pattern !== null) { + message.pattern = String(object.pattern); + } else { + message.pattern = ""; + } + return message; }, toJSON(message: Header): unknown { const obj: any = {}; - message.description !== undefined && (obj.description = message.description); + message.description !== undefined && + (obj.description = message.description); message.type !== undefined && (obj.type = message.type); message.format !== undefined && (obj.format = message.format); message.default !== undefined && (obj.default = message.default); @@ -1806,29 +2139,44 @@ export const Header = { return obj; }, - fromPartial, I>>(object: I): Header { - const message = createBaseHeader(); - message.description = object.description ?? ""; - message.type = object.type ?? ""; - message.format = object.format ?? ""; - message.default = object.default ?? ""; - message.pattern = object.pattern ?? ""; + fromPartial(object: DeepPartial
): Header { + const message = { ...baseHeader } as Header; + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if (object.type !== undefined && object.type !== null) { + message.type = object.type; + } else { + message.type = ""; + } + if (object.format !== undefined && object.format !== null) { + message.format = object.format; + } else { + message.format = ""; + } + if (object.default !== undefined && object.default !== null) { + message.default = object.default; + } else { + message.default = ""; + } + if (object.pattern !== undefined && object.pattern !== null) { + message.pattern = object.pattern; + } else { + message.pattern = ""; + } return message; }, }; -function createBaseResponse(): Response { - return { - description: "", - schema: undefined, - headers: {}, - examples: {}, - extensions: {}, - }; -} +const baseResponse: object = { description: "" }; export const Response = { - encode(message: Response, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Response, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.description !== "") { writer.uint32(10).string(message.description); } @@ -1836,18 +2184,22 @@ export const Response = { Schema.encode(message.schema, writer.uint32(18).fork()).ldelim(); } Object.entries(message.headers).forEach(([key, value]) => { - Response_HeadersEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).ldelim(); + Response_HeadersEntry.encode( + { key: key as any, value }, + writer.uint32(26).fork() + ).ldelim(); }); Object.entries(message.examples).forEach(([key, value]) => { - Response_ExamplesEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).ldelim(); + Response_ExamplesEntry.encode( + { key: key as any, value }, + writer.uint32(34).fork() + ).ldelim(); }); Object.entries(message.extensions).forEach(([key, value]) => { - if (value !== undefined) { - Response_ExtensionsEntry.encode( - { key: key as any, value }, - writer.uint32(42).fork(), - ).ldelim(); - } + Response_ExtensionsEntry.encode( + { key: key as any, value }, + writer.uint32(42).fork() + ).ldelim(); }); return writer; }, @@ -1855,7 +2207,10 @@ export const Response = { decode(input: _m0.Reader | Uint8Array, length?: number): Response { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponse(); + const message = { ...baseResponse } as Response; + message.headers = {}; + message.examples = {}; + message.extensions = {}; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -1878,7 +2233,10 @@ export const Response = { } break; case 5: - const entry5 = Response_ExtensionsEntry.decode(reader, reader.uint32()); + const entry5 = Response_ExtensionsEntry.decode( + reader, + reader.uint32() + ); if (entry5.value !== undefined) { message.extensions[entry5.key] = entry5.value; } @@ -1892,33 +2250,42 @@ export const Response = { }, fromJSON(object: any): Response { - return { - description: isSet(object.description) ? String(object.description) : "", - schema: isSet(object.schema) ? Schema.fromJSON(object.schema) : undefined, - headers: isObject(object.headers) - ? Object.entries(object.headers).reduce<{ [key: string]: Header }>((acc, [key, value]) => { - acc[key] = Header.fromJSON(value); - return acc; - }, {}) - : {}, - examples: isObject(object.examples) - ? Object.entries(object.examples).reduce<{ [key: string]: string }>((acc, [key, value]) => { - acc[key] = String(value); - return acc; - }, {}) - : {}, - extensions: isObject(object.extensions) - ? Object.entries(object.extensions).reduce<{ [key: string]: any }>((acc, [key, value]) => { - acc[key] = value as any; - return acc; - }, {}) - : {}, - }; + const message = { ...baseResponse } as Response; + message.headers = {}; + message.examples = {}; + message.extensions = {}; + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if (object.schema !== undefined && object.schema !== null) { + message.schema = Schema.fromJSON(object.schema); + } else { + message.schema = undefined; + } + if (object.headers !== undefined && object.headers !== null) { + Object.entries(object.headers).forEach(([key, value]) => { + message.headers[key] = Header.fromJSON(value); + }); + } + if (object.examples !== undefined && object.examples !== null) { + Object.entries(object.examples).forEach(([key, value]) => { + message.examples[key] = String(value); + }); + } + if (object.extensions !== undefined && object.extensions !== null) { + Object.entries(object.extensions).forEach(([key, value]) => { + message.extensions[key] = Value.fromJSON(value); + }); + } + return message; }, toJSON(message: Response): unknown { const obj: any = {}; - message.description !== undefined && (obj.description = message.description); + message.description !== undefined && + (obj.description = message.description); message.schema !== undefined && (obj.schema = message.schema ? Schema.toJSON(message.schema) : undefined); obj.headers = {}; @@ -1936,53 +2303,59 @@ export const Response = { obj.extensions = {}; if (message.extensions) { Object.entries(message.extensions).forEach(([k, v]) => { - obj.extensions[k] = v; + obj.extensions[k] = Value.toJSON(v); }); } return obj; }, - fromPartial, I>>(object: I): Response { - const message = createBaseResponse(); - message.description = object.description ?? ""; - message.schema = - object.schema !== undefined && object.schema !== null - ? Schema.fromPartial(object.schema) - : undefined; - message.headers = Object.entries(object.headers ?? {}).reduce<{ - [key: string]: Header; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = Header.fromPartial(value); - } - return acc; - }, {}); - message.examples = Object.entries(object.examples ?? {}).reduce<{ - [key: string]: string; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = String(value); - } - return acc; - }, {}); - message.extensions = Object.entries(object.extensions ?? {}).reduce<{ - [key: string]: any; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = value; - } - return acc; - }, {}); + fromPartial(object: DeepPartial): Response { + const message = { ...baseResponse } as Response; + message.headers = {}; + message.examples = {}; + message.extensions = {}; + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if (object.schema !== undefined && object.schema !== null) { + message.schema = Schema.fromPartial(object.schema); + } else { + message.schema = undefined; + } + if (object.headers !== undefined && object.headers !== null) { + Object.entries(object.headers).forEach(([key, value]) => { + if (value !== undefined) { + message.headers[key] = Header.fromPartial(value); + } + }); + } + if (object.examples !== undefined && object.examples !== null) { + Object.entries(object.examples).forEach(([key, value]) => { + if (value !== undefined) { + message.examples[key] = String(value); + } + }); + } + if (object.extensions !== undefined && object.extensions !== null) { + Object.entries(object.extensions).forEach(([key, value]) => { + if (value !== undefined) { + message.extensions[key] = Value.fromPartial(value); + } + }); + } return message; }, }; -function createBaseResponse_HeadersEntry(): Response_HeadersEntry { - return { key: "", value: undefined }; -} +const baseResponse_HeadersEntry: object = { key: "" }; export const Response_HeadersEntry = { - encode(message: Response_HeadersEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Response_HeadersEntry, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -1992,10 +2365,13 @@ export const Response_HeadersEntry = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Response_HeadersEntry { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): Response_HeadersEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponse_HeadersEntry(); + const message = { ...baseResponse_HeadersEntry } as Response_HeadersEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2014,10 +2390,18 @@ export const Response_HeadersEntry = { }, fromJSON(object: any): Response_HeadersEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? Header.fromJSON(object.value) : undefined, - }; + const message = { ...baseResponse_HeadersEntry } as Response_HeadersEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Header.fromJSON(object.value); + } else { + message.value = undefined; + } + return message; }, toJSON(message: Response_HeadersEntry): unknown { @@ -2028,25 +2412,31 @@ export const Response_HeadersEntry = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): Response_HeadersEntry { - const message = createBaseResponse_HeadersEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? Header.fromPartial(object.value) - : undefined; + const message = { ...baseResponse_HeadersEntry } as Response_HeadersEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Header.fromPartial(object.value); + } else { + message.value = undefined; + } return message; }, }; -function createBaseResponse_ExamplesEntry(): Response_ExamplesEntry { - return { key: "", value: "" }; -} +const baseResponse_ExamplesEntry: object = { key: "", value: "" }; export const Response_ExamplesEntry = { - encode(message: Response_ExamplesEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Response_ExamplesEntry, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -2056,10 +2446,13 @@ export const Response_ExamplesEntry = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Response_ExamplesEntry { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): Response_ExamplesEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponse_ExamplesEntry(); + const message = { ...baseResponse_ExamplesEntry } as Response_ExamplesEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2078,10 +2471,18 @@ export const Response_ExamplesEntry = { }, fromJSON(object: any): Response_ExamplesEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? String(object.value) : "", - }; + const message = { ...baseResponse_ExamplesEntry } as Response_ExamplesEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = String(object.value); + } else { + message.value = ""; + } + return message; }, toJSON(message: Response_ExamplesEntry): unknown { @@ -2091,35 +2492,49 @@ export const Response_ExamplesEntry = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): Response_ExamplesEntry { - const message = createBaseResponse_ExamplesEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? ""; + const message = { ...baseResponse_ExamplesEntry } as Response_ExamplesEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = ""; + } return message; }, }; -function createBaseResponse_ExtensionsEntry(): Response_ExtensionsEntry { - return { key: "", value: undefined }; -} +const baseResponse_ExtensionsEntry: object = { key: "" }; export const Response_ExtensionsEntry = { - encode(message: Response_ExtensionsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Response_ExtensionsEntry, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).ldelim(); + Value.encode(message.value, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Response_ExtensionsEntry { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): Response_ExtensionsEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseResponse_ExtensionsEntry(); + const message = { + ...baseResponse_ExtensionsEntry, + } as Response_ExtensionsEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2127,7 +2542,7 @@ export const Response_ExtensionsEntry = { message.key = reader.string(); break; case 2: - message.value = Value.unwrap(Value.decode(reader, reader.uint32())); + message.value = Value.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2138,40 +2553,56 @@ export const Response_ExtensionsEntry = { }, fromJSON(object: any): Response_ExtensionsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object?.value) ? object.value : undefined, - }; + const message = { + ...baseResponse_ExtensionsEntry, + } as Response_ExtensionsEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Value.fromJSON(object.value); + } else { + message.value = undefined; + } + return message; }, toJSON(message: Response_ExtensionsEntry): unknown { const obj: any = {}; message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); + message.value !== undefined && + (obj.value = message.value ? Value.toJSON(message.value) : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): Response_ExtensionsEntry { - const message = createBaseResponse_ExtensionsEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? undefined; + const message = { + ...baseResponse_ExtensionsEntry, + } as Response_ExtensionsEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Value.fromPartial(object.value); + } else { + message.value = undefined; + } return message; }, }; -function createBaseInfo(): Info { - return { - title: "", - description: "", - termsOfService: "", - contact: undefined, - license: undefined, - version: "", - extensions: {}, - }; -} +const baseInfo: object = { + title: "", + description: "", + termsOfService: "", + version: "", +}; export const Info = { encode(message: Info, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { @@ -2194,9 +2625,10 @@ export const Info = { writer.uint32(50).string(message.version); } Object.entries(message.extensions).forEach(([key, value]) => { - if (value !== undefined) { - Info_ExtensionsEntry.encode({ key: key as any, value }, writer.uint32(58).fork()).ldelim(); - } + Info_ExtensionsEntry.encode( + { key: key as any, value }, + writer.uint32(58).fork() + ).ldelim(); }); return writer; }, @@ -2204,7 +2636,8 @@ export const Info = { decode(input: _m0.Reader | Uint8Array, length?: number): Info { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInfo(); + const message = { ...baseInfo } as Info; + message.extensions = {}; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2241,86 +2674,138 @@ export const Info = { }, fromJSON(object: any): Info { - return { - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - termsOfService: isSet(object.termsOfService) ? String(object.termsOfService) : "", - contact: isSet(object.contact) ? Contact.fromJSON(object.contact) : undefined, - license: isSet(object.license) ? License.fromJSON(object.license) : undefined, - version: isSet(object.version) ? String(object.version) : "", - extensions: isObject(object.extensions) - ? Object.entries(object.extensions).reduce<{ [key: string]: any }>((acc, [key, value]) => { - acc[key] = value as any; - return acc; - }, {}) - : {}, - }; + const message = { ...baseInfo } as Info; + message.extensions = {}; + if (object.title !== undefined && object.title !== null) { + message.title = String(object.title); + } else { + message.title = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if (object.termsOfService !== undefined && object.termsOfService !== null) { + message.termsOfService = String(object.termsOfService); + } else { + message.termsOfService = ""; + } + if (object.contact !== undefined && object.contact !== null) { + message.contact = Contact.fromJSON(object.contact); + } else { + message.contact = undefined; + } + if (object.license !== undefined && object.license !== null) { + message.license = License.fromJSON(object.license); + } else { + message.license = undefined; + } + if (object.version !== undefined && object.version !== null) { + message.version = String(object.version); + } else { + message.version = ""; + } + if (object.extensions !== undefined && object.extensions !== null) { + Object.entries(object.extensions).forEach(([key, value]) => { + message.extensions[key] = Value.fromJSON(value); + }); + } + return message; }, toJSON(message: Info): unknown { const obj: any = {}; message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); - message.termsOfService !== undefined && (obj.termsOfService = message.termsOfService); + message.description !== undefined && + (obj.description = message.description); + message.termsOfService !== undefined && + (obj.termsOfService = message.termsOfService); message.contact !== undefined && - (obj.contact = message.contact ? Contact.toJSON(message.contact) : undefined); + (obj.contact = message.contact + ? Contact.toJSON(message.contact) + : undefined); message.license !== undefined && - (obj.license = message.license ? License.toJSON(message.license) : undefined); + (obj.license = message.license + ? License.toJSON(message.license) + : undefined); message.version !== undefined && (obj.version = message.version); obj.extensions = {}; if (message.extensions) { Object.entries(message.extensions).forEach(([k, v]) => { - obj.extensions[k] = v; + obj.extensions[k] = Value.toJSON(v); }); } return obj; }, - fromPartial, I>>(object: I): Info { - const message = createBaseInfo(); - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.termsOfService = object.termsOfService ?? ""; - message.contact = - object.contact !== undefined && object.contact !== null - ? Contact.fromPartial(object.contact) - : undefined; - message.license = - object.license !== undefined && object.license !== null - ? License.fromPartial(object.license) - : undefined; - message.version = object.version ?? ""; - message.extensions = Object.entries(object.extensions ?? {}).reduce<{ - [key: string]: any; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = value; - } - return acc; - }, {}); + fromPartial(object: DeepPartial): Info { + const message = { ...baseInfo } as Info; + message.extensions = {}; + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } else { + message.title = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if (object.termsOfService !== undefined && object.termsOfService !== null) { + message.termsOfService = object.termsOfService; + } else { + message.termsOfService = ""; + } + if (object.contact !== undefined && object.contact !== null) { + message.contact = Contact.fromPartial(object.contact); + } else { + message.contact = undefined; + } + if (object.license !== undefined && object.license !== null) { + message.license = License.fromPartial(object.license); + } else { + message.license = undefined; + } + if (object.version !== undefined && object.version !== null) { + message.version = object.version; + } else { + message.version = ""; + } + if (object.extensions !== undefined && object.extensions !== null) { + Object.entries(object.extensions).forEach(([key, value]) => { + if (value !== undefined) { + message.extensions[key] = Value.fromPartial(value); + } + }); + } return message; }, }; -function createBaseInfo_ExtensionsEntry(): Info_ExtensionsEntry { - return { key: "", value: undefined }; -} +const baseInfo_ExtensionsEntry: object = { key: "" }; export const Info_ExtensionsEntry = { - encode(message: Info_ExtensionsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Info_ExtensionsEntry, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).ldelim(); + Value.encode(message.value, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): Info_ExtensionsEntry { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): Info_ExtensionsEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseInfo_ExtensionsEntry(); + const message = { ...baseInfo_ExtensionsEntry } as Info_ExtensionsEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2328,7 +2813,7 @@ export const Info_ExtensionsEntry = { message.key = reader.string(); break; case 2: - message.value = Value.unwrap(Value.decode(reader, reader.uint32())); + message.value = Value.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2339,35 +2824,51 @@ export const Info_ExtensionsEntry = { }, fromJSON(object: any): Info_ExtensionsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object?.value) ? object.value : undefined, - }; + const message = { ...baseInfo_ExtensionsEntry } as Info_ExtensionsEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Value.fromJSON(object.value); + } else { + message.value = undefined; + } + return message; }, toJSON(message: Info_ExtensionsEntry): unknown { const obj: any = {}; message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); + message.value !== undefined && + (obj.value = message.value ? Value.toJSON(message.value) : undefined); return obj; }, - fromPartial, I>>( - object: I, - ): Info_ExtensionsEntry { - const message = createBaseInfo_ExtensionsEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? undefined; + fromPartial(object: DeepPartial): Info_ExtensionsEntry { + const message = { ...baseInfo_ExtensionsEntry } as Info_ExtensionsEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Value.fromPartial(object.value); + } else { + message.value = undefined; + } return message; }, }; -function createBaseContact(): Contact { - return { name: "", url: "", email: "" }; -} +const baseContact: object = { name: "", url: "", email: "" }; export const Contact = { - encode(message: Contact, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Contact, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2383,7 +2884,7 @@ export const Contact = { decode(input: _m0.Reader | Uint8Array, length?: number): Contact { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseContact(); + const message = { ...baseContact } as Contact; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2405,11 +2906,23 @@ export const Contact = { }, fromJSON(object: any): Contact { - return { - name: isSet(object.name) ? String(object.name) : "", - url: isSet(object.url) ? String(object.url) : "", - email: isSet(object.email) ? String(object.email) : "", - }; + const message = { ...baseContact } as Contact; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = String(object.url); + } else { + message.url = ""; + } + if (object.email !== undefined && object.email !== null) { + message.email = String(object.email); + } else { + message.email = ""; + } + return message; }, toJSON(message: Contact): unknown { @@ -2420,21 +2933,34 @@ export const Contact = { return obj; }, - fromPartial, I>>(object: I): Contact { - const message = createBaseContact(); - message.name = object.name ?? ""; - message.url = object.url ?? ""; - message.email = object.email ?? ""; + fromPartial(object: DeepPartial): Contact { + const message = { ...baseContact } as Contact; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = object.url; + } else { + message.url = ""; + } + if (object.email !== undefined && object.email !== null) { + message.email = object.email; + } else { + message.email = ""; + } return message; }, }; -function createBaseLicense(): License { - return { name: "", url: "" }; -} +const baseLicense: object = { name: "", url: "" }; export const License = { - encode(message: License, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: License, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2447,7 +2973,7 @@ export const License = { decode(input: _m0.Reader | Uint8Array, length?: number): License { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseLicense(); + const message = { ...baseLicense } as License; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2466,10 +2992,18 @@ export const License = { }, fromJSON(object: any): License { - return { - name: isSet(object.name) ? String(object.name) : "", - url: isSet(object.url) ? String(object.url) : "", - }; + const message = { ...baseLicense } as License; + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = String(object.url); + } else { + message.url = ""; + } + return message; }, toJSON(message: License): unknown { @@ -2479,20 +3013,29 @@ export const License = { return obj; }, - fromPartial, I>>(object: I): License { - const message = createBaseLicense(); - message.name = object.name ?? ""; - message.url = object.url ?? ""; + fromPartial(object: DeepPartial): License { + const message = { ...baseLicense } as License; + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = object.url; + } else { + message.url = ""; + } return message; }, }; -function createBaseExternalDocumentation(): ExternalDocumentation { - return { description: "", url: "" }; -} +const baseExternalDocumentation: object = { description: "", url: "" }; export const ExternalDocumentation = { - encode(message: ExternalDocumentation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: ExternalDocumentation, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.description !== "") { writer.uint32(10).string(message.description); } @@ -2502,10 +3045,13 @@ export const ExternalDocumentation = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): ExternalDocumentation { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): ExternalDocumentation { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExternalDocumentation(); + const message = { ...baseExternalDocumentation } as ExternalDocumentation; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2524,41 +3070,53 @@ export const ExternalDocumentation = { }, fromJSON(object: any): ExternalDocumentation { - return { - description: isSet(object.description) ? String(object.description) : "", - url: isSet(object.url) ? String(object.url) : "", - }; + const message = { ...baseExternalDocumentation } as ExternalDocumentation; + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = String(object.url); + } else { + message.url = ""; + } + return message; }, toJSON(message: ExternalDocumentation): unknown { const obj: any = {}; - message.description !== undefined && (obj.description = message.description); + message.description !== undefined && + (obj.description = message.description); message.url !== undefined && (obj.url = message.url); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): ExternalDocumentation { - const message = createBaseExternalDocumentation(); - message.description = object.description ?? ""; - message.url = object.url ?? ""; + const message = { ...baseExternalDocumentation } as ExternalDocumentation; + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if (object.url !== undefined && object.url !== null) { + message.url = object.url; + } else { + message.url = ""; + } return message; }, }; -function createBaseSchema(): Schema { - return { - jsonSchema: undefined, - discriminator: "", - readOnly: false, - externalDocs: undefined, - example: "", - }; -} +const baseSchema: object = { discriminator: "", readOnly: false, example: "" }; export const Schema = { - encode(message: Schema, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Schema, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.jsonSchema !== undefined) { JSONSchema.encode(message.jsonSchema, writer.uint32(10).fork()).ldelim(); } @@ -2569,7 +3127,10 @@ export const Schema = { writer.uint32(24).bool(message.readOnly); } if (message.externalDocs !== undefined) { - ExternalDocumentation.encode(message.externalDocs, writer.uint32(42).fork()).ldelim(); + ExternalDocumentation.encode( + message.externalDocs, + writer.uint32(42).fork() + ).ldelim(); } if (message.example !== "") { writer.uint32(50).string(message.example); @@ -2580,7 +3141,7 @@ export const Schema = { decode(input: _m0.Reader | Uint8Array, length?: number): Schema { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSchema(); + const message = { ...baseSchema } as Schema; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2594,7 +3155,10 @@ export const Schema = { message.readOnly = reader.bool(); break; case 5: - message.externalDocs = ExternalDocumentation.decode(reader, reader.uint32()); + message.externalDocs = ExternalDocumentation.decode( + reader, + reader.uint32() + ); break; case 6: message.example = reader.string(); @@ -2608,22 +3172,45 @@ export const Schema = { }, fromJSON(object: any): Schema { - return { - jsonSchema: isSet(object.jsonSchema) ? JSONSchema.fromJSON(object.jsonSchema) : undefined, - discriminator: isSet(object.discriminator) ? String(object.discriminator) : "", - readOnly: isSet(object.readOnly) ? Boolean(object.readOnly) : false, - externalDocs: isSet(object.externalDocs) - ? ExternalDocumentation.fromJSON(object.externalDocs) - : undefined, - example: isSet(object.example) ? String(object.example) : "", - }; + const message = { ...baseSchema } as Schema; + if (object.jsonSchema !== undefined && object.jsonSchema !== null) { + message.jsonSchema = JSONSchema.fromJSON(object.jsonSchema); + } else { + message.jsonSchema = undefined; + } + if (object.discriminator !== undefined && object.discriminator !== null) { + message.discriminator = String(object.discriminator); + } else { + message.discriminator = ""; + } + if (object.readOnly !== undefined && object.readOnly !== null) { + message.readOnly = Boolean(object.readOnly); + } else { + message.readOnly = false; + } + if (object.externalDocs !== undefined && object.externalDocs !== null) { + message.externalDocs = ExternalDocumentation.fromJSON( + object.externalDocs + ); + } else { + message.externalDocs = undefined; + } + if (object.example !== undefined && object.example !== null) { + message.example = String(object.example); + } else { + message.example = ""; + } + return message; }, toJSON(message: Schema): unknown { const obj: any = {}; message.jsonSchema !== undefined && - (obj.jsonSchema = message.jsonSchema ? JSONSchema.toJSON(message.jsonSchema) : undefined); - message.discriminator !== undefined && (obj.discriminator = message.discriminator); + (obj.jsonSchema = message.jsonSchema + ? JSONSchema.toJSON(message.jsonSchema) + : undefined); + message.discriminator !== undefined && + (obj.discriminator = message.discriminator); message.readOnly !== undefined && (obj.readOnly = message.readOnly); message.externalDocs !== undefined && (obj.externalDocs = message.externalDocs @@ -2633,55 +3220,71 @@ export const Schema = { return obj; }, - fromPartial, I>>(object: I): Schema { - const message = createBaseSchema(); - message.jsonSchema = - object.jsonSchema !== undefined && object.jsonSchema !== null - ? JSONSchema.fromPartial(object.jsonSchema) - : undefined; - message.discriminator = object.discriminator ?? ""; - message.readOnly = object.readOnly ?? false; - message.externalDocs = - object.externalDocs !== undefined && object.externalDocs !== null - ? ExternalDocumentation.fromPartial(object.externalDocs) - : undefined; - message.example = object.example ?? ""; + fromPartial(object: DeepPartial): Schema { + const message = { ...baseSchema } as Schema; + if (object.jsonSchema !== undefined && object.jsonSchema !== null) { + message.jsonSchema = JSONSchema.fromPartial(object.jsonSchema); + } else { + message.jsonSchema = undefined; + } + if (object.discriminator !== undefined && object.discriminator !== null) { + message.discriminator = object.discriminator; + } else { + message.discriminator = ""; + } + if (object.readOnly !== undefined && object.readOnly !== null) { + message.readOnly = object.readOnly; + } else { + message.readOnly = false; + } + if (object.externalDocs !== undefined && object.externalDocs !== null) { + message.externalDocs = ExternalDocumentation.fromPartial( + object.externalDocs + ); + } else { + message.externalDocs = undefined; + } + if (object.example !== undefined && object.example !== null) { + message.example = object.example; + } else { + message.example = ""; + } return message; }, }; -function createBaseJSONSchema(): JSONSchema { - return { - ref: "", - title: "", - description: "", - default: "", - readOnly: false, - example: "", - multipleOf: 0, - maximum: 0, - exclusiveMaximum: false, - minimum: 0, - exclusiveMinimum: false, - maxLength: 0, - minLength: 0, - pattern: "", - maxItems: 0, - minItems: 0, - uniqueItems: false, - maxProperties: 0, - minProperties: 0, - required: [], - array: [], - type: [], - format: "", - enum: [], - fieldConfiguration: undefined, - }; -} +const baseJSONSchema: object = { + ref: "", + title: "", + description: "", + default: "", + readOnly: false, + example: "", + multipleOf: 0, + maximum: 0, + exclusiveMaximum: false, + minimum: 0, + exclusiveMinimum: false, + maxLength: 0, + minLength: 0, + pattern: "", + maxItems: 0, + minItems: 0, + uniqueItems: false, + maxProperties: 0, + minProperties: 0, + required: "", + array: "", + type: 0, + format: "", + enum: "", +}; export const JSONSchema = { - encode(message: JSONSchema, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: JSONSchema, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.ref !== "") { writer.uint32(26).string(message.ref); } @@ -2759,7 +3362,7 @@ export const JSONSchema = { if (message.fieldConfiguration !== undefined) { JSONSchema_FieldConfiguration.encode( message.fieldConfiguration, - writer.uint32(8010).fork(), + writer.uint32(8010).fork() ).ldelim(); } return writer; @@ -2768,7 +3371,11 @@ export const JSONSchema = { decode(input: _m0.Reader | Uint8Array, length?: number): JSONSchema { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseJSONSchema(); + const message = { ...baseJSONSchema } as JSONSchema; + message.required = []; + message.array = []; + message.type = []; + message.enum = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -2854,7 +3461,7 @@ export const JSONSchema = { case 1001: message.fieldConfiguration = JSONSchema_FieldConfiguration.decode( reader, - reader.uint32(), + reader.uint32() ); break; default: @@ -2865,79 +3472,198 @@ export const JSONSchema = { return message; }, - fromJSON(object: any): JSONSchema { - return { - ref: isSet(object.ref) ? String(object.ref) : "", - title: isSet(object.title) ? String(object.title) : "", - description: isSet(object.description) ? String(object.description) : "", - default: isSet(object.default) ? String(object.default) : "", - readOnly: isSet(object.readOnly) ? Boolean(object.readOnly) : false, - example: isSet(object.example) ? String(object.example) : "", - multipleOf: isSet(object.multipleOf) ? Number(object.multipleOf) : 0, - maximum: isSet(object.maximum) ? Number(object.maximum) : 0, - exclusiveMaximum: isSet(object.exclusiveMaximum) ? Boolean(object.exclusiveMaximum) : false, - minimum: isSet(object.minimum) ? Number(object.minimum) : 0, - exclusiveMinimum: isSet(object.exclusiveMinimum) ? Boolean(object.exclusiveMinimum) : false, - maxLength: isSet(object.maxLength) ? Number(object.maxLength) : 0, - minLength: isSet(object.minLength) ? Number(object.minLength) : 0, - pattern: isSet(object.pattern) ? String(object.pattern) : "", - maxItems: isSet(object.maxItems) ? Number(object.maxItems) : 0, - minItems: isSet(object.minItems) ? Number(object.minItems) : 0, - uniqueItems: isSet(object.uniqueItems) ? Boolean(object.uniqueItems) : false, - maxProperties: isSet(object.maxProperties) ? Number(object.maxProperties) : 0, - minProperties: isSet(object.minProperties) ? Number(object.minProperties) : 0, - required: Array.isArray(object?.required) ? object.required.map((e: any) => String(e)) : [], - array: Array.isArray(object?.array) ? object.array.map((e: any) => String(e)) : [], - type: Array.isArray(object?.type) - ? object.type.map((e: any) => jSONSchema_JSONSchemaSimpleTypesFromJSON(e)) - : [], - format: isSet(object.format) ? String(object.format) : "", - enum: Array.isArray(object?.enum) ? object.enum.map((e: any) => String(e)) : [], - fieldConfiguration: isSet(object.fieldConfiguration) - ? JSONSchema_FieldConfiguration.fromJSON(object.fieldConfiguration) - : undefined, - }; - }, - + fromJSON(object: any): JSONSchema { + const message = { ...baseJSONSchema } as JSONSchema; + message.required = []; + message.array = []; + message.type = []; + message.enum = []; + if (object.ref !== undefined && object.ref !== null) { + message.ref = String(object.ref); + } else { + message.ref = ""; + } + if (object.title !== undefined && object.title !== null) { + message.title = String(object.title); + } else { + message.title = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if (object.default !== undefined && object.default !== null) { + message.default = String(object.default); + } else { + message.default = ""; + } + if (object.readOnly !== undefined && object.readOnly !== null) { + message.readOnly = Boolean(object.readOnly); + } else { + message.readOnly = false; + } + if (object.example !== undefined && object.example !== null) { + message.example = String(object.example); + } else { + message.example = ""; + } + if (object.multipleOf !== undefined && object.multipleOf !== null) { + message.multipleOf = Number(object.multipleOf); + } else { + message.multipleOf = 0; + } + if (object.maximum !== undefined && object.maximum !== null) { + message.maximum = Number(object.maximum); + } else { + message.maximum = 0; + } + if ( + object.exclusiveMaximum !== undefined && + object.exclusiveMaximum !== null + ) { + message.exclusiveMaximum = Boolean(object.exclusiveMaximum); + } else { + message.exclusiveMaximum = false; + } + if (object.minimum !== undefined && object.minimum !== null) { + message.minimum = Number(object.minimum); + } else { + message.minimum = 0; + } + if ( + object.exclusiveMinimum !== undefined && + object.exclusiveMinimum !== null + ) { + message.exclusiveMinimum = Boolean(object.exclusiveMinimum); + } else { + message.exclusiveMinimum = false; + } + if (object.maxLength !== undefined && object.maxLength !== null) { + message.maxLength = Number(object.maxLength); + } else { + message.maxLength = 0; + } + if (object.minLength !== undefined && object.minLength !== null) { + message.minLength = Number(object.minLength); + } else { + message.minLength = 0; + } + if (object.pattern !== undefined && object.pattern !== null) { + message.pattern = String(object.pattern); + } else { + message.pattern = ""; + } + if (object.maxItems !== undefined && object.maxItems !== null) { + message.maxItems = Number(object.maxItems); + } else { + message.maxItems = 0; + } + if (object.minItems !== undefined && object.minItems !== null) { + message.minItems = Number(object.minItems); + } else { + message.minItems = 0; + } + if (object.uniqueItems !== undefined && object.uniqueItems !== null) { + message.uniqueItems = Boolean(object.uniqueItems); + } else { + message.uniqueItems = false; + } + if (object.maxProperties !== undefined && object.maxProperties !== null) { + message.maxProperties = Number(object.maxProperties); + } else { + message.maxProperties = 0; + } + if (object.minProperties !== undefined && object.minProperties !== null) { + message.minProperties = Number(object.minProperties); + } else { + message.minProperties = 0; + } + if (object.required !== undefined && object.required !== null) { + for (const e of object.required) { + message.required.push(String(e)); + } + } + if (object.array !== undefined && object.array !== null) { + for (const e of object.array) { + message.array.push(String(e)); + } + } + if (object.type !== undefined && object.type !== null) { + for (const e of object.type) { + message.type.push(jSONSchema_JSONSchemaSimpleTypesFromJSON(e)); + } + } + if (object.format !== undefined && object.format !== null) { + message.format = String(object.format); + } else { + message.format = ""; + } + if (object.enum !== undefined && object.enum !== null) { + for (const e of object.enum) { + message.enum.push(String(e)); + } + } + if ( + object.fieldConfiguration !== undefined && + object.fieldConfiguration !== null + ) { + message.fieldConfiguration = JSONSchema_FieldConfiguration.fromJSON( + object.fieldConfiguration + ); + } else { + message.fieldConfiguration = undefined; + } + return message; + }, + toJSON(message: JSONSchema): unknown { const obj: any = {}; message.ref !== undefined && (obj.ref = message.ref); message.title !== undefined && (obj.title = message.title); - message.description !== undefined && (obj.description = message.description); + message.description !== undefined && + (obj.description = message.description); message.default !== undefined && (obj.default = message.default); message.readOnly !== undefined && (obj.readOnly = message.readOnly); message.example !== undefined && (obj.example = message.example); message.multipleOf !== undefined && (obj.multipleOf = message.multipleOf); message.maximum !== undefined && (obj.maximum = message.maximum); - message.exclusiveMaximum !== undefined && (obj.exclusiveMaximum = message.exclusiveMaximum); + message.exclusiveMaximum !== undefined && + (obj.exclusiveMaximum = message.exclusiveMaximum); message.minimum !== undefined && (obj.minimum = message.minimum); - message.exclusiveMinimum !== undefined && (obj.exclusiveMinimum = message.exclusiveMinimum); - message.maxLength !== undefined && (obj.maxLength = Math.round(message.maxLength)); - message.minLength !== undefined && (obj.minLength = Math.round(message.minLength)); + message.exclusiveMinimum !== undefined && + (obj.exclusiveMinimum = message.exclusiveMinimum); + message.maxLength !== undefined && (obj.maxLength = message.maxLength); + message.minLength !== undefined && (obj.minLength = message.minLength); message.pattern !== undefined && (obj.pattern = message.pattern); - message.maxItems !== undefined && (obj.maxItems = Math.round(message.maxItems)); - message.minItems !== undefined && (obj.minItems = Math.round(message.minItems)); - message.uniqueItems !== undefined && (obj.uniqueItems = message.uniqueItems); - message.maxProperties !== undefined && (obj.maxProperties = Math.round(message.maxProperties)); - message.minProperties !== undefined && (obj.minProperties = Math.round(message.minProperties)); + message.maxItems !== undefined && (obj.maxItems = message.maxItems); + message.minItems !== undefined && (obj.minItems = message.minItems); + message.uniqueItems !== undefined && + (obj.uniqueItems = message.uniqueItems); + message.maxProperties !== undefined && + (obj.maxProperties = message.maxProperties); + message.minProperties !== undefined && + (obj.minProperties = message.minProperties); if (message.required) { - obj.required = message.required.map(e => e); + obj.required = message.required.map((e) => e); } else { obj.required = []; } if (message.array) { - obj.array = message.array.map(e => e); + obj.array = message.array.map((e) => e); } else { obj.array = []; } if (message.type) { - obj.type = message.type.map(e => jSONSchema_JSONSchemaSimpleTypesToJSON(e)); + obj.type = message.type.map((e) => + jSONSchema_JSONSchemaSimpleTypesToJSON(e) + ); } else { obj.type = []; } message.format !== undefined && (obj.format = message.format); if (message.enum) { - obj.enum = message.enum.map(e => e); + obj.enum = message.enum.map((e) => e); } else { obj.enum = []; } @@ -2948,48 +3674,158 @@ export const JSONSchema = { return obj; }, - fromPartial, I>>(object: I): JSONSchema { - const message = createBaseJSONSchema(); - message.ref = object.ref ?? ""; - message.title = object.title ?? ""; - message.description = object.description ?? ""; - message.default = object.default ?? ""; - message.readOnly = object.readOnly ?? false; - message.example = object.example ?? ""; - message.multipleOf = object.multipleOf ?? 0; - message.maximum = object.maximum ?? 0; - message.exclusiveMaximum = object.exclusiveMaximum ?? false; - message.minimum = object.minimum ?? 0; - message.exclusiveMinimum = object.exclusiveMinimum ?? false; - message.maxLength = object.maxLength ?? 0; - message.minLength = object.minLength ?? 0; - message.pattern = object.pattern ?? ""; - message.maxItems = object.maxItems ?? 0; - message.minItems = object.minItems ?? 0; - message.uniqueItems = object.uniqueItems ?? false; - message.maxProperties = object.maxProperties ?? 0; - message.minProperties = object.minProperties ?? 0; - message.required = object.required?.map(e => e) || []; - message.array = object.array?.map(e => e) || []; - message.type = object.type?.map(e => e) || []; - message.format = object.format ?? ""; - message.enum = object.enum?.map(e => e) || []; - message.fieldConfiguration = - object.fieldConfiguration !== undefined && object.fieldConfiguration !== null - ? JSONSchema_FieldConfiguration.fromPartial(object.fieldConfiguration) - : undefined; + fromPartial(object: DeepPartial): JSONSchema { + const message = { ...baseJSONSchema } as JSONSchema; + message.required = []; + message.array = []; + message.type = []; + message.enum = []; + if (object.ref !== undefined && object.ref !== null) { + message.ref = object.ref; + } else { + message.ref = ""; + } + if (object.title !== undefined && object.title !== null) { + message.title = object.title; + } else { + message.title = ""; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if (object.default !== undefined && object.default !== null) { + message.default = object.default; + } else { + message.default = ""; + } + if (object.readOnly !== undefined && object.readOnly !== null) { + message.readOnly = object.readOnly; + } else { + message.readOnly = false; + } + if (object.example !== undefined && object.example !== null) { + message.example = object.example; + } else { + message.example = ""; + } + if (object.multipleOf !== undefined && object.multipleOf !== null) { + message.multipleOf = object.multipleOf; + } else { + message.multipleOf = 0; + } + if (object.maximum !== undefined && object.maximum !== null) { + message.maximum = object.maximum; + } else { + message.maximum = 0; + } + if ( + object.exclusiveMaximum !== undefined && + object.exclusiveMaximum !== null + ) { + message.exclusiveMaximum = object.exclusiveMaximum; + } else { + message.exclusiveMaximum = false; + } + if (object.minimum !== undefined && object.minimum !== null) { + message.minimum = object.minimum; + } else { + message.minimum = 0; + } + if ( + object.exclusiveMinimum !== undefined && + object.exclusiveMinimum !== null + ) { + message.exclusiveMinimum = object.exclusiveMinimum; + } else { + message.exclusiveMinimum = false; + } + if (object.maxLength !== undefined && object.maxLength !== null) { + message.maxLength = object.maxLength; + } else { + message.maxLength = 0; + } + if (object.minLength !== undefined && object.minLength !== null) { + message.minLength = object.minLength; + } else { + message.minLength = 0; + } + if (object.pattern !== undefined && object.pattern !== null) { + message.pattern = object.pattern; + } else { + message.pattern = ""; + } + if (object.maxItems !== undefined && object.maxItems !== null) { + message.maxItems = object.maxItems; + } else { + message.maxItems = 0; + } + if (object.minItems !== undefined && object.minItems !== null) { + message.minItems = object.minItems; + } else { + message.minItems = 0; + } + if (object.uniqueItems !== undefined && object.uniqueItems !== null) { + message.uniqueItems = object.uniqueItems; + } else { + message.uniqueItems = false; + } + if (object.maxProperties !== undefined && object.maxProperties !== null) { + message.maxProperties = object.maxProperties; + } else { + message.maxProperties = 0; + } + if (object.minProperties !== undefined && object.minProperties !== null) { + message.minProperties = object.minProperties; + } else { + message.minProperties = 0; + } + if (object.required !== undefined && object.required !== null) { + for (const e of object.required) { + message.required.push(e); + } + } + if (object.array !== undefined && object.array !== null) { + for (const e of object.array) { + message.array.push(e); + } + } + if (object.type !== undefined && object.type !== null) { + for (const e of object.type) { + message.type.push(e); + } + } + if (object.format !== undefined && object.format !== null) { + message.format = object.format; + } else { + message.format = ""; + } + if (object.enum !== undefined && object.enum !== null) { + for (const e of object.enum) { + message.enum.push(e); + } + } + if ( + object.fieldConfiguration !== undefined && + object.fieldConfiguration !== null + ) { + message.fieldConfiguration = JSONSchema_FieldConfiguration.fromPartial( + object.fieldConfiguration + ); + } else { + message.fieldConfiguration = undefined; + } return message; }, }; -function createBaseJSONSchema_FieldConfiguration(): JSONSchema_FieldConfiguration { - return { pathParamName: "" }; -} +const baseJSONSchema_FieldConfiguration: object = { pathParamName: "" }; export const JSONSchema_FieldConfiguration = { encode( message: JSONSchema_FieldConfiguration, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.pathParamName !== "") { writer.uint32(378).string(message.pathParamName); @@ -2997,10 +3833,15 @@ export const JSONSchema_FieldConfiguration = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): JSONSchema_FieldConfiguration { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): JSONSchema_FieldConfiguration { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseJSONSchema_FieldConfiguration(); + const message = { + ...baseJSONSchema_FieldConfiguration, + } as JSONSchema_FieldConfiguration; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3016,29 +3857,40 @@ export const JSONSchema_FieldConfiguration = { }, fromJSON(object: any): JSONSchema_FieldConfiguration { - return { - pathParamName: isSet(object.pathParamName) ? String(object.pathParamName) : "", - }; + const message = { + ...baseJSONSchema_FieldConfiguration, + } as JSONSchema_FieldConfiguration; + if (object.pathParamName !== undefined && object.pathParamName !== null) { + message.pathParamName = String(object.pathParamName); + } else { + message.pathParamName = ""; + } + return message; }, toJSON(message: JSONSchema_FieldConfiguration): unknown { const obj: any = {}; - message.pathParamName !== undefined && (obj.pathParamName = message.pathParamName); + message.pathParamName !== undefined && + (obj.pathParamName = message.pathParamName); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): JSONSchema_FieldConfiguration { - const message = createBaseJSONSchema_FieldConfiguration(); - message.pathParamName = object.pathParamName ?? ""; + const message = { + ...baseJSONSchema_FieldConfiguration, + } as JSONSchema_FieldConfiguration; + if (object.pathParamName !== undefined && object.pathParamName !== null) { + message.pathParamName = object.pathParamName; + } else { + message.pathParamName = ""; + } return message; }, }; -function createBaseTag(): Tag { - return { description: "", externalDocs: undefined }; -} +const baseTag: object = { description: "" }; export const Tag = { encode(message: Tag, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { @@ -3046,7 +3898,10 @@ export const Tag = { writer.uint32(18).string(message.description); } if (message.externalDocs !== undefined) { - ExternalDocumentation.encode(message.externalDocs, writer.uint32(26).fork()).ldelim(); + ExternalDocumentation.encode( + message.externalDocs, + writer.uint32(26).fork() + ).ldelim(); } return writer; }, @@ -3054,7 +3909,7 @@ export const Tag = { decode(input: _m0.Reader | Uint8Array, length?: number): Tag { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTag(); + const message = { ...baseTag } as Tag; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3062,7 +3917,10 @@ export const Tag = { message.description = reader.string(); break; case 3: - message.externalDocs = ExternalDocumentation.decode(reader, reader.uint32()); + message.externalDocs = ExternalDocumentation.decode( + reader, + reader.uint32() + ); break; default: reader.skipType(tag & 7); @@ -3073,17 +3931,26 @@ export const Tag = { }, fromJSON(object: any): Tag { - return { - description: isSet(object.description) ? String(object.description) : "", - externalDocs: isSet(object.externalDocs) - ? ExternalDocumentation.fromJSON(object.externalDocs) - : undefined, - }; + const message = { ...baseTag } as Tag; + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if (object.externalDocs !== undefined && object.externalDocs !== null) { + message.externalDocs = ExternalDocumentation.fromJSON( + object.externalDocs + ); + } else { + message.externalDocs = undefined; + } + return message; }, toJSON(message: Tag): unknown { const obj: any = {}; - message.description !== undefined && (obj.description = message.description); + message.description !== undefined && + (obj.description = message.description); message.externalDocs !== undefined && (obj.externalDocs = message.externalDocs ? ExternalDocumentation.toJSON(message.externalDocs) @@ -3091,27 +3958,35 @@ export const Tag = { return obj; }, - fromPartial, I>>(object: I): Tag { - const message = createBaseTag(); - message.description = object.description ?? ""; - message.externalDocs = - object.externalDocs !== undefined && object.externalDocs !== null - ? ExternalDocumentation.fromPartial(object.externalDocs) - : undefined; + fromPartial(object: DeepPartial): Tag { + const message = { ...baseTag } as Tag; + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if (object.externalDocs !== undefined && object.externalDocs !== null) { + message.externalDocs = ExternalDocumentation.fromPartial( + object.externalDocs + ); + } else { + message.externalDocs = undefined; + } return message; }, }; -function createBaseSecurityDefinitions(): SecurityDefinitions { - return { security: {} }; -} +const baseSecurityDefinitions: object = {}; export const SecurityDefinitions = { - encode(message: SecurityDefinitions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: SecurityDefinitions, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { Object.entries(message.security).forEach(([key, value]) => { SecurityDefinitions_SecurityEntry.encode( { key: key as any, value }, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); }); return writer; @@ -3120,12 +3995,16 @@ export const SecurityDefinitions = { decode(input: _m0.Reader | Uint8Array, length?: number): SecurityDefinitions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSecurityDefinitions(); + const message = { ...baseSecurityDefinitions } as SecurityDefinitions; + message.security = {}; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - const entry1 = SecurityDefinitions_SecurityEntry.decode(reader, reader.uint32()); + const entry1 = SecurityDefinitions_SecurityEntry.decode( + reader, + reader.uint32() + ); if (entry1.value !== undefined) { message.security[entry1.key] = entry1.value; } @@ -3139,16 +4018,14 @@ export const SecurityDefinitions = { }, fromJSON(object: any): SecurityDefinitions { - return { - security: isObject(object.security) - ? Object.entries(object.security).reduce<{ - [key: string]: SecurityScheme; - }>((acc, [key, value]) => { - acc[key] = SecurityScheme.fromJSON(value); - return acc; - }, {}) - : {}, - }; + const message = { ...baseSecurityDefinitions } as SecurityDefinitions; + message.security = {}; + if (object.security !== undefined && object.security !== null) { + Object.entries(object.security).forEach(([key, value]) => { + message.security[key] = SecurityScheme.fromJSON(value); + }); + } + return message; }, toJSON(message: SecurityDefinitions): unknown { @@ -3162,30 +4039,26 @@ export const SecurityDefinitions = { return obj; }, - fromPartial, I>>( - object: I, - ): SecurityDefinitions { - const message = createBaseSecurityDefinitions(); - message.security = Object.entries(object.security ?? {}).reduce<{ - [key: string]: SecurityScheme; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = SecurityScheme.fromPartial(value); - } - return acc; - }, {}); + fromPartial(object: DeepPartial): SecurityDefinitions { + const message = { ...baseSecurityDefinitions } as SecurityDefinitions; + message.security = {}; + if (object.security !== undefined && object.security !== null) { + Object.entries(object.security).forEach(([key, value]) => { + if (value !== undefined) { + message.security[key] = SecurityScheme.fromPartial(value); + } + }); + } return message; }, }; -function createBaseSecurityDefinitions_SecurityEntry(): SecurityDefinitions_SecurityEntry { - return { key: "", value: undefined }; -} +const baseSecurityDefinitions_SecurityEntry: object = { key: "" }; export const SecurityDefinitions_SecurityEntry = { encode( message: SecurityDefinitions_SecurityEntry, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); @@ -3196,10 +4069,15 @@ export const SecurityDefinitions_SecurityEntry = { return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): SecurityDefinitions_SecurityEntry { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): SecurityDefinitions_SecurityEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSecurityDefinitions_SecurityEntry(); + const message = { + ...baseSecurityDefinitions_SecurityEntry, + } as SecurityDefinitions_SecurityEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3218,49 +4096,67 @@ export const SecurityDefinitions_SecurityEntry = { }, fromJSON(object: any): SecurityDefinitions_SecurityEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? SecurityScheme.fromJSON(object.value) : undefined, - }; + const message = { + ...baseSecurityDefinitions_SecurityEntry, + } as SecurityDefinitions_SecurityEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = SecurityScheme.fromJSON(object.value); + } else { + message.value = undefined; + } + return message; }, toJSON(message: SecurityDefinitions_SecurityEntry): unknown { const obj: any = {}; message.key !== undefined && (obj.key = message.key); message.value !== undefined && - (obj.value = message.value ? SecurityScheme.toJSON(message.value) : undefined); + (obj.value = message.value + ? SecurityScheme.toJSON(message.value) + : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): SecurityDefinitions_SecurityEntry { - const message = createBaseSecurityDefinitions_SecurityEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? SecurityScheme.fromPartial(object.value) - : undefined; + const message = { + ...baseSecurityDefinitions_SecurityEntry, + } as SecurityDefinitions_SecurityEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = SecurityScheme.fromPartial(object.value); + } else { + message.value = undefined; + } return message; }, }; -function createBaseSecurityScheme(): SecurityScheme { - return { - type: 0, - description: "", - name: "", - in: 0, - flow: 0, - authorizationUrl: "", - tokenUrl: "", - scopes: undefined, - extensions: {}, - }; -} +const baseSecurityScheme: object = { + type: 0, + description: "", + name: "", + in: 0, + flow: 0, + authorizationUrl: "", + tokenUrl: "", +}; export const SecurityScheme = { - encode(message: SecurityScheme, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: SecurityScheme, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.type !== 0) { writer.uint32(8).int32(message.type); } @@ -3286,12 +4182,10 @@ export const SecurityScheme = { Scopes.encode(message.scopes, writer.uint32(66).fork()).ldelim(); } Object.entries(message.extensions).forEach(([key, value]) => { - if (value !== undefined) { - SecurityScheme_ExtensionsEntry.encode( - { key: key as any, value }, - writer.uint32(74).fork(), - ).ldelim(); - } + SecurityScheme_ExtensionsEntry.encode( + { key: key as any, value }, + writer.uint32(74).fork() + ).ldelim(); }); return writer; }, @@ -3299,7 +4193,8 @@ export const SecurityScheme = { decode(input: _m0.Reader | Uint8Array, length?: number): SecurityScheme { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSecurityScheme(); + const message = { ...baseSecurityScheme } as SecurityScheme; + message.extensions = {}; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3328,7 +4223,10 @@ export const SecurityScheme = { message.scopes = Scopes.decode(reader, reader.uint32()); break; case 9: - const entry9 = SecurityScheme_ExtensionsEntry.decode(reader, reader.uint32()); + const entry9 = SecurityScheme_ExtensionsEntry.decode( + reader, + reader.uint32() + ); if (entry9.value !== undefined) { message.extensions[entry9.key] = entry9.value; } @@ -3342,91 +4240,165 @@ export const SecurityScheme = { }, fromJSON(object: any): SecurityScheme { - return { - type: isSet(object.type) ? securityScheme_TypeFromJSON(object.type) : 0, - description: isSet(object.description) ? String(object.description) : "", - name: isSet(object.name) ? String(object.name) : "", - in: isSet(object.in) ? securityScheme_InFromJSON(object.in) : 0, - flow: isSet(object.flow) ? securityScheme_FlowFromJSON(object.flow) : 0, - authorizationUrl: isSet(object.authorizationUrl) ? String(object.authorizationUrl) : "", - tokenUrl: isSet(object.tokenUrl) ? String(object.tokenUrl) : "", - scopes: isSet(object.scopes) ? Scopes.fromJSON(object.scopes) : undefined, - extensions: isObject(object.extensions) - ? Object.entries(object.extensions).reduce<{ [key: string]: any }>((acc, [key, value]) => { - acc[key] = value as any; - return acc; - }, {}) - : {}, - }; + const message = { ...baseSecurityScheme } as SecurityScheme; + message.extensions = {}; + if (object.type !== undefined && object.type !== null) { + message.type = securityScheme_TypeFromJSON(object.type); + } else { + message.type = 0; + } + if (object.description !== undefined && object.description !== null) { + message.description = String(object.description); + } else { + message.description = ""; + } + if (object.name !== undefined && object.name !== null) { + message.name = String(object.name); + } else { + message.name = ""; + } + if (object.in !== undefined && object.in !== null) { + message.in = securityScheme_InFromJSON(object.in); + } else { + message.in = 0; + } + if (object.flow !== undefined && object.flow !== null) { + message.flow = securityScheme_FlowFromJSON(object.flow); + } else { + message.flow = 0; + } + if ( + object.authorizationUrl !== undefined && + object.authorizationUrl !== null + ) { + message.authorizationUrl = String(object.authorizationUrl); + } else { + message.authorizationUrl = ""; + } + if (object.tokenUrl !== undefined && object.tokenUrl !== null) { + message.tokenUrl = String(object.tokenUrl); + } else { + message.tokenUrl = ""; + } + if (object.scopes !== undefined && object.scopes !== null) { + message.scopes = Scopes.fromJSON(object.scopes); + } else { + message.scopes = undefined; + } + if (object.extensions !== undefined && object.extensions !== null) { + Object.entries(object.extensions).forEach(([key, value]) => { + message.extensions[key] = Value.fromJSON(value); + }); + } + return message; }, toJSON(message: SecurityScheme): unknown { const obj: any = {}; - message.type !== undefined && (obj.type = securityScheme_TypeToJSON(message.type)); - message.description !== undefined && (obj.description = message.description); + message.type !== undefined && + (obj.type = securityScheme_TypeToJSON(message.type)); + message.description !== undefined && + (obj.description = message.description); message.name !== undefined && (obj.name = message.name); message.in !== undefined && (obj.in = securityScheme_InToJSON(message.in)); - message.flow !== undefined && (obj.flow = securityScheme_FlowToJSON(message.flow)); - message.authorizationUrl !== undefined && (obj.authorizationUrl = message.authorizationUrl); + message.flow !== undefined && + (obj.flow = securityScheme_FlowToJSON(message.flow)); + message.authorizationUrl !== undefined && + (obj.authorizationUrl = message.authorizationUrl); message.tokenUrl !== undefined && (obj.tokenUrl = message.tokenUrl); message.scopes !== undefined && (obj.scopes = message.scopes ? Scopes.toJSON(message.scopes) : undefined); obj.extensions = {}; if (message.extensions) { Object.entries(message.extensions).forEach(([k, v]) => { - obj.extensions[k] = v; + obj.extensions[k] = Value.toJSON(v); }); } return obj; }, - fromPartial, I>>(object: I): SecurityScheme { - const message = createBaseSecurityScheme(); - message.type = object.type ?? 0; - message.description = object.description ?? ""; - message.name = object.name ?? ""; - message.in = object.in ?? 0; - message.flow = object.flow ?? 0; - message.authorizationUrl = object.authorizationUrl ?? ""; - message.tokenUrl = object.tokenUrl ?? ""; - message.scopes = - object.scopes !== undefined && object.scopes !== null - ? Scopes.fromPartial(object.scopes) - : undefined; - message.extensions = Object.entries(object.extensions ?? {}).reduce<{ - [key: string]: any; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = value; - } - return acc; - }, {}); + fromPartial(object: DeepPartial): SecurityScheme { + const message = { ...baseSecurityScheme } as SecurityScheme; + message.extensions = {}; + if (object.type !== undefined && object.type !== null) { + message.type = object.type; + } else { + message.type = 0; + } + if (object.description !== undefined && object.description !== null) { + message.description = object.description; + } else { + message.description = ""; + } + if (object.name !== undefined && object.name !== null) { + message.name = object.name; + } else { + message.name = ""; + } + if (object.in !== undefined && object.in !== null) { + message.in = object.in; + } else { + message.in = 0; + } + if (object.flow !== undefined && object.flow !== null) { + message.flow = object.flow; + } else { + message.flow = 0; + } + if ( + object.authorizationUrl !== undefined && + object.authorizationUrl !== null + ) { + message.authorizationUrl = object.authorizationUrl; + } else { + message.authorizationUrl = ""; + } + if (object.tokenUrl !== undefined && object.tokenUrl !== null) { + message.tokenUrl = object.tokenUrl; + } else { + message.tokenUrl = ""; + } + if (object.scopes !== undefined && object.scopes !== null) { + message.scopes = Scopes.fromPartial(object.scopes); + } else { + message.scopes = undefined; + } + if (object.extensions !== undefined && object.extensions !== null) { + Object.entries(object.extensions).forEach(([key, value]) => { + if (value !== undefined) { + message.extensions[key] = Value.fromPartial(value); + } + }); + } return message; }, }; -function createBaseSecurityScheme_ExtensionsEntry(): SecurityScheme_ExtensionsEntry { - return { key: "", value: undefined }; -} +const baseSecurityScheme_ExtensionsEntry: object = { key: "" }; export const SecurityScheme_ExtensionsEntry = { encode( message: SecurityScheme_ExtensionsEntry, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { - Value.encode(Value.wrap(message.value), writer.uint32(18).fork()).ldelim(); + Value.encode(message.value, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode(input: _m0.Reader | Uint8Array, length?: number): SecurityScheme_ExtensionsEntry { + decode( + input: _m0.Reader | Uint8Array, + length?: number + ): SecurityScheme_ExtensionsEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSecurityScheme_ExtensionsEntry(); + const message = { + ...baseSecurityScheme_ExtensionsEntry, + } as SecurityScheme_ExtensionsEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3434,7 +4406,7 @@ export const SecurityScheme_ExtensionsEntry = { message.key = reader.string(); break; case 2: - message.value = Value.unwrap(Value.decode(reader, reader.uint32())); + message.value = Value.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3445,39 +4417,61 @@ export const SecurityScheme_ExtensionsEntry = { }, fromJSON(object: any): SecurityScheme_ExtensionsEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object?.value) ? object.value : undefined, - }; + const message = { + ...baseSecurityScheme_ExtensionsEntry, + } as SecurityScheme_ExtensionsEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Value.fromJSON(object.value); + } else { + message.value = undefined; + } + return message; }, toJSON(message: SecurityScheme_ExtensionsEntry): unknown { const obj: any = {}; message.key !== undefined && (obj.key = message.key); - message.value !== undefined && (obj.value = message.value); + message.value !== undefined && + (obj.value = message.value ? Value.toJSON(message.value) : undefined); return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): SecurityScheme_ExtensionsEntry { - const message = createBaseSecurityScheme_ExtensionsEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? undefined; + const message = { + ...baseSecurityScheme_ExtensionsEntry, + } as SecurityScheme_ExtensionsEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = Value.fromPartial(object.value); + } else { + message.value = undefined; + } return message; }, }; -function createBaseSecurityRequirement(): SecurityRequirement { - return { securityRequirement: {} }; -} +const baseSecurityRequirement: object = {}; export const SecurityRequirement = { - encode(message: SecurityRequirement, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: SecurityRequirement, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { Object.entries(message.securityRequirement).forEach(([key, value]) => { SecurityRequirement_SecurityRequirementEntry.encode( { key: key as any, value }, - writer.uint32(10).fork(), + writer.uint32(10).fork() ).ldelim(); }); return writer; @@ -3486,14 +4480,15 @@ export const SecurityRequirement = { decode(input: _m0.Reader | Uint8Array, length?: number): SecurityRequirement { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSecurityRequirement(); + const message = { ...baseSecurityRequirement } as SecurityRequirement; + message.securityRequirement = {}; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { case 1: const entry1 = SecurityRequirement_SecurityRequirementEntry.decode( reader, - reader.uint32(), + reader.uint32() ); if (entry1.value !== undefined) { message.securityRequirement[entry1.key] = entry1.value; @@ -3508,16 +4503,18 @@ export const SecurityRequirement = { }, fromJSON(object: any): SecurityRequirement { - return { - securityRequirement: isObject(object.securityRequirement) - ? Object.entries(object.securityRequirement).reduce<{ - [key: string]: SecurityRequirement_SecurityRequirementValue; - }>((acc, [key, value]) => { - acc[key] = SecurityRequirement_SecurityRequirementValue.fromJSON(value); - return acc; - }, {}) - : {}, - }; + const message = { ...baseSecurityRequirement } as SecurityRequirement; + message.securityRequirement = {}; + if ( + object.securityRequirement !== undefined && + object.securityRequirement !== null + ) { + Object.entries(object.securityRequirement).forEach(([key, value]) => { + message.securityRequirement[key] = + SecurityRequirement_SecurityRequirementValue.fromJSON(value); + }); + } + return message; }, toJSON(message: SecurityRequirement): unknown { @@ -3525,36 +4522,37 @@ export const SecurityRequirement = { obj.securityRequirement = {}; if (message.securityRequirement) { Object.entries(message.securityRequirement).forEach(([k, v]) => { - obj.securityRequirement[k] = SecurityRequirement_SecurityRequirementValue.toJSON(v); + obj.securityRequirement[k] = + SecurityRequirement_SecurityRequirementValue.toJSON(v); }); } return obj; }, - fromPartial, I>>( - object: I, - ): SecurityRequirement { - const message = createBaseSecurityRequirement(); - message.securityRequirement = Object.entries(object.securityRequirement ?? {}).reduce<{ - [key: string]: SecurityRequirement_SecurityRequirementValue; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = SecurityRequirement_SecurityRequirementValue.fromPartial(value); - } - return acc; - }, {}); + fromPartial(object: DeepPartial): SecurityRequirement { + const message = { ...baseSecurityRequirement } as SecurityRequirement; + message.securityRequirement = {}; + if ( + object.securityRequirement !== undefined && + object.securityRequirement !== null + ) { + Object.entries(object.securityRequirement).forEach(([key, value]) => { + if (value !== undefined) { + message.securityRequirement[key] = + SecurityRequirement_SecurityRequirementValue.fromPartial(value); + } + }); + } return message; }, }; -function createBaseSecurityRequirement_SecurityRequirementValue(): SecurityRequirement_SecurityRequirementValue { - return { scope: [] }; -} +const baseSecurityRequirement_SecurityRequirementValue: object = { scope: "" }; export const SecurityRequirement_SecurityRequirementValue = { encode( message: SecurityRequirement_SecurityRequirementValue, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { for (const v of message.scope) { writer.uint32(10).string(v!); @@ -3564,11 +4562,14 @@ export const SecurityRequirement_SecurityRequirementValue = { decode( input: _m0.Reader | Uint8Array, - length?: number, + length?: number ): SecurityRequirement_SecurityRequirementValue { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSecurityRequirement_SecurityRequirementValue(); + const message = { + ...baseSecurityRequirement_SecurityRequirementValue, + } as SecurityRequirement_SecurityRequirementValue; + message.scope = []; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3584,38 +4585,50 @@ export const SecurityRequirement_SecurityRequirementValue = { }, fromJSON(object: any): SecurityRequirement_SecurityRequirementValue { - return { - scope: Array.isArray(object?.scope) ? object.scope.map((e: any) => String(e)) : [], - }; + const message = { + ...baseSecurityRequirement_SecurityRequirementValue, + } as SecurityRequirement_SecurityRequirementValue; + message.scope = []; + if (object.scope !== undefined && object.scope !== null) { + for (const e of object.scope) { + message.scope.push(String(e)); + } + } + return message; }, toJSON(message: SecurityRequirement_SecurityRequirementValue): unknown { const obj: any = {}; if (message.scope) { - obj.scope = message.scope.map(e => e); + obj.scope = message.scope.map((e) => e); } else { obj.scope = []; } return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): SecurityRequirement_SecurityRequirementValue { - const message = createBaseSecurityRequirement_SecurityRequirementValue(); - message.scope = object.scope?.map(e => e) || []; + const message = { + ...baseSecurityRequirement_SecurityRequirementValue, + } as SecurityRequirement_SecurityRequirementValue; + message.scope = []; + if (object.scope !== undefined && object.scope !== null) { + for (const e of object.scope) { + message.scope.push(e); + } + } return message; }, }; -function createBaseSecurityRequirement_SecurityRequirementEntry(): SecurityRequirement_SecurityRequirementEntry { - return { key: "", value: undefined }; -} +const baseSecurityRequirement_SecurityRequirementEntry: object = { key: "" }; export const SecurityRequirement_SecurityRequirementEntry = { encode( message: SecurityRequirement_SecurityRequirementEntry, - writer: _m0.Writer = _m0.Writer.create(), + writer: _m0.Writer = _m0.Writer.create() ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); @@ -3623,7 +4636,7 @@ export const SecurityRequirement_SecurityRequirementEntry = { if (message.value !== undefined) { SecurityRequirement_SecurityRequirementValue.encode( message.value, - writer.uint32(18).fork(), + writer.uint32(18).fork() ).ldelim(); } return writer; @@ -3631,11 +4644,13 @@ export const SecurityRequirement_SecurityRequirementEntry = { decode( input: _m0.Reader | Uint8Array, - length?: number, + length?: number ): SecurityRequirement_SecurityRequirementEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSecurityRequirement_SecurityRequirementEntry(); + const message = { + ...baseSecurityRequirement_SecurityRequirementEntry, + } as SecurityRequirement_SecurityRequirementEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3645,7 +4660,7 @@ export const SecurityRequirement_SecurityRequirementEntry = { case 2: message.value = SecurityRequirement_SecurityRequirementValue.decode( reader, - reader.uint32(), + reader.uint32() ); break; default: @@ -3657,12 +4672,22 @@ export const SecurityRequirement_SecurityRequirementEntry = { }, fromJSON(object: any): SecurityRequirement_SecurityRequirementEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) - ? SecurityRequirement_SecurityRequirementValue.fromJSON(object.value) - : undefined, - }; + const message = { + ...baseSecurityRequirement_SecurityRequirementEntry, + } as SecurityRequirement_SecurityRequirementEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = SecurityRequirement_SecurityRequirementValue.fromJSON( + object.value + ); + } else { + message.value = undefined; + } + return message; }, toJSON(message: SecurityRequirement_SecurityRequirementEntry): unknown { @@ -3675,27 +4700,40 @@ export const SecurityRequirement_SecurityRequirementEntry = { return obj; }, - fromPartial, I>>( - object: I, + fromPartial( + object: DeepPartial ): SecurityRequirement_SecurityRequirementEntry { - const message = createBaseSecurityRequirement_SecurityRequirementEntry(); - message.key = object.key ?? ""; - message.value = - object.value !== undefined && object.value !== null - ? SecurityRequirement_SecurityRequirementValue.fromPartial(object.value) - : undefined; + const message = { + ...baseSecurityRequirement_SecurityRequirementEntry, + } as SecurityRequirement_SecurityRequirementEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = SecurityRequirement_SecurityRequirementValue.fromPartial( + object.value + ); + } else { + message.value = undefined; + } return message; }, }; -function createBaseScopes(): Scopes { - return { scope: {} }; -} +const baseScopes: object = {}; export const Scopes = { - encode(message: Scopes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Scopes, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { Object.entries(message.scope).forEach(([key, value]) => { - Scopes_ScopeEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).ldelim(); + Scopes_ScopeEntry.encode( + { key: key as any, value }, + writer.uint32(10).fork() + ).ldelim(); }); return writer; }, @@ -3703,7 +4741,8 @@ export const Scopes = { decode(input: _m0.Reader | Uint8Array, length?: number): Scopes { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseScopes(); + const message = { ...baseScopes } as Scopes; + message.scope = {}; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3722,14 +4761,14 @@ export const Scopes = { }, fromJSON(object: any): Scopes { - return { - scope: isObject(object.scope) - ? Object.entries(object.scope).reduce<{ [key: string]: string }>((acc, [key, value]) => { - acc[key] = String(value); - return acc; - }, {}) - : {}, - }; + const message = { ...baseScopes } as Scopes; + message.scope = {}; + if (object.scope !== undefined && object.scope !== null) { + Object.entries(object.scope).forEach(([key, value]) => { + message.scope[key] = String(value); + }); + } + return message; }, toJSON(message: Scopes): unknown { @@ -3743,26 +4782,27 @@ export const Scopes = { return obj; }, - fromPartial, I>>(object: I): Scopes { - const message = createBaseScopes(); - message.scope = Object.entries(object.scope ?? {}).reduce<{ - [key: string]: string; - }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = String(value); - } - return acc; - }, {}); + fromPartial(object: DeepPartial): Scopes { + const message = { ...baseScopes } as Scopes; + message.scope = {}; + if (object.scope !== undefined && object.scope !== null) { + Object.entries(object.scope).forEach(([key, value]) => { + if (value !== undefined) { + message.scope[key] = String(value); + } + }); + } return message; }, }; -function createBaseScopes_ScopeEntry(): Scopes_ScopeEntry { - return { key: "", value: "" }; -} +const baseScopes_ScopeEntry: object = { key: "", value: "" }; export const Scopes_ScopeEntry = { - encode(message: Scopes_ScopeEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + encode( + message: Scopes_ScopeEntry, + writer: _m0.Writer = _m0.Writer.create() + ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -3775,7 +4815,7 @@ export const Scopes_ScopeEntry = { decode(input: _m0.Reader | Uint8Array, length?: number): Scopes_ScopeEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseScopes_ScopeEntry(); + const message = { ...baseScopes_ScopeEntry } as Scopes_ScopeEntry; while (reader.pos < end) { const tag = reader.uint32(); switch (tag >>> 3) { @@ -3794,10 +4834,18 @@ export const Scopes_ScopeEntry = { }, fromJSON(object: any): Scopes_ScopeEntry { - return { - key: isSet(object.key) ? String(object.key) : "", - value: isSet(object.value) ? String(object.value) : "", - }; + const message = { ...baseScopes_ScopeEntry } as Scopes_ScopeEntry; + if (object.key !== undefined && object.key !== null) { + message.key = String(object.key); + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = String(object.value); + } else { + message.value = ""; + } + return message; }, toJSON(message: Scopes_ScopeEntry): unknown { @@ -3807,10 +4855,18 @@ export const Scopes_ScopeEntry = { return obj; }, - fromPartial, I>>(object: I): Scopes_ScopeEntry { - const message = createBaseScopes_ScopeEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? ""; + fromPartial(object: DeepPartial): Scopes_ScopeEntry { + const message = { ...baseScopes_ScopeEntry } as Scopes_ScopeEntry; + if (object.key !== undefined && object.key !== null) { + message.key = object.key; + } else { + message.key = ""; + } + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = ""; + } return message; }, }; @@ -3826,8 +4882,14 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - +type Builtin = + | Date + | Function + | Uint8Array + | string + | number + | boolean + | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array @@ -3838,11 +4900,6 @@ export type DeepPartial = T extends Builtin ? { [K in keyof T]?: DeepPartial } : Partial; -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin - ? P - : P & { [K in keyof P]: Exact } & Record>, never>; - function longToNumber(long: Long): number { if (long.gt(Number.MAX_SAFE_INTEGER)) { throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); @@ -3854,11 +4911,3 @@ if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; _m0.configure(); } - -function isObject(value: any): boolean { - return typeof value === "object" && value !== null; -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/script/makefiles/deploy-dev.mk b/script/makefiles/deploy-dev.mk index cc4417ff52f..5177cf0543e 100644 --- a/script/makefiles/deploy-dev.mk +++ b/script/makefiles/deploy-dev.mk @@ -61,7 +61,7 @@ deploy-kapp-controller: # Add the flux controllers used for testing the kubeapps-apis integration. deploy-flux-controllers: - kubectl --kubeconfig=${CLUSTER_CONFIG} apply -f https://github.com/fluxcd/flux2/releases/download/v0.28.4/install.yaml + kubectl --kubeconfig=${CLUSTER_CONFIG} apply -f https://github.com/fluxcd/flux2/releases/download/v0.28.5/install.yaml reset-dev: helm --kubeconfig=${CLUSTER_CONFIG} -n kubeapps delete kubeapps || true From d763a2d932fafa5ede96609527d807a61caa9709 Mon Sep 17 00:00:00 2001 From: gfichtenholt Date: Thu, 7 Apr 2022 20:40:58 -0700 Subject: [PATCH 07/11] +yarn prettier --- dashboard/src/gen/google/api/http.ts | 60 +- dashboard/src/gen/google/protobuf/any.ts | 19 +- .../src/gen/google/protobuf/descriptor.ts | 1010 +++------- dashboard/src/gen/google/protobuf/struct.ts | 49 +- .../core/packages/v1alpha1/packages.ts | 1774 ++++++----------- .../core/packages/v1alpha1/repositories.ts | 808 +++----- .../core/plugins/v1alpha1/plugins.ts | 101 +- .../fluxv2/packages/v1alpha1/fluxv2.ts | 711 ++++--- .../plugins/helm/packages/v1alpha1/helm.ts | 622 +++--- .../packages/v1alpha1/kapp_controller.ts | 308 ++- .../plugins/resources/v1alpha1/resources.ts | 421 ++-- .../protoc-gen-openapiv2/options/openapiv2.ts | 613 ++---- 12 files changed, 2167 insertions(+), 4329 deletions(-) diff --git a/dashboard/src/gen/google/api/http.ts b/dashboard/src/gen/google/api/http.ts index 06d19d94ef7..c22448eb788 100644 --- a/dashboard/src/gen/google/api/http.ts +++ b/dashboard/src/gen/google/api/http.ts @@ -406,9 +406,7 @@ export const Http = { object.fullyDecodeReservedExpansion !== undefined && object.fullyDecodeReservedExpansion !== null ) { - message.fullyDecodeReservedExpansion = Boolean( - object.fullyDecodeReservedExpansion - ); + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); } else { message.fullyDecodeReservedExpansion = false; } @@ -418,9 +416,7 @@ export const Http = { toJSON(message: Http): unknown { const obj: any = {}; if (message.rules) { - obj.rules = message.rules.map((e) => - e ? HttpRule.toJSON(e) : undefined - ); + obj.rules = message.rules.map(e => (e ? HttpRule.toJSON(e) : undefined)); } else { obj.rules = []; } @@ -441,8 +437,7 @@ export const Http = { object.fullyDecodeReservedExpansion !== undefined && object.fullyDecodeReservedExpansion !== null ) { - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion; + message.fullyDecodeReservedExpansion = object.fullyDecodeReservedExpansion; } else { message.fullyDecodeReservedExpansion = false; } @@ -453,10 +448,7 @@ export const Http = { const baseHttpRule: object = { selector: "", body: "", responseBody: "" }; export const HttpRule = { - encode( - message: HttpRule, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: HttpRule, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.selector !== "") { writer.uint32(10).string(message.selector); } @@ -476,10 +468,7 @@ export const HttpRule = { writer.uint32(50).string(message.patch); } if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork() - ).ldelim(); + CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); } if (message.body !== "") { writer.uint32(58).string(message.body); @@ -529,9 +518,7 @@ export const HttpRule = { message.responseBody = reader.string(); break; case 11: - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()) - ); + message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -589,10 +576,7 @@ export const HttpRule = { } else { message.responseBody = ""; } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { + if (object.additionalBindings !== undefined && object.additionalBindings !== null) { for (const e of object.additionalBindings) { message.additionalBindings.push(HttpRule.fromJSON(e)); } @@ -609,15 +593,12 @@ export const HttpRule = { message.delete !== undefined && (obj.delete = message.delete); message.patch !== undefined && (obj.patch = message.patch); message.custom !== undefined && - (obj.custom = message.custom - ? CustomHttpPattern.toJSON(message.custom) - : undefined); + (obj.custom = message.custom ? CustomHttpPattern.toJSON(message.custom) : undefined); message.body !== undefined && (obj.body = message.body); - message.responseBody !== undefined && - (obj.responseBody = message.responseBody); + message.responseBody !== undefined && (obj.responseBody = message.responseBody); if (message.additionalBindings) { - obj.additionalBindings = message.additionalBindings.map((e) => - e ? HttpRule.toJSON(e) : undefined + obj.additionalBindings = message.additionalBindings.map(e => + e ? HttpRule.toJSON(e) : undefined, ); } else { obj.additionalBindings = []; @@ -673,10 +654,7 @@ export const HttpRule = { } else { message.responseBody = ""; } - if ( - object.additionalBindings !== undefined && - object.additionalBindings !== null - ) { + if (object.additionalBindings !== undefined && object.additionalBindings !== null) { for (const e of object.additionalBindings) { message.additionalBindings.push(HttpRule.fromPartial(e)); } @@ -688,10 +666,7 @@ export const HttpRule = { const baseCustomHttpPattern: object = { kind: "", path: "" }; export const CustomHttpPattern = { - encode( - message: CustomHttpPattern, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CustomHttpPattern, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.kind !== "") { writer.uint32(10).string(message.kind); } @@ -760,14 +735,7 @@ export const CustomHttpPattern = { }, }; -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array diff --git a/dashboard/src/gen/google/protobuf/any.ts b/dashboard/src/gen/google/protobuf/any.ts index 9bd0cd5595e..e58955be721 100644 --- a/dashboard/src/gen/google/protobuf/any.ts +++ b/dashboard/src/gen/google/protobuf/any.ts @@ -176,9 +176,7 @@ export const Any = { const obj: any = {}; message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl); message.value !== undefined && - (obj.value = base64FromBytes( - message.value !== undefined ? message.value : new Uint8Array() - )); + (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); return obj; }, @@ -210,8 +208,7 @@ var globalThis: any = (() => { })(); const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); + globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -222,8 +219,7 @@ function bytesFromBase64(b64: string): Uint8Array { } const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); + globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; for (const byte of arr) { @@ -232,14 +228,7 @@ function base64FromBytes(arr: Uint8Array): string { return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array diff --git a/dashboard/src/gen/google/protobuf/descriptor.ts b/dashboard/src/gen/google/protobuf/descriptor.ts index fce6f9d004d..02065233855 100644 --- a/dashboard/src/gen/google/protobuf/descriptor.ts +++ b/dashboard/src/gen/google/protobuf/descriptor.ts @@ -204,9 +204,7 @@ export enum FieldDescriptorProto_Type { UNRECOGNIZED = -1, } -export function fieldDescriptorProto_TypeFromJSON( - object: any -): FieldDescriptorProto_Type { +export function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type { switch (object) { case 1: case "TYPE_DOUBLE": @@ -269,9 +267,7 @@ export function fieldDescriptorProto_TypeFromJSON( } } -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type -): string { +export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string { switch (object) { case FieldDescriptorProto_Type.TYPE_DOUBLE: return "TYPE_DOUBLE"; @@ -322,9 +318,7 @@ export enum FieldDescriptorProto_Label { UNRECOGNIZED = -1, } -export function fieldDescriptorProto_LabelFromJSON( - object: any -): FieldDescriptorProto_Label { +export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label { switch (object) { case 1: case "LABEL_OPTIONAL": @@ -342,9 +336,7 @@ export function fieldDescriptorProto_LabelFromJSON( } } -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label -): string { +export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string { switch (object) { case FieldDescriptorProto_Label.LABEL_OPTIONAL: return "LABEL_OPTIONAL"; @@ -558,9 +550,7 @@ export enum FileOptions_OptimizeMode { UNRECOGNIZED = -1, } -export function fileOptions_OptimizeModeFromJSON( - object: any -): FileOptions_OptimizeMode { +export function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode { switch (object) { case 1: case "SPEED": @@ -578,9 +568,7 @@ export function fileOptions_OptimizeModeFromJSON( } } -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode -): string { +export function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string { switch (object) { case FileOptions_OptimizeMode.SPEED: return "SPEED"; @@ -884,7 +872,7 @@ export enum MethodOptions_IdempotencyLevel { } export function methodOptions_IdempotencyLevelFromJSON( - object: any + object: any, ): MethodOptions_IdempotencyLevel { switch (object) { case 0: @@ -904,7 +892,7 @@ export function methodOptions_IdempotencyLevelFromJSON( } export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel + object: MethodOptions_IdempotencyLevel, ): string { switch (object) { case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: @@ -1131,10 +1119,7 @@ export interface GeneratedCodeInfo_Annotation { const baseFileDescriptorSet: object = {}; export const FileDescriptorSet = { - encode( - message: FileDescriptorSet, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: FileDescriptorSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.file) { FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -1150,9 +1135,7 @@ export const FileDescriptorSet = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()) - ); + message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -1176,9 +1159,7 @@ export const FileDescriptorSet = { toJSON(message: FileDescriptorSet): unknown { const obj: any = {}; if (message.file) { - obj.file = message.file.map((e) => - e ? FileDescriptorProto.toJSON(e) : undefined - ); + obj.file = message.file.map(e => (e ? FileDescriptorProto.toJSON(e) : undefined)); } else { obj.file = []; } @@ -1207,10 +1188,7 @@ const baseFileDescriptorProto: object = { }; export const FileDescriptorProto = { - encode( - message: FileDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: FileDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -1246,10 +1224,7 @@ export const FileDescriptorProto = { FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); } if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork() - ).ldelim(); + SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); } if (message.syntax !== "") { writer.uint32(98).string(message.syntax); @@ -1301,33 +1276,22 @@ export const FileDescriptorProto = { } break; case 4: - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); + message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); break; case 5: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); + message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); break; case 6: - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()) - ); + message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); break; case 7: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); + message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); break; case 8: message.options = FileOptions.decode(reader, reader.uint32()); break; case 9: - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32() - ); + message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); break; case 12: message.syntax = reader.string(); @@ -1364,10 +1328,7 @@ export const FileDescriptorProto = { message.dependency.push(String(e)); } } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { + if (object.publicDependency !== undefined && object.publicDependency !== null) { for (const e of object.publicDependency) { message.publicDependency.push(Number(e)); } @@ -1420,52 +1381,42 @@ export const FileDescriptorProto = { message.name !== undefined && (obj.name = message.name); message.package !== undefined && (obj.package = message.package); if (message.dependency) { - obj.dependency = message.dependency.map((e) => e); + obj.dependency = message.dependency.map(e => e); } else { obj.dependency = []; } if (message.publicDependency) { - obj.publicDependency = message.publicDependency.map((e) => e); + obj.publicDependency = message.publicDependency.map(e => e); } else { obj.publicDependency = []; } if (message.weakDependency) { - obj.weakDependency = message.weakDependency.map((e) => e); + obj.weakDependency = message.weakDependency.map(e => e); } else { obj.weakDependency = []; } if (message.messageType) { - obj.messageType = message.messageType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); + obj.messageType = message.messageType.map(e => (e ? DescriptorProto.toJSON(e) : undefined)); } else { obj.messageType = []; } if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); + obj.enumType = message.enumType.map(e => (e ? EnumDescriptorProto.toJSON(e) : undefined)); } else { obj.enumType = []; } if (message.service) { - obj.service = message.service.map((e) => - e ? ServiceDescriptorProto.toJSON(e) : undefined - ); + obj.service = message.service.map(e => (e ? ServiceDescriptorProto.toJSON(e) : undefined)); } else { obj.service = []; } if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); + obj.extension = message.extension.map(e => (e ? FieldDescriptorProto.toJSON(e) : undefined)); } else { obj.extension = []; } message.options !== undefined && - (obj.options = message.options - ? FileOptions.toJSON(message.options) - : undefined); + (obj.options = message.options ? FileOptions.toJSON(message.options) : undefined); message.sourceCodeInfo !== undefined && (obj.sourceCodeInfo = message.sourceCodeInfo ? SourceCodeInfo.toJSON(message.sourceCodeInfo) @@ -1498,10 +1449,7 @@ export const FileDescriptorProto = { message.dependency.push(e); } } - if ( - object.publicDependency !== undefined && - object.publicDependency !== null - ) { + if (object.publicDependency !== undefined && object.publicDependency !== null) { for (const e of object.publicDependency) { message.publicDependency.push(e); } @@ -1537,9 +1485,7 @@ export const FileDescriptorProto = { message.options = undefined; } if (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) { - message.sourceCodeInfo = SourceCodeInfo.fromPartial( - object.sourceCodeInfo - ); + message.sourceCodeInfo = SourceCodeInfo.fromPartial(object.sourceCodeInfo); } else { message.sourceCodeInfo = undefined; } @@ -1555,10 +1501,7 @@ export const FileDescriptorProto = { const baseDescriptorProto: object = { name: "", reservedName: "" }; export const DescriptorProto = { - encode( - message: DescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -1575,10 +1518,7 @@ export const DescriptorProto = { EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); } for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork() - ).ldelim(); + DescriptorProto_ExtensionRange.encode(v!, writer.uint32(42).fork()).ldelim(); } for (const v of message.oneofDecl) { OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); @@ -1587,10 +1527,7 @@ export const DescriptorProto = { MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); } for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork() - ).ldelim(); + DescriptorProto_ReservedRange.encode(v!, writer.uint32(74).fork()).ldelim(); } for (const v of message.reservedName) { writer.uint32(82).string(v!); @@ -1617,42 +1554,30 @@ export const DescriptorProto = { message.name = reader.string(); break; case 2: - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); + message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); break; case 6: - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()) - ); + message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); break; case 3: - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()) - ); + message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); break; case 4: - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()) - ); + message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); break; case 5: message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()) + DescriptorProto_ExtensionRange.decode(reader, reader.uint32()), ); break; case 8: - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()) - ); + message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); break; case 7: message.options = MessageOptions.decode(reader, reader.uint32()); break; case 9: - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()) - ); + message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); break; case 10: message.reservedName.push(reader.string()); @@ -1732,60 +1657,48 @@ export const DescriptorProto = { const obj: any = {}; message.name !== undefined && (obj.name = message.name); if (message.field) { - obj.field = message.field.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); + obj.field = message.field.map(e => (e ? FieldDescriptorProto.toJSON(e) : undefined)); } else { obj.field = []; } if (message.extension) { - obj.extension = message.extension.map((e) => - e ? FieldDescriptorProto.toJSON(e) : undefined - ); + obj.extension = message.extension.map(e => (e ? FieldDescriptorProto.toJSON(e) : undefined)); } else { obj.extension = []; } if (message.nestedType) { - obj.nestedType = message.nestedType.map((e) => - e ? DescriptorProto.toJSON(e) : undefined - ); + obj.nestedType = message.nestedType.map(e => (e ? DescriptorProto.toJSON(e) : undefined)); } else { obj.nestedType = []; } if (message.enumType) { - obj.enumType = message.enumType.map((e) => - e ? EnumDescriptorProto.toJSON(e) : undefined - ); + obj.enumType = message.enumType.map(e => (e ? EnumDescriptorProto.toJSON(e) : undefined)); } else { obj.enumType = []; } if (message.extensionRange) { - obj.extensionRange = message.extensionRange.map((e) => - e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined + obj.extensionRange = message.extensionRange.map(e => + e ? DescriptorProto_ExtensionRange.toJSON(e) : undefined, ); } else { obj.extensionRange = []; } if (message.oneofDecl) { - obj.oneofDecl = message.oneofDecl.map((e) => - e ? OneofDescriptorProto.toJSON(e) : undefined - ); + obj.oneofDecl = message.oneofDecl.map(e => (e ? OneofDescriptorProto.toJSON(e) : undefined)); } else { obj.oneofDecl = []; } message.options !== undefined && - (obj.options = message.options - ? MessageOptions.toJSON(message.options) - : undefined); + (obj.options = message.options ? MessageOptions.toJSON(message.options) : undefined); if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? DescriptorProto_ReservedRange.toJSON(e) : undefined + obj.reservedRange = message.reservedRange.map(e => + e ? DescriptorProto_ReservedRange.toJSON(e) : undefined, ); } else { obj.reservedRange = []; } if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); + obj.reservedName = message.reservedName.map(e => e); } else { obj.reservedName = []; } @@ -1829,9 +1742,7 @@ export const DescriptorProto = { } if (object.extensionRange !== undefined && object.extensionRange !== null) { for (const e of object.extensionRange) { - message.extensionRange.push( - DescriptorProto_ExtensionRange.fromPartial(e) - ); + message.extensionRange.push(DescriptorProto_ExtensionRange.fromPartial(e)); } } if (object.oneofDecl !== undefined && object.oneofDecl !== null) { @@ -1846,9 +1757,7 @@ export const DescriptorProto = { } if (object.reservedRange !== undefined && object.reservedRange !== null) { for (const e of object.reservedRange) { - message.reservedRange.push( - DescriptorProto_ReservedRange.fromPartial(e) - ); + message.reservedRange.push(DescriptorProto_ReservedRange.fromPartial(e)); } } if (object.reservedName !== undefined && object.reservedName !== null) { @@ -1865,7 +1774,7 @@ const baseDescriptorProto_ExtensionRange: object = { start: 0, end: 0 }; export const DescriptorProto_ExtensionRange = { encode( message: DescriptorProto_ExtensionRange, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.start !== 0) { writer.uint32(8).int32(message.start); @@ -1874,18 +1783,12 @@ export const DescriptorProto_ExtensionRange = { writer.uint32(16).int32(message.end); } if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); + ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): DescriptorProto_ExtensionRange { + decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1901,10 +1804,7 @@ export const DescriptorProto_ExtensionRange = { message.end = reader.int32(); break; case 3: - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32() - ); + message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1941,15 +1841,11 @@ export const DescriptorProto_ExtensionRange = { message.start !== undefined && (obj.start = message.start); message.end !== undefined && (obj.end = message.end); message.options !== undefined && - (obj.options = message.options - ? ExtensionRangeOptions.toJSON(message.options) - : undefined); + (obj.options = message.options ? ExtensionRangeOptions.toJSON(message.options) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): DescriptorProto_ExtensionRange { + fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange { const message = { ...baseDescriptorProto_ExtensionRange, } as DescriptorProto_ExtensionRange; @@ -1977,7 +1873,7 @@ const baseDescriptorProto_ReservedRange: object = { start: 0, end: 0 }; export const DescriptorProto_ReservedRange = { encode( message: DescriptorProto_ReservedRange, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.start !== 0) { writer.uint32(8).int32(message.start); @@ -1988,10 +1884,7 @@ export const DescriptorProto_ReservedRange = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): DescriptorProto_ReservedRange { + decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2038,9 +1931,7 @@ export const DescriptorProto_ReservedRange = { return obj; }, - fromPartial( - object: DeepPartial - ): DescriptorProto_ReservedRange { + fromPartial(object: DeepPartial): DescriptorProto_ReservedRange { const message = { ...baseDescriptorProto_ReservedRange, } as DescriptorProto_ReservedRange; @@ -2061,20 +1952,14 @@ export const DescriptorProto_ReservedRange = { const baseExtensionRangeOptions: object = {}; export const ExtensionRangeOptions = { - encode( - message: ExtensionRangeOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ExtensionRangeOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ExtensionRangeOptions { + decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; @@ -2083,9 +1968,7 @@ export const ExtensionRangeOptions = { const tag = reader.uint32(); switch (tag >>> 3) { case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -2098,10 +1981,7 @@ export const ExtensionRangeOptions = { fromJSON(object: any): ExtensionRangeOptions { const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); } @@ -2112,8 +1992,8 @@ export const ExtensionRangeOptions = { toJSON(message: ExtensionRangeOptions): unknown { const obj: any = {}; if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined + obj.uninterpretedOption = message.uninterpretedOption.map(e => + e ? UninterpretedOption.toJSON(e) : undefined, ); } else { obj.uninterpretedOption = []; @@ -2121,15 +2001,10 @@ export const ExtensionRangeOptions = { return obj; }, - fromPartial( - object: DeepPartial - ): ExtensionRangeOptions { + fromPartial(object: DeepPartial): ExtensionRangeOptions { const message = { ...baseExtensionRangeOptions } as ExtensionRangeOptions; message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); } @@ -2152,10 +2027,7 @@ const baseFieldDescriptorProto: object = { }; export const FieldDescriptorProto = { - encode( - message: FieldDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: FieldDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2192,10 +2064,7 @@ export const FieldDescriptorProto = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): FieldDescriptorProto { + decode(input: _m0.Reader | Uint8Array, length?: number): FieldDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseFieldDescriptorProto } as FieldDescriptorProto; @@ -2307,22 +2176,16 @@ export const FieldDescriptorProto = { const obj: any = {}; message.name !== undefined && (obj.name = message.name); message.number !== undefined && (obj.number = message.number); - message.label !== undefined && - (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); - message.type !== undefined && - (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); + message.label !== undefined && (obj.label = fieldDescriptorProto_LabelToJSON(message.label)); + message.type !== undefined && (obj.type = fieldDescriptorProto_TypeToJSON(message.type)); message.typeName !== undefined && (obj.typeName = message.typeName); message.extendee !== undefined && (obj.extendee = message.extendee); - message.defaultValue !== undefined && - (obj.defaultValue = message.defaultValue); + message.defaultValue !== undefined && (obj.defaultValue = message.defaultValue); message.oneofIndex !== undefined && (obj.oneofIndex = message.oneofIndex); message.jsonName !== undefined && (obj.jsonName = message.jsonName); message.options !== undefined && - (obj.options = message.options - ? FieldOptions.toJSON(message.options) - : undefined); - message.proto3Optional !== undefined && - (obj.proto3Optional = message.proto3Optional); + (obj.options = message.options ? FieldOptions.toJSON(message.options) : undefined); + message.proto3Optional !== undefined && (obj.proto3Optional = message.proto3Optional); return obj; }, @@ -2390,10 +2253,7 @@ export const FieldDescriptorProto = { const baseOneofDescriptorProto: object = { name: "" }; export const OneofDescriptorProto = { - encode( - message: OneofDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: OneofDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2403,10 +2263,7 @@ export const OneofDescriptorProto = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): OneofDescriptorProto { + decode(input: _m0.Reader | Uint8Array, length?: number): OneofDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseOneofDescriptorProto } as OneofDescriptorProto; @@ -2446,9 +2303,7 @@ export const OneofDescriptorProto = { const obj: any = {}; message.name !== undefined && (obj.name = message.name); message.options !== undefined && - (obj.options = message.options - ? OneofOptions.toJSON(message.options) - : undefined); + (obj.options = message.options ? OneofOptions.toJSON(message.options) : undefined); return obj; }, @@ -2471,10 +2326,7 @@ export const OneofDescriptorProto = { const baseEnumDescriptorProto: object = { name: "", reservedName: "" }; export const EnumDescriptorProto = { - encode( - message: EnumDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: EnumDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2485,10 +2337,7 @@ export const EnumDescriptorProto = { EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); } for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork() - ).ldelim(); + EnumDescriptorProto_EnumReservedRange.encode(v!, writer.uint32(34).fork()).ldelim(); } for (const v of message.reservedName) { writer.uint32(42).string(v!); @@ -2510,19 +2359,14 @@ export const EnumDescriptorProto = { message.name = reader.string(); break; case 2: - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()) - ); + message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); break; case 3: message.options = EnumOptions.decode(reader, reader.uint32()); break; case 4: message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32() - ) + EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32()), ); break; case 5: @@ -2558,9 +2402,7 @@ export const EnumDescriptorProto = { } if (object.reservedRange !== undefined && object.reservedRange !== null) { for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromJSON(e) - ); + message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromJSON(e)); } } if (object.reservedName !== undefined && object.reservedName !== null) { @@ -2575,25 +2417,21 @@ export const EnumDescriptorProto = { const obj: any = {}; message.name !== undefined && (obj.name = message.name); if (message.value) { - obj.value = message.value.map((e) => - e ? EnumValueDescriptorProto.toJSON(e) : undefined - ); + obj.value = message.value.map(e => (e ? EnumValueDescriptorProto.toJSON(e) : undefined)); } else { obj.value = []; } message.options !== undefined && - (obj.options = message.options - ? EnumOptions.toJSON(message.options) - : undefined); + (obj.options = message.options ? EnumOptions.toJSON(message.options) : undefined); if (message.reservedRange) { - obj.reservedRange = message.reservedRange.map((e) => - e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined + obj.reservedRange = message.reservedRange.map(e => + e ? EnumDescriptorProto_EnumReservedRange.toJSON(e) : undefined, ); } else { obj.reservedRange = []; } if (message.reservedName) { - obj.reservedName = message.reservedName.map((e) => e); + obj.reservedName = message.reservedName.map(e => e); } else { obj.reservedName = []; } @@ -2622,9 +2460,7 @@ export const EnumDescriptorProto = { } if (object.reservedRange !== undefined && object.reservedRange !== null) { for (const e of object.reservedRange) { - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.fromPartial(e) - ); + message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.fromPartial(e)); } } if (object.reservedName !== undefined && object.reservedName !== null) { @@ -2641,7 +2477,7 @@ const baseEnumDescriptorProto_EnumReservedRange: object = { start: 0, end: 0 }; export const EnumDescriptorProto_EnumReservedRange = { encode( message: EnumDescriptorProto_EnumReservedRange, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.start !== 0) { writer.uint32(8).int32(message.start); @@ -2652,10 +2488,7 @@ export const EnumDescriptorProto_EnumReservedRange = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): EnumDescriptorProto_EnumReservedRange { + decode(input: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2703,7 +2536,7 @@ export const EnumDescriptorProto_EnumReservedRange = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): EnumDescriptorProto_EnumReservedRange { const message = { ...baseEnumDescriptorProto_EnumReservedRange, @@ -2725,10 +2558,7 @@ export const EnumDescriptorProto_EnumReservedRange = { const baseEnumValueDescriptorProto: object = { name: "", number: 0 }; export const EnumValueDescriptorProto = { - encode( - message: EnumValueDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: EnumValueDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2736,18 +2566,12 @@ export const EnumValueDescriptorProto = { writer.uint32(16).int32(message.number); } if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork() - ).ldelim(); + EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): EnumValueDescriptorProto { + decode(input: _m0.Reader | Uint8Array, length?: number): EnumValueDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2800,15 +2624,11 @@ export const EnumValueDescriptorProto = { message.name !== undefined && (obj.name = message.name); message.number !== undefined && (obj.number = message.number); message.options !== undefined && - (obj.options = message.options - ? EnumValueOptions.toJSON(message.options) - : undefined); + (obj.options = message.options ? EnumValueOptions.toJSON(message.options) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): EnumValueDescriptorProto { + fromPartial(object: DeepPartial): EnumValueDescriptorProto { const message = { ...baseEnumValueDescriptorProto, } as EnumValueDescriptorProto; @@ -2834,10 +2654,7 @@ export const EnumValueDescriptorProto = { const baseServiceDescriptorProto: object = { name: "" }; export const ServiceDescriptorProto = { - encode( - message: ServiceDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ServiceDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2850,10 +2667,7 @@ export const ServiceDescriptorProto = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ServiceDescriptorProto { + decode(input: _m0.Reader | Uint8Array, length?: number): ServiceDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; @@ -2865,9 +2679,7 @@ export const ServiceDescriptorProto = { message.name = reader.string(); break; case 2: - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()) - ); + message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); break; case 3: message.options = ServiceOptions.decode(reader, reader.uint32()); @@ -2905,22 +2717,16 @@ export const ServiceDescriptorProto = { const obj: any = {}; message.name !== undefined && (obj.name = message.name); if (message.method) { - obj.method = message.method.map((e) => - e ? MethodDescriptorProto.toJSON(e) : undefined - ); + obj.method = message.method.map(e => (e ? MethodDescriptorProto.toJSON(e) : undefined)); } else { obj.method = []; } message.options !== undefined && - (obj.options = message.options - ? ServiceOptions.toJSON(message.options) - : undefined); + (obj.options = message.options ? ServiceOptions.toJSON(message.options) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): ServiceDescriptorProto { + fromPartial(object: DeepPartial): ServiceDescriptorProto { const message = { ...baseServiceDescriptorProto } as ServiceDescriptorProto; message.method = []; if (object.name !== undefined && object.name !== null) { @@ -2951,10 +2757,7 @@ const baseMethodDescriptorProto: object = { }; export const MethodDescriptorProto = { - encode( - message: MethodDescriptorProto, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MethodDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2976,10 +2779,7 @@ export const MethodDescriptorProto = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): MethodDescriptorProto { + decode(input: _m0.Reader | Uint8Array, length?: number): MethodDescriptorProto { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; @@ -3034,18 +2834,12 @@ export const MethodDescriptorProto = { } else { message.options = undefined; } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { + if (object.clientStreaming !== undefined && object.clientStreaming !== null) { message.clientStreaming = Boolean(object.clientStreaming); } else { message.clientStreaming = false; } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { + if (object.serverStreaming !== undefined && object.serverStreaming !== null) { message.serverStreaming = Boolean(object.serverStreaming); } else { message.serverStreaming = false; @@ -3059,19 +2853,13 @@ export const MethodDescriptorProto = { message.inputType !== undefined && (obj.inputType = message.inputType); message.outputType !== undefined && (obj.outputType = message.outputType); message.options !== undefined && - (obj.options = message.options - ? MethodOptions.toJSON(message.options) - : undefined); - message.clientStreaming !== undefined && - (obj.clientStreaming = message.clientStreaming); - message.serverStreaming !== undefined && - (obj.serverStreaming = message.serverStreaming); + (obj.options = message.options ? MethodOptions.toJSON(message.options) : undefined); + message.clientStreaming !== undefined && (obj.clientStreaming = message.clientStreaming); + message.serverStreaming !== undefined && (obj.serverStreaming = message.serverStreaming); return obj; }, - fromPartial( - object: DeepPartial - ): MethodDescriptorProto { + fromPartial(object: DeepPartial): MethodDescriptorProto { const message = { ...baseMethodDescriptorProto } as MethodDescriptorProto; if (object.name !== undefined && object.name !== null) { message.name = object.name; @@ -3093,18 +2881,12 @@ export const MethodDescriptorProto = { } else { message.options = undefined; } - if ( - object.clientStreaming !== undefined && - object.clientStreaming !== null - ) { + if (object.clientStreaming !== undefined && object.clientStreaming !== null) { message.clientStreaming = object.clientStreaming; } else { message.clientStreaming = false; } - if ( - object.serverStreaming !== undefined && - object.serverStreaming !== null - ) { + if (object.serverStreaming !== undefined && object.serverStreaming !== null) { message.serverStreaming = object.serverStreaming; } else { message.serverStreaming = false; @@ -3137,10 +2919,7 @@ const baseFileOptions: object = { }; export const FileOptions = { - encode( - message: FileOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: FileOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.javaPackage !== "") { writer.uint32(10).string(message.javaPackage); } @@ -3276,9 +3055,7 @@ export const FileOptions = { message.rubyPackage = reader.string(); break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3296,18 +3073,12 @@ export const FileOptions = { } else { message.javaPackage = ""; } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { + if (object.javaOuterClassname !== undefined && object.javaOuterClassname !== null) { message.javaOuterClassname = String(object.javaOuterClassname); } else { message.javaOuterClassname = ""; } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { + if (object.javaMultipleFiles !== undefined && object.javaMultipleFiles !== null) { message.javaMultipleFiles = Boolean(object.javaMultipleFiles); } else { message.javaMultipleFiles = false; @@ -3316,24 +3087,17 @@ export const FileOptions = { object.javaGenerateEqualsAndHash !== undefined && object.javaGenerateEqualsAndHash !== null ) { - message.javaGenerateEqualsAndHash = Boolean( - object.javaGenerateEqualsAndHash - ); + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); } else { message.javaGenerateEqualsAndHash = false; } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { + if (object.javaStringCheckUtf8 !== undefined && object.javaStringCheckUtf8 !== null) { message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); } else { message.javaStringCheckUtf8 = false; } if (object.optimizeFor !== undefined && object.optimizeFor !== null) { - message.optimizeFor = fileOptions_OptimizeModeFromJSON( - object.optimizeFor - ); + message.optimizeFor = fileOptions_OptimizeModeFromJSON(object.optimizeFor); } else { message.optimizeFor = 1; } @@ -3342,34 +3106,22 @@ export const FileOptions = { } else { message.goPackage = ""; } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { + if (object.ccGenericServices !== undefined && object.ccGenericServices !== null) { message.ccGenericServices = Boolean(object.ccGenericServices); } else { message.ccGenericServices = false; } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { + if (object.javaGenericServices !== undefined && object.javaGenericServices !== null) { message.javaGenericServices = Boolean(object.javaGenericServices); } else { message.javaGenericServices = false; } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { + if (object.pyGenericServices !== undefined && object.pyGenericServices !== null) { message.pyGenericServices = Boolean(object.pyGenericServices); } else { message.pyGenericServices = false; } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { + if (object.phpGenericServices !== undefined && object.phpGenericServices !== null) { message.phpGenericServices = Boolean(object.phpGenericServices); } else { message.phpGenericServices = false; @@ -3384,18 +3136,12 @@ export const FileOptions = { } else { message.ccEnableArenas = false; } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { + if (object.objcClassPrefix !== undefined && object.objcClassPrefix !== null) { message.objcClassPrefix = String(object.objcClassPrefix); } else { message.objcClassPrefix = ""; } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { + if (object.csharpNamespace !== undefined && object.csharpNamespace !== null) { message.csharpNamespace = String(object.csharpNamespace); } else { message.csharpNamespace = ""; @@ -3415,10 +3161,7 @@ export const FileOptions = { } else { message.phpNamespace = ""; } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { + if (object.phpMetadataNamespace !== undefined && object.phpMetadataNamespace !== null) { message.phpMetadataNamespace = String(object.phpMetadataNamespace); } else { message.phpMetadataNamespace = ""; @@ -3428,10 +3171,7 @@ export const FileOptions = { } else { message.rubyPackage = ""; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); } @@ -3441,12 +3181,10 @@ export const FileOptions = { toJSON(message: FileOptions): unknown { const obj: any = {}; - message.javaPackage !== undefined && - (obj.javaPackage = message.javaPackage); + message.javaPackage !== undefined && (obj.javaPackage = message.javaPackage); message.javaOuterClassname !== undefined && (obj.javaOuterClassname = message.javaOuterClassname); - message.javaMultipleFiles !== undefined && - (obj.javaMultipleFiles = message.javaMultipleFiles); + message.javaMultipleFiles !== undefined && (obj.javaMultipleFiles = message.javaMultipleFiles); message.javaGenerateEqualsAndHash !== undefined && (obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash); message.javaStringCheckUtf8 !== undefined && @@ -3454,34 +3192,25 @@ export const FileOptions = { message.optimizeFor !== undefined && (obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor)); message.goPackage !== undefined && (obj.goPackage = message.goPackage); - message.ccGenericServices !== undefined && - (obj.ccGenericServices = message.ccGenericServices); + message.ccGenericServices !== undefined && (obj.ccGenericServices = message.ccGenericServices); message.javaGenericServices !== undefined && (obj.javaGenericServices = message.javaGenericServices); - message.pyGenericServices !== undefined && - (obj.pyGenericServices = message.pyGenericServices); + message.pyGenericServices !== undefined && (obj.pyGenericServices = message.pyGenericServices); message.phpGenericServices !== undefined && (obj.phpGenericServices = message.phpGenericServices); message.deprecated !== undefined && (obj.deprecated = message.deprecated); - message.ccEnableArenas !== undefined && - (obj.ccEnableArenas = message.ccEnableArenas); - message.objcClassPrefix !== undefined && - (obj.objcClassPrefix = message.objcClassPrefix); - message.csharpNamespace !== undefined && - (obj.csharpNamespace = message.csharpNamespace); - message.swiftPrefix !== undefined && - (obj.swiftPrefix = message.swiftPrefix); - message.phpClassPrefix !== undefined && - (obj.phpClassPrefix = message.phpClassPrefix); - message.phpNamespace !== undefined && - (obj.phpNamespace = message.phpNamespace); + message.ccEnableArenas !== undefined && (obj.ccEnableArenas = message.ccEnableArenas); + message.objcClassPrefix !== undefined && (obj.objcClassPrefix = message.objcClassPrefix); + message.csharpNamespace !== undefined && (obj.csharpNamespace = message.csharpNamespace); + message.swiftPrefix !== undefined && (obj.swiftPrefix = message.swiftPrefix); + message.phpClassPrefix !== undefined && (obj.phpClassPrefix = message.phpClassPrefix); + message.phpNamespace !== undefined && (obj.phpNamespace = message.phpNamespace); message.phpMetadataNamespace !== undefined && (obj.phpMetadataNamespace = message.phpMetadataNamespace); - message.rubyPackage !== undefined && - (obj.rubyPackage = message.rubyPackage); + message.rubyPackage !== undefined && (obj.rubyPackage = message.rubyPackage); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined + obj.uninterpretedOption = message.uninterpretedOption.map(e => + e ? UninterpretedOption.toJSON(e) : undefined, ); } else { obj.uninterpretedOption = []; @@ -3497,18 +3226,12 @@ export const FileOptions = { } else { message.javaPackage = ""; } - if ( - object.javaOuterClassname !== undefined && - object.javaOuterClassname !== null - ) { + if (object.javaOuterClassname !== undefined && object.javaOuterClassname !== null) { message.javaOuterClassname = object.javaOuterClassname; } else { message.javaOuterClassname = ""; } - if ( - object.javaMultipleFiles !== undefined && - object.javaMultipleFiles !== null - ) { + if (object.javaMultipleFiles !== undefined && object.javaMultipleFiles !== null) { message.javaMultipleFiles = object.javaMultipleFiles; } else { message.javaMultipleFiles = false; @@ -3521,10 +3244,7 @@ export const FileOptions = { } else { message.javaGenerateEqualsAndHash = false; } - if ( - object.javaStringCheckUtf8 !== undefined && - object.javaStringCheckUtf8 !== null - ) { + if (object.javaStringCheckUtf8 !== undefined && object.javaStringCheckUtf8 !== null) { message.javaStringCheckUtf8 = object.javaStringCheckUtf8; } else { message.javaStringCheckUtf8 = false; @@ -3539,34 +3259,22 @@ export const FileOptions = { } else { message.goPackage = ""; } - if ( - object.ccGenericServices !== undefined && - object.ccGenericServices !== null - ) { + if (object.ccGenericServices !== undefined && object.ccGenericServices !== null) { message.ccGenericServices = object.ccGenericServices; } else { message.ccGenericServices = false; } - if ( - object.javaGenericServices !== undefined && - object.javaGenericServices !== null - ) { + if (object.javaGenericServices !== undefined && object.javaGenericServices !== null) { message.javaGenericServices = object.javaGenericServices; } else { message.javaGenericServices = false; } - if ( - object.pyGenericServices !== undefined && - object.pyGenericServices !== null - ) { + if (object.pyGenericServices !== undefined && object.pyGenericServices !== null) { message.pyGenericServices = object.pyGenericServices; } else { message.pyGenericServices = false; } - if ( - object.phpGenericServices !== undefined && - object.phpGenericServices !== null - ) { + if (object.phpGenericServices !== undefined && object.phpGenericServices !== null) { message.phpGenericServices = object.phpGenericServices; } else { message.phpGenericServices = false; @@ -3581,18 +3289,12 @@ export const FileOptions = { } else { message.ccEnableArenas = false; } - if ( - object.objcClassPrefix !== undefined && - object.objcClassPrefix !== null - ) { + if (object.objcClassPrefix !== undefined && object.objcClassPrefix !== null) { message.objcClassPrefix = object.objcClassPrefix; } else { message.objcClassPrefix = ""; } - if ( - object.csharpNamespace !== undefined && - object.csharpNamespace !== null - ) { + if (object.csharpNamespace !== undefined && object.csharpNamespace !== null) { message.csharpNamespace = object.csharpNamespace; } else { message.csharpNamespace = ""; @@ -3612,10 +3314,7 @@ export const FileOptions = { } else { message.phpNamespace = ""; } - if ( - object.phpMetadataNamespace !== undefined && - object.phpMetadataNamespace !== null - ) { + if (object.phpMetadataNamespace !== undefined && object.phpMetadataNamespace !== null) { message.phpMetadataNamespace = object.phpMetadataNamespace; } else { message.phpMetadataNamespace = ""; @@ -3625,10 +3324,7 @@ export const FileOptions = { } else { message.rubyPackage = ""; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); } @@ -3645,10 +3341,7 @@ const baseMessageOptions: object = { }; export const MessageOptions = { - encode( - message: MessageOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MessageOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.messageSetWireFormat === true) { writer.uint32(8).bool(message.messageSetWireFormat); } @@ -3688,9 +3381,7 @@ export const MessageOptions = { message.mapEntry = reader.bool(); break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3703,10 +3394,7 @@ export const MessageOptions = { fromJSON(object: any): MessageOptions { const message = { ...baseMessageOptions } as MessageOptions; message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { + if (object.messageSetWireFormat !== undefined && object.messageSetWireFormat !== null) { message.messageSetWireFormat = Boolean(object.messageSetWireFormat); } else { message.messageSetWireFormat = false; @@ -3715,9 +3403,7 @@ export const MessageOptions = { object.noStandardDescriptorAccessor !== undefined && object.noStandardDescriptorAccessor !== null ) { - message.noStandardDescriptorAccessor = Boolean( - object.noStandardDescriptorAccessor - ); + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); } else { message.noStandardDescriptorAccessor = false; } @@ -3731,10 +3417,7 @@ export const MessageOptions = { } else { message.mapEntry = false; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); } @@ -3751,8 +3434,8 @@ export const MessageOptions = { message.deprecated !== undefined && (obj.deprecated = message.deprecated); message.mapEntry !== undefined && (obj.mapEntry = message.mapEntry); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined + obj.uninterpretedOption = message.uninterpretedOption.map(e => + e ? UninterpretedOption.toJSON(e) : undefined, ); } else { obj.uninterpretedOption = []; @@ -3763,10 +3446,7 @@ export const MessageOptions = { fromPartial(object: DeepPartial): MessageOptions { const message = { ...baseMessageOptions } as MessageOptions; message.uninterpretedOption = []; - if ( - object.messageSetWireFormat !== undefined && - object.messageSetWireFormat !== null - ) { + if (object.messageSetWireFormat !== undefined && object.messageSetWireFormat !== null) { message.messageSetWireFormat = object.messageSetWireFormat; } else { message.messageSetWireFormat = false; @@ -3775,8 +3455,7 @@ export const MessageOptions = { object.noStandardDescriptorAccessor !== undefined && object.noStandardDescriptorAccessor !== null ) { - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor; + message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor; } else { message.noStandardDescriptorAccessor = false; } @@ -3790,10 +3469,7 @@ export const MessageOptions = { } else { message.mapEntry = false; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); } @@ -3812,10 +3488,7 @@ const baseFieldOptions: object = { }; export const FieldOptions = { - encode( - message: FieldOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: FieldOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.ctype !== 0) { writer.uint32(8).int32(message.ctype); } @@ -3867,9 +3540,7 @@ export const FieldOptions = { message.weak = reader.bool(); break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -3912,10 +3583,7 @@ export const FieldOptions = { } else { message.weak = false; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); } @@ -3925,17 +3593,15 @@ export const FieldOptions = { toJSON(message: FieldOptions): unknown { const obj: any = {}; - message.ctype !== undefined && - (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); + message.ctype !== undefined && (obj.ctype = fieldOptions_CTypeToJSON(message.ctype)); message.packed !== undefined && (obj.packed = message.packed); - message.jstype !== undefined && - (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); + message.jstype !== undefined && (obj.jstype = fieldOptions_JSTypeToJSON(message.jstype)); message.lazy !== undefined && (obj.lazy = message.lazy); message.deprecated !== undefined && (obj.deprecated = message.deprecated); message.weak !== undefined && (obj.weak = message.weak); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined + obj.uninterpretedOption = message.uninterpretedOption.map(e => + e ? UninterpretedOption.toJSON(e) : undefined, ); } else { obj.uninterpretedOption = []; @@ -3976,10 +3642,7 @@ export const FieldOptions = { } else { message.weak = false; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); } @@ -3991,10 +3654,7 @@ export const FieldOptions = { const baseOneofOptions: object = {}; export const OneofOptions = { - encode( - message: OneofOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -4010,9 +3670,7 @@ export const OneofOptions = { const tag = reader.uint32(); switch (tag >>> 3) { case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -4025,10 +3683,7 @@ export const OneofOptions = { fromJSON(object: any): OneofOptions { const message = { ...baseOneofOptions } as OneofOptions; message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); } @@ -4039,8 +3694,8 @@ export const OneofOptions = { toJSON(message: OneofOptions): unknown { const obj: any = {}; if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined + obj.uninterpretedOption = message.uninterpretedOption.map(e => + e ? UninterpretedOption.toJSON(e) : undefined, ); } else { obj.uninterpretedOption = []; @@ -4051,10 +3706,7 @@ export const OneofOptions = { fromPartial(object: DeepPartial): OneofOptions { const message = { ...baseOneofOptions } as OneofOptions; message.uninterpretedOption = []; - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); } @@ -4066,10 +3718,7 @@ export const OneofOptions = { const baseEnumOptions: object = { allowAlias: false, deprecated: false }; export const EnumOptions = { - encode( - message: EnumOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: EnumOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.allowAlias === true) { writer.uint32(16).bool(message.allowAlias); } @@ -4097,9 +3746,7 @@ export const EnumOptions = { message.deprecated = reader.bool(); break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -4122,10 +3769,7 @@ export const EnumOptions = { } else { message.deprecated = false; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); } @@ -4138,8 +3782,8 @@ export const EnumOptions = { message.allowAlias !== undefined && (obj.allowAlias = message.allowAlias); message.deprecated !== undefined && (obj.deprecated = message.deprecated); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined + obj.uninterpretedOption = message.uninterpretedOption.map(e => + e ? UninterpretedOption.toJSON(e) : undefined, ); } else { obj.uninterpretedOption = []; @@ -4160,10 +3804,7 @@ export const EnumOptions = { } else { message.deprecated = false; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); } @@ -4175,10 +3816,7 @@ export const EnumOptions = { const baseEnumValueOptions: object = { deprecated: false }; export const EnumValueOptions = { - encode( - message: EnumValueOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: EnumValueOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deprecated === true) { writer.uint32(8).bool(message.deprecated); } @@ -4200,9 +3838,7 @@ export const EnumValueOptions = { message.deprecated = reader.bool(); break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -4220,10 +3856,7 @@ export const EnumValueOptions = { } else { message.deprecated = false; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); } @@ -4235,8 +3868,8 @@ export const EnumValueOptions = { const obj: any = {}; message.deprecated !== undefined && (obj.deprecated = message.deprecated); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined + obj.uninterpretedOption = message.uninterpretedOption.map(e => + e ? UninterpretedOption.toJSON(e) : undefined, ); } else { obj.uninterpretedOption = []; @@ -4252,10 +3885,7 @@ export const EnumValueOptions = { } else { message.deprecated = false; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); } @@ -4267,10 +3897,7 @@ export const EnumValueOptions = { const baseServiceOptions: object = { deprecated: false }; export const ServiceOptions = { - encode( - message: ServiceOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deprecated === true) { writer.uint32(264).bool(message.deprecated); } @@ -4292,9 +3919,7 @@ export const ServiceOptions = { message.deprecated = reader.bool(); break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -4312,10 +3937,7 @@ export const ServiceOptions = { } else { message.deprecated = false; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); } @@ -4327,8 +3949,8 @@ export const ServiceOptions = { const obj: any = {}; message.deprecated !== undefined && (obj.deprecated = message.deprecated); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined + obj.uninterpretedOption = message.uninterpretedOption.map(e => + e ? UninterpretedOption.toJSON(e) : undefined, ); } else { obj.uninterpretedOption = []; @@ -4344,10 +3966,7 @@ export const ServiceOptions = { } else { message.deprecated = false; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); } @@ -4359,10 +3978,7 @@ export const ServiceOptions = { const baseMethodOptions: object = { deprecated: false, idempotencyLevel: 0 }; export const MethodOptions = { - encode( - message: MethodOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: MethodOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deprecated === true) { writer.uint32(264).bool(message.deprecated); } @@ -4390,9 +4006,7 @@ export const MethodOptions = { message.idempotencyLevel = reader.int32() as any; break; case 999: - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()) - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -4410,20 +4024,12 @@ export const MethodOptions = { } else { message.deprecated = false; } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { - message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON( - object.idempotencyLevel - ); + if (object.idempotencyLevel !== undefined && object.idempotencyLevel !== null) { + message.idempotencyLevel = methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel); } else { message.idempotencyLevel = 0; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromJSON(e)); } @@ -4435,12 +4041,10 @@ export const MethodOptions = { const obj: any = {}; message.deprecated !== undefined && (obj.deprecated = message.deprecated); message.idempotencyLevel !== undefined && - (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel - )); + (obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel)); if (message.uninterpretedOption) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - e ? UninterpretedOption.toJSON(e) : undefined + obj.uninterpretedOption = message.uninterpretedOption.map(e => + e ? UninterpretedOption.toJSON(e) : undefined, ); } else { obj.uninterpretedOption = []; @@ -4456,18 +4060,12 @@ export const MethodOptions = { } else { message.deprecated = false; } - if ( - object.idempotencyLevel !== undefined && - object.idempotencyLevel !== null - ) { + if (object.idempotencyLevel !== undefined && object.idempotencyLevel !== null) { message.idempotencyLevel = object.idempotencyLevel; } else { message.idempotencyLevel = 0; } - if ( - object.uninterpretedOption !== undefined && - object.uninterpretedOption !== null - ) { + if (object.uninterpretedOption !== undefined && object.uninterpretedOption !== null) { for (const e of object.uninterpretedOption) { message.uninterpretedOption.push(UninterpretedOption.fromPartial(e)); } @@ -4485,15 +4083,9 @@ const baseUninterpretedOption: object = { }; export const UninterpretedOption = { - encode( - message: UninterpretedOption, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: UninterpretedOption, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork() - ).ldelim(); + UninterpretedOption_NamePart.encode(v!, writer.uint32(18).fork()).ldelim(); } if (message.identifierValue !== "") { writer.uint32(26).string(message.identifierValue); @@ -4526,9 +4118,7 @@ export const UninterpretedOption = { const tag = reader.uint32(); switch (tag >>> 3) { case 2: - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()) - ); + message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); break; case 3: message.identifierValue = reader.string(); @@ -4565,26 +4155,17 @@ export const UninterpretedOption = { message.name.push(UninterpretedOption_NamePart.fromJSON(e)); } } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { + if (object.identifierValue !== undefined && object.identifierValue !== null) { message.identifierValue = String(object.identifierValue); } else { message.identifierValue = ""; } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { + if (object.positiveIntValue !== undefined && object.positiveIntValue !== null) { message.positiveIntValue = Number(object.positiveIntValue); } else { message.positiveIntValue = 0; } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { + if (object.negativeIntValue !== undefined && object.negativeIntValue !== null) { message.negativeIntValue = Number(object.negativeIntValue); } else { message.negativeIntValue = 0; @@ -4608,28 +4189,19 @@ export const UninterpretedOption = { toJSON(message: UninterpretedOption): unknown { const obj: any = {}; if (message.name) { - obj.name = message.name.map((e) => - e ? UninterpretedOption_NamePart.toJSON(e) : undefined - ); + obj.name = message.name.map(e => (e ? UninterpretedOption_NamePart.toJSON(e) : undefined)); } else { obj.name = []; } - message.identifierValue !== undefined && - (obj.identifierValue = message.identifierValue); - message.positiveIntValue !== undefined && - (obj.positiveIntValue = message.positiveIntValue); - message.negativeIntValue !== undefined && - (obj.negativeIntValue = message.negativeIntValue); - message.doubleValue !== undefined && - (obj.doubleValue = message.doubleValue); + message.identifierValue !== undefined && (obj.identifierValue = message.identifierValue); + message.positiveIntValue !== undefined && (obj.positiveIntValue = message.positiveIntValue); + message.negativeIntValue !== undefined && (obj.negativeIntValue = message.negativeIntValue); + message.doubleValue !== undefined && (obj.doubleValue = message.doubleValue); message.stringValue !== undefined && (obj.stringValue = base64FromBytes( - message.stringValue !== undefined - ? message.stringValue - : new Uint8Array() + message.stringValue !== undefined ? message.stringValue : new Uint8Array(), )); - message.aggregateValue !== undefined && - (obj.aggregateValue = message.aggregateValue); + message.aggregateValue !== undefined && (obj.aggregateValue = message.aggregateValue); return obj; }, @@ -4641,26 +4213,17 @@ export const UninterpretedOption = { message.name.push(UninterpretedOption_NamePart.fromPartial(e)); } } - if ( - object.identifierValue !== undefined && - object.identifierValue !== null - ) { + if (object.identifierValue !== undefined && object.identifierValue !== null) { message.identifierValue = object.identifierValue; } else { message.identifierValue = ""; } - if ( - object.positiveIntValue !== undefined && - object.positiveIntValue !== null - ) { + if (object.positiveIntValue !== undefined && object.positiveIntValue !== null) { message.positiveIntValue = object.positiveIntValue; } else { message.positiveIntValue = 0; } - if ( - object.negativeIntValue !== undefined && - object.negativeIntValue !== null - ) { + if (object.negativeIntValue !== undefined && object.negativeIntValue !== null) { message.negativeIntValue = object.negativeIntValue; } else { message.negativeIntValue = 0; @@ -4692,7 +4255,7 @@ const baseUninterpretedOption_NamePart: object = { export const UninterpretedOption_NamePart = { encode( message: UninterpretedOption_NamePart, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.namePart !== "") { writer.uint32(10).string(message.namePart); @@ -4703,10 +4266,7 @@ export const UninterpretedOption_NamePart = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): UninterpretedOption_NamePart { + decode(input: _m0.Reader | Uint8Array, length?: number): UninterpretedOption_NamePart { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -4749,14 +4309,11 @@ export const UninterpretedOption_NamePart = { toJSON(message: UninterpretedOption_NamePart): unknown { const obj: any = {}; message.namePart !== undefined && (obj.namePart = message.namePart); - message.isExtension !== undefined && - (obj.isExtension = message.isExtension); + message.isExtension !== undefined && (obj.isExtension = message.isExtension); return obj; }, - fromPartial( - object: DeepPartial - ): UninterpretedOption_NamePart { + fromPartial(object: DeepPartial): UninterpretedOption_NamePart { const message = { ...baseUninterpretedOption_NamePart, } as UninterpretedOption_NamePart; @@ -4777,10 +4334,7 @@ export const UninterpretedOption_NamePart = { const baseSourceCodeInfo: object = {}; export const SourceCodeInfo = { - encode( - message: SourceCodeInfo, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SourceCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.location) { SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -4796,9 +4350,7 @@ export const SourceCodeInfo = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()) - ); + message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -4822,9 +4374,7 @@ export const SourceCodeInfo = { toJSON(message: SourceCodeInfo): unknown { const obj: any = {}; if (message.location) { - obj.location = message.location.map((e) => - e ? SourceCodeInfo_Location.toJSON(e) : undefined - ); + obj.location = message.location.map(e => (e ? SourceCodeInfo_Location.toJSON(e) : undefined)); } else { obj.location = []; } @@ -4852,10 +4402,7 @@ const baseSourceCodeInfo_Location: object = { }; export const SourceCodeInfo_Location = { - encode( - message: SourceCodeInfo_Location, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SourceCodeInfo_Location, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { writer.uint32(10).fork(); for (const v of message.path) { writer.int32(v); @@ -4878,10 +4425,7 @@ export const SourceCodeInfo_Location = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SourceCodeInfo_Location { + decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo_Location { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -4947,26 +4491,17 @@ export const SourceCodeInfo_Location = { message.span.push(Number(e)); } } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { + if (object.leadingComments !== undefined && object.leadingComments !== null) { message.leadingComments = String(object.leadingComments); } else { message.leadingComments = ""; } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { + if (object.trailingComments !== undefined && object.trailingComments !== null) { message.trailingComments = String(object.trailingComments); } else { message.trailingComments = ""; } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { + if (object.leadingDetachedComments !== undefined && object.leadingDetachedComments !== null) { for (const e of object.leadingDetachedComments) { message.leadingDetachedComments.push(String(e)); } @@ -4977,32 +4512,26 @@ export const SourceCodeInfo_Location = { toJSON(message: SourceCodeInfo_Location): unknown { const obj: any = {}; if (message.path) { - obj.path = message.path.map((e) => e); + obj.path = message.path.map(e => e); } else { obj.path = []; } if (message.span) { - obj.span = message.span.map((e) => e); + obj.span = message.span.map(e => e); } else { obj.span = []; } - message.leadingComments !== undefined && - (obj.leadingComments = message.leadingComments); - message.trailingComments !== undefined && - (obj.trailingComments = message.trailingComments); + message.leadingComments !== undefined && (obj.leadingComments = message.leadingComments); + message.trailingComments !== undefined && (obj.trailingComments = message.trailingComments); if (message.leadingDetachedComments) { - obj.leadingDetachedComments = message.leadingDetachedComments.map( - (e) => e - ); + obj.leadingDetachedComments = message.leadingDetachedComments.map(e => e); } else { obj.leadingDetachedComments = []; } return obj; }, - fromPartial( - object: DeepPartial - ): SourceCodeInfo_Location { + fromPartial(object: DeepPartial): SourceCodeInfo_Location { const message = { ...baseSourceCodeInfo_Location, } as SourceCodeInfo_Location; @@ -5019,26 +4548,17 @@ export const SourceCodeInfo_Location = { message.span.push(e); } } - if ( - object.leadingComments !== undefined && - object.leadingComments !== null - ) { + if (object.leadingComments !== undefined && object.leadingComments !== null) { message.leadingComments = object.leadingComments; } else { message.leadingComments = ""; } - if ( - object.trailingComments !== undefined && - object.trailingComments !== null - ) { + if (object.trailingComments !== undefined && object.trailingComments !== null) { message.trailingComments = object.trailingComments; } else { message.trailingComments = ""; } - if ( - object.leadingDetachedComments !== undefined && - object.leadingDetachedComments !== null - ) { + if (object.leadingDetachedComments !== undefined && object.leadingDetachedComments !== null) { for (const e of object.leadingDetachedComments) { message.leadingDetachedComments.push(e); } @@ -5050,15 +4570,9 @@ export const SourceCodeInfo_Location = { const baseGeneratedCodeInfo: object = {}; export const GeneratedCodeInfo = { - encode( - message: GeneratedCodeInfo, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GeneratedCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork() - ).ldelim(); + GeneratedCodeInfo_Annotation.encode(v!, writer.uint32(10).fork()).ldelim(); } return writer; }, @@ -5072,9 +4586,7 @@ export const GeneratedCodeInfo = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()) - ); + message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -5098,8 +4610,8 @@ export const GeneratedCodeInfo = { toJSON(message: GeneratedCodeInfo): unknown { const obj: any = {}; if (message.annotation) { - obj.annotation = message.annotation.map((e) => - e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined + obj.annotation = message.annotation.map(e => + e ? GeneratedCodeInfo_Annotation.toJSON(e) : undefined, ); } else { obj.annotation = []; @@ -5129,7 +4641,7 @@ const baseGeneratedCodeInfo_Annotation: object = { export const GeneratedCodeInfo_Annotation = { encode( message: GeneratedCodeInfo_Annotation, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { writer.uint32(10).fork(); for (const v of message.path) { @@ -5148,10 +4660,7 @@ export const GeneratedCodeInfo_Annotation = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GeneratedCodeInfo_Annotation { + decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -5219,7 +4728,7 @@ export const GeneratedCodeInfo_Annotation = { toJSON(message: GeneratedCodeInfo_Annotation): unknown { const obj: any = {}; if (message.path) { - obj.path = message.path.map((e) => e); + obj.path = message.path.map(e => e); } else { obj.path = []; } @@ -5229,9 +4738,7 @@ export const GeneratedCodeInfo_Annotation = { return obj; }, - fromPartial( - object: DeepPartial - ): GeneratedCodeInfo_Annotation { + fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation { const message = { ...baseGeneratedCodeInfo_Annotation, } as GeneratedCodeInfo_Annotation; @@ -5272,8 +4779,7 @@ var globalThis: any = (() => { })(); const atob: (b64: string) => string = - globalThis.atob || - ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary")); + globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); function bytesFromBase64(b64: string): Uint8Array { const bin = atob(b64); const arr = new Uint8Array(bin.length); @@ -5284,8 +4790,7 @@ function bytesFromBase64(b64: string): Uint8Array { } const btoa: (bin: string) => string = - globalThis.btoa || - ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64")); + globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); function base64FromBytes(arr: Uint8Array): string { const bin: string[] = []; for (const byte of arr) { @@ -5294,14 +4799,7 @@ function base64FromBytes(arr: Uint8Array): string { return btoa(bin.join("")); } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array diff --git a/dashboard/src/gen/google/protobuf/struct.ts b/dashboard/src/gen/google/protobuf/struct.ts index 6dc03823fc5..65228614dc0 100644 --- a/dashboard/src/gen/google/protobuf/struct.ts +++ b/dashboard/src/gen/google/protobuf/struct.ts @@ -93,15 +93,9 @@ export interface ListValue { const baseStruct: object = {}; export const Struct = { - encode( - message: Struct, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Struct, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { Object.entries(message.fields).forEach(([key, value]) => { - Struct_FieldsEntry.encode( - { key: key as any, value }, - writer.uint32(10).fork() - ).ldelim(); + Struct_FieldsEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).ldelim(); }); return writer; }, @@ -167,10 +161,7 @@ export const Struct = { const baseStruct_FieldsEntry: object = { key: "" }; export const Struct_FieldsEntry = { - encode( - message: Struct_FieldsEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Struct_FieldsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -337,22 +328,14 @@ export const Value = { const obj: any = {}; message.nullValue !== undefined && (obj.nullValue = - message.nullValue !== undefined - ? nullValueToJSON(message.nullValue) - : undefined); - message.numberValue !== undefined && - (obj.numberValue = message.numberValue); - message.stringValue !== undefined && - (obj.stringValue = message.stringValue); + message.nullValue !== undefined ? nullValueToJSON(message.nullValue) : undefined); + message.numberValue !== undefined && (obj.numberValue = message.numberValue); + message.stringValue !== undefined && (obj.stringValue = message.stringValue); message.boolValue !== undefined && (obj.boolValue = message.boolValue); message.structValue !== undefined && - (obj.structValue = message.structValue - ? Struct.toJSON(message.structValue) - : undefined); + (obj.structValue = message.structValue ? Struct.toJSON(message.structValue) : undefined); message.listValue !== undefined && - (obj.listValue = message.listValue - ? ListValue.toJSON(message.listValue) - : undefined); + (obj.listValue = message.listValue ? ListValue.toJSON(message.listValue) : undefined); return obj; }, @@ -395,10 +378,7 @@ export const Value = { const baseListValue: object = {}; export const ListValue = { - encode( - message: ListValue, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ListValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.values) { Value.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -438,7 +418,7 @@ export const ListValue = { toJSON(message: ListValue): unknown { const obj: any = {}; if (message.values) { - obj.values = message.values.map((e) => (e ? Value.toJSON(e) : undefined)); + obj.values = message.values.map(e => (e ? Value.toJSON(e) : undefined)); } else { obj.values = []; } @@ -457,14 +437,7 @@ export const ListValue = { }, }; -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array diff --git a/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/packages.ts b/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/packages.ts index 0dc36751702..baf21ae2851 100644 --- a/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/packages.ts +++ b/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/packages.ts @@ -872,7 +872,7 @@ export enum InstalledPackageStatus_StatusReason { } export function installedPackageStatus_StatusReasonFromJSON( - object: any + object: any, ): InstalledPackageStatus_StatusReason { switch (object) { case 0: @@ -898,7 +898,7 @@ export function installedPackageStatus_StatusReasonFromJSON( } export function installedPackageStatus_StatusReasonToJSON( - object: InstalledPackageStatus_StatusReason + object: InstalledPackageStatus_StatusReason, ): string { switch (object) { case InstalledPackageStatus_StatusReason.STATUS_REASON_UNSPECIFIED: @@ -1002,30 +1002,21 @@ const baseGetAvailablePackageSummariesRequest: object = {}; export const GetAvailablePackageSummariesRequest = { encode( message: GetAvailablePackageSummariesRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } if (message.filterOptions !== undefined) { - FilterOptions.encode( - message.filterOptions, - writer.uint32(18).fork() - ).ldelim(); + FilterOptions.encode(message.filterOptions, writer.uint32(18).fork()).ldelim(); } if (message.paginationOptions !== undefined) { - PaginationOptions.encode( - message.paginationOptions, - writer.uint32(26).fork() - ).ldelim(); + PaginationOptions.encode(message.paginationOptions, writer.uint32(26).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetAvailablePackageSummariesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): GetAvailablePackageSummariesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1041,10 +1032,7 @@ export const GetAvailablePackageSummariesRequest = { message.filterOptions = FilterOptions.decode(reader, reader.uint32()); break; case 3: - message.paginationOptions = PaginationOptions.decode( - reader, - reader.uint32() - ); + message.paginationOptions = PaginationOptions.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1068,13 +1056,8 @@ export const GetAvailablePackageSummariesRequest = { } else { message.filterOptions = undefined; } - if ( - object.paginationOptions !== undefined && - object.paginationOptions !== null - ) { - message.paginationOptions = PaginationOptions.fromJSON( - object.paginationOptions - ); + if (object.paginationOptions !== undefined && object.paginationOptions !== null) { + message.paginationOptions = PaginationOptions.fromJSON(object.paginationOptions); } else { message.paginationOptions = undefined; } @@ -1084,9 +1067,7 @@ export const GetAvailablePackageSummariesRequest = { toJSON(message: GetAvailablePackageSummariesRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); message.filterOptions !== undefined && (obj.filterOptions = message.filterOptions ? FilterOptions.toJSON(message.filterOptions) @@ -1099,7 +1080,7 @@ export const GetAvailablePackageSummariesRequest = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetAvailablePackageSummariesRequest { const message = { ...baseGetAvailablePackageSummariesRequest, @@ -1114,13 +1095,8 @@ export const GetAvailablePackageSummariesRequest = { } else { message.filterOptions = undefined; } - if ( - object.paginationOptions !== undefined && - object.paginationOptions !== null - ) { - message.paginationOptions = PaginationOptions.fromPartial( - object.paginationOptions - ); + if (object.paginationOptions !== undefined && object.paginationOptions !== null) { + message.paginationOptions = PaginationOptions.fromPartial(object.paginationOptions); } else { message.paginationOptions = undefined; } @@ -1133,12 +1109,12 @@ const baseGetAvailablePackageDetailRequest: object = { pkgVersion: "" }; export const GetAvailablePackageDetailRequest = { encode( message: GetAvailablePackageDetailRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.availablePackageRef !== undefined) { AvailablePackageReference.encode( message.availablePackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } if (message.pkgVersion !== "") { @@ -1147,10 +1123,7 @@ export const GetAvailablePackageDetailRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetAvailablePackageDetailRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): GetAvailablePackageDetailRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1160,10 +1133,7 @@ export const GetAvailablePackageDetailRequest = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.availablePackageRef = AvailablePackageReference.decode( - reader, - reader.uint32() - ); + message.availablePackageRef = AvailablePackageReference.decode(reader, reader.uint32()); break; case 2: message.pkgVersion = reader.string(); @@ -1180,13 +1150,8 @@ export const GetAvailablePackageDetailRequest = { const message = { ...baseGetAvailablePackageDetailRequest, } as GetAvailablePackageDetailRequest; - if ( - object.availablePackageRef !== undefined && - object.availablePackageRef !== null - ) { - message.availablePackageRef = AvailablePackageReference.fromJSON( - object.availablePackageRef - ); + if (object.availablePackageRef !== undefined && object.availablePackageRef !== null) { + message.availablePackageRef = AvailablePackageReference.fromJSON(object.availablePackageRef); } else { message.availablePackageRef = undefined; } @@ -1209,17 +1174,14 @@ export const GetAvailablePackageDetailRequest = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetAvailablePackageDetailRequest { const message = { ...baseGetAvailablePackageDetailRequest, } as GetAvailablePackageDetailRequest; - if ( - object.availablePackageRef !== undefined && - object.availablePackageRef !== null - ) { + if (object.availablePackageRef !== undefined && object.availablePackageRef !== null) { message.availablePackageRef = AvailablePackageReference.fromPartial( - object.availablePackageRef + object.availablePackageRef, ); } else { message.availablePackageRef = undefined; @@ -1238,12 +1200,12 @@ const baseGetAvailablePackageVersionsRequest: object = { pkgVersion: "" }; export const GetAvailablePackageVersionsRequest = { encode( message: GetAvailablePackageVersionsRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.availablePackageRef !== undefined) { AvailablePackageReference.encode( message.availablePackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } if (message.pkgVersion !== "") { @@ -1252,10 +1214,7 @@ export const GetAvailablePackageVersionsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetAvailablePackageVersionsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): GetAvailablePackageVersionsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1265,10 +1224,7 @@ export const GetAvailablePackageVersionsRequest = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.availablePackageRef = AvailablePackageReference.decode( - reader, - reader.uint32() - ); + message.availablePackageRef = AvailablePackageReference.decode(reader, reader.uint32()); break; case 2: message.pkgVersion = reader.string(); @@ -1285,13 +1241,8 @@ export const GetAvailablePackageVersionsRequest = { const message = { ...baseGetAvailablePackageVersionsRequest, } as GetAvailablePackageVersionsRequest; - if ( - object.availablePackageRef !== undefined && - object.availablePackageRef !== null - ) { - message.availablePackageRef = AvailablePackageReference.fromJSON( - object.availablePackageRef - ); + if (object.availablePackageRef !== undefined && object.availablePackageRef !== null) { + message.availablePackageRef = AvailablePackageReference.fromJSON(object.availablePackageRef); } else { message.availablePackageRef = undefined; } @@ -1314,17 +1265,14 @@ export const GetAvailablePackageVersionsRequest = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetAvailablePackageVersionsRequest { const message = { ...baseGetAvailablePackageVersionsRequest, } as GetAvailablePackageVersionsRequest; - if ( - object.availablePackageRef !== undefined && - object.availablePackageRef !== null - ) { + if (object.availablePackageRef !== undefined && object.availablePackageRef !== null) { message.availablePackageRef = AvailablePackageReference.fromPartial( - object.availablePackageRef + object.availablePackageRef, ); } else { message.availablePackageRef = undefined; @@ -1343,24 +1291,18 @@ const baseGetInstalledPackageSummariesRequest: object = {}; export const GetInstalledPackageSummariesRequest = { encode( message: GetInstalledPackageSummariesRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } if (message.paginationOptions !== undefined) { - PaginationOptions.encode( - message.paginationOptions, - writer.uint32(18).fork() - ).ldelim(); + PaginationOptions.encode(message.paginationOptions, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetInstalledPackageSummariesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): GetInstalledPackageSummariesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1373,10 +1315,7 @@ export const GetInstalledPackageSummariesRequest = { message.context = Context.decode(reader, reader.uint32()); break; case 2: - message.paginationOptions = PaginationOptions.decode( - reader, - reader.uint32() - ); + message.paginationOptions = PaginationOptions.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1395,13 +1334,8 @@ export const GetInstalledPackageSummariesRequest = { } else { message.context = undefined; } - if ( - object.paginationOptions !== undefined && - object.paginationOptions !== null - ) { - message.paginationOptions = PaginationOptions.fromJSON( - object.paginationOptions - ); + if (object.paginationOptions !== undefined && object.paginationOptions !== null) { + message.paginationOptions = PaginationOptions.fromJSON(object.paginationOptions); } else { message.paginationOptions = undefined; } @@ -1411,9 +1345,7 @@ export const GetInstalledPackageSummariesRequest = { toJSON(message: GetInstalledPackageSummariesRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); message.paginationOptions !== undefined && (obj.paginationOptions = message.paginationOptions ? PaginationOptions.toJSON(message.paginationOptions) @@ -1422,7 +1354,7 @@ export const GetInstalledPackageSummariesRequest = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetInstalledPackageSummariesRequest { const message = { ...baseGetInstalledPackageSummariesRequest, @@ -1432,13 +1364,8 @@ export const GetInstalledPackageSummariesRequest = { } else { message.context = undefined; } - if ( - object.paginationOptions !== undefined && - object.paginationOptions !== null - ) { - message.paginationOptions = PaginationOptions.fromPartial( - object.paginationOptions - ); + if (object.paginationOptions !== undefined && object.paginationOptions !== null) { + message.paginationOptions = PaginationOptions.fromPartial(object.paginationOptions); } else { message.paginationOptions = undefined; } @@ -1451,21 +1378,18 @@ const baseGetInstalledPackageDetailRequest: object = {}; export const GetInstalledPackageDetailRequest = { encode( message: GetInstalledPackageDetailRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetInstalledPackageDetailRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): GetInstalledPackageDetailRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1475,10 +1399,7 @@ export const GetInstalledPackageDetailRequest = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode( - reader, - reader.uint32() - ); + message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1492,13 +1413,8 @@ export const GetInstalledPackageDetailRequest = { const message = { ...baseGetInstalledPackageDetailRequest, } as GetInstalledPackageDetailRequest; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { - message.installedPackageRef = InstalledPackageReference.fromJSON( - object.installedPackageRef - ); + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { + message.installedPackageRef = InstalledPackageReference.fromJSON(object.installedPackageRef); } else { message.installedPackageRef = undefined; } @@ -1515,17 +1431,14 @@ export const GetInstalledPackageDetailRequest = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetInstalledPackageDetailRequest { const message = { ...baseGetInstalledPackageDetailRequest, } as GetInstalledPackageDetailRequest; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { message.installedPackageRef = InstalledPackageReference.fromPartial( - object.installedPackageRef + object.installedPackageRef, ); } else { message.installedPackageRef = undefined; @@ -1539,12 +1452,12 @@ const baseCreateInstalledPackageRequest: object = { name: "", values: "" }; export const CreateInstalledPackageRequest = { encode( message: CreateInstalledPackageRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.availablePackageRef !== undefined) { AvailablePackageReference.encode( message.availablePackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } if (message.targetContext !== undefined) { @@ -1554,10 +1467,7 @@ export const CreateInstalledPackageRequest = { writer.uint32(26).string(message.name); } if (message.pkgVersionReference !== undefined) { - VersionReference.encode( - message.pkgVersionReference, - writer.uint32(34).fork() - ).ldelim(); + VersionReference.encode(message.pkgVersionReference, writer.uint32(34).fork()).ldelim(); } if (message.values !== "") { writer.uint32(42).string(message.values); @@ -1565,16 +1475,13 @@ export const CreateInstalledPackageRequest = { if (message.reconciliationOptions !== undefined) { ReconciliationOptions.encode( message.reconciliationOptions, - writer.uint32(50).fork() + writer.uint32(50).fork(), ).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): CreateInstalledPackageRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): CreateInstalledPackageRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1584,10 +1491,7 @@ export const CreateInstalledPackageRequest = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.availablePackageRef = AvailablePackageReference.decode( - reader, - reader.uint32() - ); + message.availablePackageRef = AvailablePackageReference.decode(reader, reader.uint32()); break; case 2: message.targetContext = Context.decode(reader, reader.uint32()); @@ -1596,19 +1500,13 @@ export const CreateInstalledPackageRequest = { message.name = reader.string(); break; case 4: - message.pkgVersionReference = VersionReference.decode( - reader, - reader.uint32() - ); + message.pkgVersionReference = VersionReference.decode(reader, reader.uint32()); break; case 5: message.values = reader.string(); break; case 6: - message.reconciliationOptions = ReconciliationOptions.decode( - reader, - reader.uint32() - ); + message.reconciliationOptions = ReconciliationOptions.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1622,13 +1520,8 @@ export const CreateInstalledPackageRequest = { const message = { ...baseCreateInstalledPackageRequest, } as CreateInstalledPackageRequest; - if ( - object.availablePackageRef !== undefined && - object.availablePackageRef !== null - ) { - message.availablePackageRef = AvailablePackageReference.fromJSON( - object.availablePackageRef - ); + if (object.availablePackageRef !== undefined && object.availablePackageRef !== null) { + message.availablePackageRef = AvailablePackageReference.fromJSON(object.availablePackageRef); } else { message.availablePackageRef = undefined; } @@ -1642,13 +1535,8 @@ export const CreateInstalledPackageRequest = { } else { message.name = ""; } - if ( - object.pkgVersionReference !== undefined && - object.pkgVersionReference !== null - ) { - message.pkgVersionReference = VersionReference.fromJSON( - object.pkgVersionReference - ); + if (object.pkgVersionReference !== undefined && object.pkgVersionReference !== null) { + message.pkgVersionReference = VersionReference.fromJSON(object.pkgVersionReference); } else { message.pkgVersionReference = undefined; } @@ -1657,13 +1545,8 @@ export const CreateInstalledPackageRequest = { } else { message.values = ""; } - if ( - object.reconciliationOptions !== undefined && - object.reconciliationOptions !== null - ) { - message.reconciliationOptions = ReconciliationOptions.fromJSON( - object.reconciliationOptions - ); + if (object.reconciliationOptions !== undefined && object.reconciliationOptions !== null) { + message.reconciliationOptions = ReconciliationOptions.fromJSON(object.reconciliationOptions); } else { message.reconciliationOptions = undefined; } @@ -1693,18 +1576,13 @@ export const CreateInstalledPackageRequest = { return obj; }, - fromPartial( - object: DeepPartial - ): CreateInstalledPackageRequest { + fromPartial(object: DeepPartial): CreateInstalledPackageRequest { const message = { ...baseCreateInstalledPackageRequest, } as CreateInstalledPackageRequest; - if ( - object.availablePackageRef !== undefined && - object.availablePackageRef !== null - ) { + if (object.availablePackageRef !== undefined && object.availablePackageRef !== null) { message.availablePackageRef = AvailablePackageReference.fromPartial( - object.availablePackageRef + object.availablePackageRef, ); } else { message.availablePackageRef = undefined; @@ -1719,13 +1597,8 @@ export const CreateInstalledPackageRequest = { } else { message.name = ""; } - if ( - object.pkgVersionReference !== undefined && - object.pkgVersionReference !== null - ) { - message.pkgVersionReference = VersionReference.fromPartial( - object.pkgVersionReference - ); + if (object.pkgVersionReference !== undefined && object.pkgVersionReference !== null) { + message.pkgVersionReference = VersionReference.fromPartial(object.pkgVersionReference); } else { message.pkgVersionReference = undefined; } @@ -1734,12 +1607,9 @@ export const CreateInstalledPackageRequest = { } else { message.values = ""; } - if ( - object.reconciliationOptions !== undefined && - object.reconciliationOptions !== null - ) { + if (object.reconciliationOptions !== undefined && object.reconciliationOptions !== null) { message.reconciliationOptions = ReconciliationOptions.fromPartial( - object.reconciliationOptions + object.reconciliationOptions, ); } else { message.reconciliationOptions = undefined; @@ -1753,19 +1623,16 @@ const baseUpdateInstalledPackageRequest: object = { values: "" }; export const UpdateInstalledPackageRequest = { encode( message: UpdateInstalledPackageRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } if (message.pkgVersionReference !== undefined) { - VersionReference.encode( - message.pkgVersionReference, - writer.uint32(18).fork() - ).ldelim(); + VersionReference.encode(message.pkgVersionReference, writer.uint32(18).fork()).ldelim(); } if (message.values !== "") { writer.uint32(26).string(message.values); @@ -1773,16 +1640,13 @@ export const UpdateInstalledPackageRequest = { if (message.reconciliationOptions !== undefined) { ReconciliationOptions.encode( message.reconciliationOptions, - writer.uint32(34).fork() + writer.uint32(34).fork(), ).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): UpdateInstalledPackageRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateInstalledPackageRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1792,25 +1656,16 @@ export const UpdateInstalledPackageRequest = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode( - reader, - reader.uint32() - ); + message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); break; case 2: - message.pkgVersionReference = VersionReference.decode( - reader, - reader.uint32() - ); + message.pkgVersionReference = VersionReference.decode(reader, reader.uint32()); break; case 3: message.values = reader.string(); break; case 4: - message.reconciliationOptions = ReconciliationOptions.decode( - reader, - reader.uint32() - ); + message.reconciliationOptions = ReconciliationOptions.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1824,23 +1679,13 @@ export const UpdateInstalledPackageRequest = { const message = { ...baseUpdateInstalledPackageRequest, } as UpdateInstalledPackageRequest; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { - message.installedPackageRef = InstalledPackageReference.fromJSON( - object.installedPackageRef - ); + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { + message.installedPackageRef = InstalledPackageReference.fromJSON(object.installedPackageRef); } else { message.installedPackageRef = undefined; } - if ( - object.pkgVersionReference !== undefined && - object.pkgVersionReference !== null - ) { - message.pkgVersionReference = VersionReference.fromJSON( - object.pkgVersionReference - ); + if (object.pkgVersionReference !== undefined && object.pkgVersionReference !== null) { + message.pkgVersionReference = VersionReference.fromJSON(object.pkgVersionReference); } else { message.pkgVersionReference = undefined; } @@ -1849,13 +1694,8 @@ export const UpdateInstalledPackageRequest = { } else { message.values = ""; } - if ( - object.reconciliationOptions !== undefined && - object.reconciliationOptions !== null - ) { - message.reconciliationOptions = ReconciliationOptions.fromJSON( - object.reconciliationOptions - ); + if (object.reconciliationOptions !== undefined && object.reconciliationOptions !== null) { + message.reconciliationOptions = ReconciliationOptions.fromJSON(object.reconciliationOptions); } else { message.reconciliationOptions = undefined; } @@ -1880,29 +1720,19 @@ export const UpdateInstalledPackageRequest = { return obj; }, - fromPartial( - object: DeepPartial - ): UpdateInstalledPackageRequest { + fromPartial(object: DeepPartial): UpdateInstalledPackageRequest { const message = { ...baseUpdateInstalledPackageRequest, } as UpdateInstalledPackageRequest; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { message.installedPackageRef = InstalledPackageReference.fromPartial( - object.installedPackageRef + object.installedPackageRef, ); } else { message.installedPackageRef = undefined; } - if ( - object.pkgVersionReference !== undefined && - object.pkgVersionReference !== null - ) { - message.pkgVersionReference = VersionReference.fromPartial( - object.pkgVersionReference - ); + if (object.pkgVersionReference !== undefined && object.pkgVersionReference !== null) { + message.pkgVersionReference = VersionReference.fromPartial(object.pkgVersionReference); } else { message.pkgVersionReference = undefined; } @@ -1911,12 +1741,9 @@ export const UpdateInstalledPackageRequest = { } else { message.values = ""; } - if ( - object.reconciliationOptions !== undefined && - object.reconciliationOptions !== null - ) { + if (object.reconciliationOptions !== undefined && object.reconciliationOptions !== null) { message.reconciliationOptions = ReconciliationOptions.fromPartial( - object.reconciliationOptions + object.reconciliationOptions, ); } else { message.reconciliationOptions = undefined; @@ -1930,21 +1757,18 @@ const baseDeleteInstalledPackageRequest: object = {}; export const DeleteInstalledPackageRequest = { encode( message: DeleteInstalledPackageRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): DeleteInstalledPackageRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteInstalledPackageRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1954,10 +1778,7 @@ export const DeleteInstalledPackageRequest = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode( - reader, - reader.uint32() - ); + message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1971,13 +1792,8 @@ export const DeleteInstalledPackageRequest = { const message = { ...baseDeleteInstalledPackageRequest, } as DeleteInstalledPackageRequest; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { - message.installedPackageRef = InstalledPackageReference.fromJSON( - object.installedPackageRef - ); + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { + message.installedPackageRef = InstalledPackageReference.fromJSON(object.installedPackageRef); } else { message.installedPackageRef = undefined; } @@ -1993,18 +1809,13 @@ export const DeleteInstalledPackageRequest = { return obj; }, - fromPartial( - object: DeepPartial - ): DeleteInstalledPackageRequest { + fromPartial(object: DeepPartial): DeleteInstalledPackageRequest { const message = { ...baseDeleteInstalledPackageRequest, } as DeleteInstalledPackageRequest; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { message.installedPackageRef = InstalledPackageReference.fromPartial( - object.installedPackageRef + object.installedPackageRef, ); } else { message.installedPackageRef = undefined; @@ -2018,21 +1829,18 @@ const baseGetInstalledPackageResourceRefsRequest: object = {}; export const GetInstalledPackageResourceRefsRequest = { encode( message: GetInstalledPackageResourceRefsRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetInstalledPackageResourceRefsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): GetInstalledPackageResourceRefsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2042,10 +1850,7 @@ export const GetInstalledPackageResourceRefsRequest = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode( - reader, - reader.uint32() - ); + message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2059,13 +1864,8 @@ export const GetInstalledPackageResourceRefsRequest = { const message = { ...baseGetInstalledPackageResourceRefsRequest, } as GetInstalledPackageResourceRefsRequest; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { - message.installedPackageRef = InstalledPackageReference.fromJSON( - object.installedPackageRef - ); + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { + message.installedPackageRef = InstalledPackageReference.fromJSON(object.installedPackageRef); } else { message.installedPackageRef = undefined; } @@ -2082,17 +1882,14 @@ export const GetInstalledPackageResourceRefsRequest = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetInstalledPackageResourceRefsRequest { const message = { ...baseGetInstalledPackageResourceRefsRequest, } as GetInstalledPackageResourceRefsRequest; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { message.installedPackageRef = InstalledPackageReference.fromPartial( - object.installedPackageRef + object.installedPackageRef, ); } else { message.installedPackageRef = undefined; @@ -2109,7 +1906,7 @@ const baseGetAvailablePackageSummariesResponse: object = { export const GetAvailablePackageSummariesResponse = { encode( message: GetAvailablePackageSummariesResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { for (const v of message.availablePackageSummaries) { AvailablePackageSummary.encode(v!, writer.uint32(10).fork()).ldelim(); @@ -2123,10 +1920,7 @@ export const GetAvailablePackageSummariesResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetAvailablePackageSummariesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetAvailablePackageSummariesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2139,7 +1933,7 @@ export const GetAvailablePackageSummariesResponse = { switch (tag >>> 3) { case 1: message.availablePackageSummaries.push( - AvailablePackageSummary.decode(reader, reader.uint32()) + AvailablePackageSummary.decode(reader, reader.uint32()), ); break; case 2: @@ -2167,9 +1961,7 @@ export const GetAvailablePackageSummariesResponse = { object.availablePackageSummaries !== null ) { for (const e of object.availablePackageSummaries) { - message.availablePackageSummaries.push( - AvailablePackageSummary.fromJSON(e) - ); + message.availablePackageSummaries.push(AvailablePackageSummary.fromJSON(e)); } } if (object.nextPageToken !== undefined && object.nextPageToken !== null) { @@ -2188,16 +1980,15 @@ export const GetAvailablePackageSummariesResponse = { toJSON(message: GetAvailablePackageSummariesResponse): unknown { const obj: any = {}; if (message.availablePackageSummaries) { - obj.availablePackageSummaries = message.availablePackageSummaries.map( - (e) => (e ? AvailablePackageSummary.toJSON(e) : undefined) + obj.availablePackageSummaries = message.availablePackageSummaries.map(e => + e ? AvailablePackageSummary.toJSON(e) : undefined, ); } else { obj.availablePackageSummaries = []; } - message.nextPageToken !== undefined && - (obj.nextPageToken = message.nextPageToken); + message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken); if (message.categories) { - obj.categories = message.categories.map((e) => e); + obj.categories = message.categories.map(e => e); } else { obj.categories = []; } @@ -2205,7 +1996,7 @@ export const GetAvailablePackageSummariesResponse = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetAvailablePackageSummariesResponse { const message = { ...baseGetAvailablePackageSummariesResponse, @@ -2217,9 +2008,7 @@ export const GetAvailablePackageSummariesResponse = { object.availablePackageSummaries !== null ) { for (const e of object.availablePackageSummaries) { - message.availablePackageSummaries.push( - AvailablePackageSummary.fromPartial(e) - ); + message.availablePackageSummaries.push(AvailablePackageSummary.fromPartial(e)); } } if (object.nextPageToken !== undefined && object.nextPageToken !== null) { @@ -2241,21 +2030,18 @@ const baseGetAvailablePackageDetailResponse: object = {}; export const GetAvailablePackageDetailResponse = { encode( message: GetAvailablePackageDetailResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.availablePackageDetail !== undefined) { AvailablePackageDetail.encode( message.availablePackageDetail, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetAvailablePackageDetailResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetAvailablePackageDetailResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2265,10 +2051,7 @@ export const GetAvailablePackageDetailResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.availablePackageDetail = AvailablePackageDetail.decode( - reader, - reader.uint32() - ); + message.availablePackageDetail = AvailablePackageDetail.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2282,12 +2065,9 @@ export const GetAvailablePackageDetailResponse = { const message = { ...baseGetAvailablePackageDetailResponse, } as GetAvailablePackageDetailResponse; - if ( - object.availablePackageDetail !== undefined && - object.availablePackageDetail !== null - ) { + if (object.availablePackageDetail !== undefined && object.availablePackageDetail !== null) { message.availablePackageDetail = AvailablePackageDetail.fromJSON( - object.availablePackageDetail + object.availablePackageDetail, ); } else { message.availablePackageDetail = undefined; @@ -2305,17 +2085,14 @@ export const GetAvailablePackageDetailResponse = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetAvailablePackageDetailResponse { const message = { ...baseGetAvailablePackageDetailResponse, } as GetAvailablePackageDetailResponse; - if ( - object.availablePackageDetail !== undefined && - object.availablePackageDetail !== null - ) { + if (object.availablePackageDetail !== undefined && object.availablePackageDetail !== null) { message.availablePackageDetail = AvailablePackageDetail.fromPartial( - object.availablePackageDetail + object.availablePackageDetail, ); } else { message.availablePackageDetail = undefined; @@ -2329,7 +2106,7 @@ const baseGetAvailablePackageVersionsResponse: object = {}; export const GetAvailablePackageVersionsResponse = { encode( message: GetAvailablePackageVersionsResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { for (const v of message.packageAppVersions) { PackageAppVersion.encode(v!, writer.uint32(10).fork()).ldelim(); @@ -2337,10 +2114,7 @@ export const GetAvailablePackageVersionsResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetAvailablePackageVersionsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetAvailablePackageVersionsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2351,9 +2125,7 @@ export const GetAvailablePackageVersionsResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.packageAppVersions.push( - PackageAppVersion.decode(reader, reader.uint32()) - ); + message.packageAppVersions.push(PackageAppVersion.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -2368,10 +2140,7 @@ export const GetAvailablePackageVersionsResponse = { ...baseGetAvailablePackageVersionsResponse, } as GetAvailablePackageVersionsResponse; message.packageAppVersions = []; - if ( - object.packageAppVersions !== undefined && - object.packageAppVersions !== null - ) { + if (object.packageAppVersions !== undefined && object.packageAppVersions !== null) { for (const e of object.packageAppVersions) { message.packageAppVersions.push(PackageAppVersion.fromJSON(e)); } @@ -2382,8 +2151,8 @@ export const GetAvailablePackageVersionsResponse = { toJSON(message: GetAvailablePackageVersionsResponse): unknown { const obj: any = {}; if (message.packageAppVersions) { - obj.packageAppVersions = message.packageAppVersions.map((e) => - e ? PackageAppVersion.toJSON(e) : undefined + obj.packageAppVersions = message.packageAppVersions.map(e => + e ? PackageAppVersion.toJSON(e) : undefined, ); } else { obj.packageAppVersions = []; @@ -2392,16 +2161,13 @@ export const GetAvailablePackageVersionsResponse = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetAvailablePackageVersionsResponse { const message = { ...baseGetAvailablePackageVersionsResponse, } as GetAvailablePackageVersionsResponse; message.packageAppVersions = []; - if ( - object.packageAppVersions !== undefined && - object.packageAppVersions !== null - ) { + if (object.packageAppVersions !== undefined && object.packageAppVersions !== null) { for (const e of object.packageAppVersions) { message.packageAppVersions.push(PackageAppVersion.fromPartial(e)); } @@ -2415,7 +2181,7 @@ const baseGetInstalledPackageSummariesResponse: object = { nextPageToken: "" }; export const GetInstalledPackageSummariesResponse = { encode( message: GetInstalledPackageSummariesResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { for (const v of message.installedPackageSummaries) { InstalledPackageSummary.encode(v!, writer.uint32(10).fork()).ldelim(); @@ -2426,10 +2192,7 @@ export const GetInstalledPackageSummariesResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetInstalledPackageSummariesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetInstalledPackageSummariesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2441,7 +2204,7 @@ export const GetInstalledPackageSummariesResponse = { switch (tag >>> 3) { case 1: message.installedPackageSummaries.push( - InstalledPackageSummary.decode(reader, reader.uint32()) + InstalledPackageSummary.decode(reader, reader.uint32()), ); break; case 2: @@ -2465,9 +2228,7 @@ export const GetInstalledPackageSummariesResponse = { object.installedPackageSummaries !== null ) { for (const e of object.installedPackageSummaries) { - message.installedPackageSummaries.push( - InstalledPackageSummary.fromJSON(e) - ); + message.installedPackageSummaries.push(InstalledPackageSummary.fromJSON(e)); } } if (object.nextPageToken !== undefined && object.nextPageToken !== null) { @@ -2481,19 +2242,18 @@ export const GetInstalledPackageSummariesResponse = { toJSON(message: GetInstalledPackageSummariesResponse): unknown { const obj: any = {}; if (message.installedPackageSummaries) { - obj.installedPackageSummaries = message.installedPackageSummaries.map( - (e) => (e ? InstalledPackageSummary.toJSON(e) : undefined) + obj.installedPackageSummaries = message.installedPackageSummaries.map(e => + e ? InstalledPackageSummary.toJSON(e) : undefined, ); } else { obj.installedPackageSummaries = []; } - message.nextPageToken !== undefined && - (obj.nextPageToken = message.nextPageToken); + message.nextPageToken !== undefined && (obj.nextPageToken = message.nextPageToken); return obj; }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetInstalledPackageSummariesResponse { const message = { ...baseGetInstalledPackageSummariesResponse, @@ -2504,9 +2264,7 @@ export const GetInstalledPackageSummariesResponse = { object.installedPackageSummaries !== null ) { for (const e of object.installedPackageSummaries) { - message.installedPackageSummaries.push( - InstalledPackageSummary.fromPartial(e) - ); + message.installedPackageSummaries.push(InstalledPackageSummary.fromPartial(e)); } } if (object.nextPageToken !== undefined && object.nextPageToken !== null) { @@ -2523,21 +2281,18 @@ const baseGetInstalledPackageDetailResponse: object = {}; export const GetInstalledPackageDetailResponse = { encode( message: GetInstalledPackageDetailResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.installedPackageDetail !== undefined) { InstalledPackageDetail.encode( message.installedPackageDetail, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetInstalledPackageDetailResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetInstalledPackageDetailResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2547,10 +2302,7 @@ export const GetInstalledPackageDetailResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageDetail = InstalledPackageDetail.decode( - reader, - reader.uint32() - ); + message.installedPackageDetail = InstalledPackageDetail.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2564,12 +2316,9 @@ export const GetInstalledPackageDetailResponse = { const message = { ...baseGetInstalledPackageDetailResponse, } as GetInstalledPackageDetailResponse; - if ( - object.installedPackageDetail !== undefined && - object.installedPackageDetail !== null - ) { + if (object.installedPackageDetail !== undefined && object.installedPackageDetail !== null) { message.installedPackageDetail = InstalledPackageDetail.fromJSON( - object.installedPackageDetail + object.installedPackageDetail, ); } else { message.installedPackageDetail = undefined; @@ -2587,17 +2336,14 @@ export const GetInstalledPackageDetailResponse = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetInstalledPackageDetailResponse { const message = { ...baseGetInstalledPackageDetailResponse, } as GetInstalledPackageDetailResponse; - if ( - object.installedPackageDetail !== undefined && - object.installedPackageDetail !== null - ) { + if (object.installedPackageDetail !== undefined && object.installedPackageDetail !== null) { message.installedPackageDetail = InstalledPackageDetail.fromPartial( - object.installedPackageDetail + object.installedPackageDetail, ); } else { message.installedPackageDetail = undefined; @@ -2611,21 +2357,18 @@ const baseCreateInstalledPackageResponse: object = {}; export const CreateInstalledPackageResponse = { encode( message: CreateInstalledPackageResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): CreateInstalledPackageResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): CreateInstalledPackageResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2635,10 +2378,7 @@ export const CreateInstalledPackageResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode( - reader, - reader.uint32() - ); + message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2652,13 +2392,8 @@ export const CreateInstalledPackageResponse = { const message = { ...baseCreateInstalledPackageResponse, } as CreateInstalledPackageResponse; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { - message.installedPackageRef = InstalledPackageReference.fromJSON( - object.installedPackageRef - ); + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { + message.installedPackageRef = InstalledPackageReference.fromJSON(object.installedPackageRef); } else { message.installedPackageRef = undefined; } @@ -2674,18 +2409,13 @@ export const CreateInstalledPackageResponse = { return obj; }, - fromPartial( - object: DeepPartial - ): CreateInstalledPackageResponse { + fromPartial(object: DeepPartial): CreateInstalledPackageResponse { const message = { ...baseCreateInstalledPackageResponse, } as CreateInstalledPackageResponse; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { message.installedPackageRef = InstalledPackageReference.fromPartial( - object.installedPackageRef + object.installedPackageRef, ); } else { message.installedPackageRef = undefined; @@ -2699,21 +2429,18 @@ const baseUpdateInstalledPackageResponse: object = {}; export const UpdateInstalledPackageResponse = { encode( message: UpdateInstalledPackageResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): UpdateInstalledPackageResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): UpdateInstalledPackageResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2723,10 +2450,7 @@ export const UpdateInstalledPackageResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode( - reader, - reader.uint32() - ); + message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2740,13 +2464,8 @@ export const UpdateInstalledPackageResponse = { const message = { ...baseUpdateInstalledPackageResponse, } as UpdateInstalledPackageResponse; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { - message.installedPackageRef = InstalledPackageReference.fromJSON( - object.installedPackageRef - ); + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { + message.installedPackageRef = InstalledPackageReference.fromJSON(object.installedPackageRef); } else { message.installedPackageRef = undefined; } @@ -2762,18 +2481,13 @@ export const UpdateInstalledPackageResponse = { return obj; }, - fromPartial( - object: DeepPartial - ): UpdateInstalledPackageResponse { + fromPartial(object: DeepPartial): UpdateInstalledPackageResponse { const message = { ...baseUpdateInstalledPackageResponse, } as UpdateInstalledPackageResponse; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { message.installedPackageRef = InstalledPackageReference.fromPartial( - object.installedPackageRef + object.installedPackageRef, ); } else { message.installedPackageRef = undefined; @@ -2785,17 +2499,11 @@ export const UpdateInstalledPackageResponse = { const baseDeleteInstalledPackageResponse: object = {}; export const DeleteInstalledPackageResponse = { - encode( - _: DeleteInstalledPackageResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: DeleteInstalledPackageResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): DeleteInstalledPackageResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): DeleteInstalledPackageResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2824,9 +2532,7 @@ export const DeleteInstalledPackageResponse = { return obj; }, - fromPartial( - _: DeepPartial - ): DeleteInstalledPackageResponse { + fromPartial(_: DeepPartial): DeleteInstalledPackageResponse { const message = { ...baseDeleteInstalledPackageResponse, } as DeleteInstalledPackageResponse; @@ -2839,7 +2545,7 @@ const baseGetInstalledPackageResourceRefsResponse: object = {}; export const GetInstalledPackageResourceRefsResponse = { encode( message: GetInstalledPackageResourceRefsResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); @@ -2850,10 +2556,7 @@ export const GetInstalledPackageResourceRefsResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetInstalledPackageResourceRefsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetInstalledPackageResourceRefsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2867,9 +2570,7 @@ export const GetInstalledPackageResourceRefsResponse = { message.context = Context.decode(reader, reader.uint32()); break; case 2: - message.resourceRefs.push( - ResourceRef.decode(reader, reader.uint32()) - ); + message.resourceRefs.push(ResourceRef.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -2900,13 +2601,9 @@ export const GetInstalledPackageResourceRefsResponse = { toJSON(message: GetInstalledPackageResourceRefsResponse): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); if (message.resourceRefs) { - obj.resourceRefs = message.resourceRefs.map((e) => - e ? ResourceRef.toJSON(e) : undefined - ); + obj.resourceRefs = message.resourceRefs.map(e => (e ? ResourceRef.toJSON(e) : undefined)); } else { obj.resourceRefs = []; } @@ -2914,7 +2611,7 @@ export const GetInstalledPackageResourceRefsResponse = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetInstalledPackageResourceRefsResponse { const message = { ...baseGetInstalledPackageResourceRefsResponse, @@ -2943,24 +2640,18 @@ const baseAvailablePackageSummary: object = { }; export const AvailablePackageSummary = { - encode( - message: AvailablePackageSummary, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AvailablePackageSummary, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.availablePackageRef !== undefined) { AvailablePackageReference.encode( message.availablePackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } if (message.name !== "") { writer.uint32(18).string(message.name); } if (message.latestVersion !== undefined) { - PackageAppVersion.encode( - message.latestVersion, - writer.uint32(26).fork() - ).ldelim(); + PackageAppVersion.encode(message.latestVersion, writer.uint32(26).fork()).ldelim(); } if (message.iconUrl !== "") { writer.uint32(34).string(message.iconUrl); @@ -2977,10 +2668,7 @@ export const AvailablePackageSummary = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): AvailablePackageSummary { + decode(input: _m0.Reader | Uint8Array, length?: number): AvailablePackageSummary { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2991,19 +2679,13 @@ export const AvailablePackageSummary = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.availablePackageRef = AvailablePackageReference.decode( - reader, - reader.uint32() - ); + message.availablePackageRef = AvailablePackageReference.decode(reader, reader.uint32()); break; case 2: message.name = reader.string(); break; case 3: - message.latestVersion = PackageAppVersion.decode( - reader, - reader.uint32() - ); + message.latestVersion = PackageAppVersion.decode(reader, reader.uint32()); break; case 4: message.iconUrl = reader.string(); @@ -3030,13 +2712,8 @@ export const AvailablePackageSummary = { ...baseAvailablePackageSummary, } as AvailablePackageSummary; message.categories = []; - if ( - object.availablePackageRef !== undefined && - object.availablePackageRef !== null - ) { - message.availablePackageRef = AvailablePackageReference.fromJSON( - object.availablePackageRef - ); + if (object.availablePackageRef !== undefined && object.availablePackageRef !== null) { + message.availablePackageRef = AvailablePackageReference.fromJSON(object.availablePackageRef); } else { message.availablePackageRef = undefined; } @@ -3060,10 +2737,7 @@ export const AvailablePackageSummary = { } else { message.displayName = ""; } - if ( - object.shortDescription !== undefined && - object.shortDescription !== null - ) { + if (object.shortDescription !== undefined && object.shortDescription !== null) { message.shortDescription = String(object.shortDescription); } else { message.shortDescription = ""; @@ -3088,31 +2762,24 @@ export const AvailablePackageSummary = { ? PackageAppVersion.toJSON(message.latestVersion) : undefined); message.iconUrl !== undefined && (obj.iconUrl = message.iconUrl); - message.displayName !== undefined && - (obj.displayName = message.displayName); - message.shortDescription !== undefined && - (obj.shortDescription = message.shortDescription); + message.displayName !== undefined && (obj.displayName = message.displayName); + message.shortDescription !== undefined && (obj.shortDescription = message.shortDescription); if (message.categories) { - obj.categories = message.categories.map((e) => e); + obj.categories = message.categories.map(e => e); } else { obj.categories = []; } return obj; }, - fromPartial( - object: DeepPartial - ): AvailablePackageSummary { + fromPartial(object: DeepPartial): AvailablePackageSummary { const message = { ...baseAvailablePackageSummary, } as AvailablePackageSummary; message.categories = []; - if ( - object.availablePackageRef !== undefined && - object.availablePackageRef !== null - ) { + if (object.availablePackageRef !== undefined && object.availablePackageRef !== null) { message.availablePackageRef = AvailablePackageReference.fromPartial( - object.availablePackageRef + object.availablePackageRef, ); } else { message.availablePackageRef = undefined; @@ -3123,9 +2790,7 @@ export const AvailablePackageSummary = { message.name = ""; } if (object.latestVersion !== undefined && object.latestVersion !== null) { - message.latestVersion = PackageAppVersion.fromPartial( - object.latestVersion - ); + message.latestVersion = PackageAppVersion.fromPartial(object.latestVersion); } else { message.latestVersion = undefined; } @@ -3139,10 +2804,7 @@ export const AvailablePackageSummary = { } else { message.displayName = ""; } - if ( - object.shortDescription !== undefined && - object.shortDescription !== null - ) { + if (object.shortDescription !== undefined && object.shortDescription !== null) { message.shortDescription = object.shortDescription; } else { message.shortDescription = ""; @@ -3172,24 +2834,18 @@ const baseAvailablePackageDetail: object = { }; export const AvailablePackageDetail = { - encode( - message: AvailablePackageDetail, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AvailablePackageDetail, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.availablePackageRef !== undefined) { AvailablePackageReference.encode( message.availablePackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } if (message.name !== "") { writer.uint32(18).string(message.name); } if (message.version !== undefined) { - PackageAppVersion.encode( - message.version, - writer.uint32(26).fork() - ).ldelim(); + PackageAppVersion.encode(message.version, writer.uint32(26).fork()).ldelim(); } if (message.repoUrl !== "") { writer.uint32(34).string(message.repoUrl); @@ -3233,10 +2889,7 @@ export const AvailablePackageDetail = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): AvailablePackageDetail { + decode(input: _m0.Reader | Uint8Array, length?: number): AvailablePackageDetail { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseAvailablePackageDetail } as AvailablePackageDetail; @@ -3247,10 +2900,7 @@ export const AvailablePackageDetail = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.availablePackageRef = AvailablePackageReference.decode( - reader, - reader.uint32() - ); + message.availablePackageRef = AvailablePackageReference.decode(reader, reader.uint32()); break; case 2: message.name = reader.string(); @@ -3310,13 +2960,8 @@ export const AvailablePackageDetail = { message.sourceUrls = []; message.maintainers = []; message.categories = []; - if ( - object.availablePackageRef !== undefined && - object.availablePackageRef !== null - ) { - message.availablePackageRef = AvailablePackageReference.fromJSON( - object.availablePackageRef - ); + if (object.availablePackageRef !== undefined && object.availablePackageRef !== null) { + message.availablePackageRef = AvailablePackageReference.fromJSON(object.availablePackageRef); } else { message.availablePackageRef = undefined; } @@ -3350,18 +2995,12 @@ export const AvailablePackageDetail = { } else { message.displayName = ""; } - if ( - object.shortDescription !== undefined && - object.shortDescription !== null - ) { + if (object.shortDescription !== undefined && object.shortDescription !== null) { message.shortDescription = String(object.shortDescription); } else { message.shortDescription = ""; } - if ( - object.longDescription !== undefined && - object.longDescription !== null - ) { + if (object.longDescription !== undefined && object.longDescription !== null) { message.longDescription = String(object.longDescription); } else { message.longDescription = ""; @@ -3412,60 +3051,44 @@ export const AvailablePackageDetail = { : undefined); message.name !== undefined && (obj.name = message.name); message.version !== undefined && - (obj.version = message.version - ? PackageAppVersion.toJSON(message.version) - : undefined); + (obj.version = message.version ? PackageAppVersion.toJSON(message.version) : undefined); message.repoUrl !== undefined && (obj.repoUrl = message.repoUrl); message.homeUrl !== undefined && (obj.homeUrl = message.homeUrl); message.iconUrl !== undefined && (obj.iconUrl = message.iconUrl); - message.displayName !== undefined && - (obj.displayName = message.displayName); - message.shortDescription !== undefined && - (obj.shortDescription = message.shortDescription); - message.longDescription !== undefined && - (obj.longDescription = message.longDescription); + message.displayName !== undefined && (obj.displayName = message.displayName); + message.shortDescription !== undefined && (obj.shortDescription = message.shortDescription); + message.longDescription !== undefined && (obj.longDescription = message.longDescription); message.readme !== undefined && (obj.readme = message.readme); - message.defaultValues !== undefined && - (obj.defaultValues = message.defaultValues); - message.valuesSchema !== undefined && - (obj.valuesSchema = message.valuesSchema); + message.defaultValues !== undefined && (obj.defaultValues = message.defaultValues); + message.valuesSchema !== undefined && (obj.valuesSchema = message.valuesSchema); if (message.sourceUrls) { - obj.sourceUrls = message.sourceUrls.map((e) => e); + obj.sourceUrls = message.sourceUrls.map(e => e); } else { obj.sourceUrls = []; } if (message.maintainers) { - obj.maintainers = message.maintainers.map((e) => - e ? Maintainer.toJSON(e) : undefined - ); + obj.maintainers = message.maintainers.map(e => (e ? Maintainer.toJSON(e) : undefined)); } else { obj.maintainers = []; } if (message.categories) { - obj.categories = message.categories.map((e) => e); + obj.categories = message.categories.map(e => e); } else { obj.categories = []; } message.customDetail !== undefined && - (obj.customDetail = message.customDetail - ? Any.toJSON(message.customDetail) - : undefined); + (obj.customDetail = message.customDetail ? Any.toJSON(message.customDetail) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): AvailablePackageDetail { + fromPartial(object: DeepPartial): AvailablePackageDetail { const message = { ...baseAvailablePackageDetail } as AvailablePackageDetail; message.sourceUrls = []; message.maintainers = []; message.categories = []; - if ( - object.availablePackageRef !== undefined && - object.availablePackageRef !== null - ) { + if (object.availablePackageRef !== undefined && object.availablePackageRef !== null) { message.availablePackageRef = AvailablePackageReference.fromPartial( - object.availablePackageRef + object.availablePackageRef, ); } else { message.availablePackageRef = undefined; @@ -3500,18 +3123,12 @@ export const AvailablePackageDetail = { } else { message.displayName = ""; } - if ( - object.shortDescription !== undefined && - object.shortDescription !== null - ) { + if (object.shortDescription !== undefined && object.shortDescription !== null) { message.shortDescription = object.shortDescription; } else { message.shortDescription = ""; } - if ( - object.longDescription !== undefined && - object.longDescription !== null - ) { + if (object.longDescription !== undefined && object.longDescription !== null) { message.longDescription = object.longDescription; } else { message.longDescription = ""; @@ -3563,30 +3180,21 @@ const baseInstalledPackageSummary: object = { }; export const InstalledPackageSummary = { - encode( - message: InstalledPackageSummary, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: InstalledPackageSummary, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } if (message.name !== "") { writer.uint32(18).string(message.name); } if (message.pkgVersionReference !== undefined) { - VersionReference.encode( - message.pkgVersionReference, - writer.uint32(26).fork() - ).ldelim(); + VersionReference.encode(message.pkgVersionReference, writer.uint32(26).fork()).ldelim(); } if (message.currentVersion !== undefined) { - PackageAppVersion.encode( - message.currentVersion, - writer.uint32(34).fork() - ).ldelim(); + PackageAppVersion.encode(message.currentVersion, writer.uint32(34).fork()).ldelim(); } if (message.iconUrl !== "") { writer.uint32(42).string(message.iconUrl); @@ -3598,30 +3206,18 @@ export const InstalledPackageSummary = { writer.uint32(58).string(message.shortDescription); } if (message.latestMatchingVersion !== undefined) { - PackageAppVersion.encode( - message.latestMatchingVersion, - writer.uint32(66).fork() - ).ldelim(); + PackageAppVersion.encode(message.latestMatchingVersion, writer.uint32(66).fork()).ldelim(); } if (message.latestVersion !== undefined) { - PackageAppVersion.encode( - message.latestVersion, - writer.uint32(74).fork() - ).ldelim(); + PackageAppVersion.encode(message.latestVersion, writer.uint32(74).fork()).ldelim(); } if (message.status !== undefined) { - InstalledPackageStatus.encode( - message.status, - writer.uint32(82).fork() - ).ldelim(); + InstalledPackageStatus.encode(message.status, writer.uint32(82).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): InstalledPackageSummary { + decode(input: _m0.Reader | Uint8Array, length?: number): InstalledPackageSummary { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -3631,25 +3227,16 @@ export const InstalledPackageSummary = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode( - reader, - reader.uint32() - ); + message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); break; case 2: message.name = reader.string(); break; case 3: - message.pkgVersionReference = VersionReference.decode( - reader, - reader.uint32() - ); + message.pkgVersionReference = VersionReference.decode(reader, reader.uint32()); break; case 4: - message.currentVersion = PackageAppVersion.decode( - reader, - reader.uint32() - ); + message.currentVersion = PackageAppVersion.decode(reader, reader.uint32()); break; case 5: message.iconUrl = reader.string(); @@ -3661,22 +3248,13 @@ export const InstalledPackageSummary = { message.shortDescription = reader.string(); break; case 8: - message.latestMatchingVersion = PackageAppVersion.decode( - reader, - reader.uint32() - ); + message.latestMatchingVersion = PackageAppVersion.decode(reader, reader.uint32()); break; case 9: - message.latestVersion = PackageAppVersion.decode( - reader, - reader.uint32() - ); + message.latestVersion = PackageAppVersion.decode(reader, reader.uint32()); break; case 10: - message.status = InstalledPackageStatus.decode( - reader, - reader.uint32() - ); + message.status = InstalledPackageStatus.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3690,13 +3268,8 @@ export const InstalledPackageSummary = { const message = { ...baseInstalledPackageSummary, } as InstalledPackageSummary; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { - message.installedPackageRef = InstalledPackageReference.fromJSON( - object.installedPackageRef - ); + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { + message.installedPackageRef = InstalledPackageReference.fromJSON(object.installedPackageRef); } else { message.installedPackageRef = undefined; } @@ -3705,20 +3278,13 @@ export const InstalledPackageSummary = { } else { message.name = ""; } - if ( - object.pkgVersionReference !== undefined && - object.pkgVersionReference !== null - ) { - message.pkgVersionReference = VersionReference.fromJSON( - object.pkgVersionReference - ); + if (object.pkgVersionReference !== undefined && object.pkgVersionReference !== null) { + message.pkgVersionReference = VersionReference.fromJSON(object.pkgVersionReference); } else { message.pkgVersionReference = undefined; } if (object.currentVersion !== undefined && object.currentVersion !== null) { - message.currentVersion = PackageAppVersion.fromJSON( - object.currentVersion - ); + message.currentVersion = PackageAppVersion.fromJSON(object.currentVersion); } else { message.currentVersion = undefined; } @@ -3732,21 +3298,13 @@ export const InstalledPackageSummary = { } else { message.pkgDisplayName = ""; } - if ( - object.shortDescription !== undefined && - object.shortDescription !== null - ) { + if (object.shortDescription !== undefined && object.shortDescription !== null) { message.shortDescription = String(object.shortDescription); } else { message.shortDescription = ""; } - if ( - object.latestMatchingVersion !== undefined && - object.latestMatchingVersion !== null - ) { - message.latestMatchingVersion = PackageAppVersion.fromJSON( - object.latestMatchingVersion - ); + if (object.latestMatchingVersion !== undefined && object.latestMatchingVersion !== null) { + message.latestMatchingVersion = PackageAppVersion.fromJSON(object.latestMatchingVersion); } else { message.latestMatchingVersion = undefined; } @@ -3779,10 +3337,8 @@ export const InstalledPackageSummary = { ? PackageAppVersion.toJSON(message.currentVersion) : undefined); message.iconUrl !== undefined && (obj.iconUrl = message.iconUrl); - message.pkgDisplayName !== undefined && - (obj.pkgDisplayName = message.pkgDisplayName); - message.shortDescription !== undefined && - (obj.shortDescription = message.shortDescription); + message.pkgDisplayName !== undefined && (obj.pkgDisplayName = message.pkgDisplayName); + message.shortDescription !== undefined && (obj.shortDescription = message.shortDescription); message.latestMatchingVersion !== undefined && (obj.latestMatchingVersion = message.latestMatchingVersion ? PackageAppVersion.toJSON(message.latestMatchingVersion) @@ -3792,24 +3348,17 @@ export const InstalledPackageSummary = { ? PackageAppVersion.toJSON(message.latestVersion) : undefined); message.status !== undefined && - (obj.status = message.status - ? InstalledPackageStatus.toJSON(message.status) - : undefined); + (obj.status = message.status ? InstalledPackageStatus.toJSON(message.status) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): InstalledPackageSummary { + fromPartial(object: DeepPartial): InstalledPackageSummary { const message = { ...baseInstalledPackageSummary, } as InstalledPackageSummary; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { message.installedPackageRef = InstalledPackageReference.fromPartial( - object.installedPackageRef + object.installedPackageRef, ); } else { message.installedPackageRef = undefined; @@ -3819,20 +3368,13 @@ export const InstalledPackageSummary = { } else { message.name = ""; } - if ( - object.pkgVersionReference !== undefined && - object.pkgVersionReference !== null - ) { - message.pkgVersionReference = VersionReference.fromPartial( - object.pkgVersionReference - ); + if (object.pkgVersionReference !== undefined && object.pkgVersionReference !== null) { + message.pkgVersionReference = VersionReference.fromPartial(object.pkgVersionReference); } else { message.pkgVersionReference = undefined; } if (object.currentVersion !== undefined && object.currentVersion !== null) { - message.currentVersion = PackageAppVersion.fromPartial( - object.currentVersion - ); + message.currentVersion = PackageAppVersion.fromPartial(object.currentVersion); } else { message.currentVersion = undefined; } @@ -3846,28 +3388,18 @@ export const InstalledPackageSummary = { } else { message.pkgDisplayName = ""; } - if ( - object.shortDescription !== undefined && - object.shortDescription !== null - ) { + if (object.shortDescription !== undefined && object.shortDescription !== null) { message.shortDescription = object.shortDescription; } else { message.shortDescription = ""; } - if ( - object.latestMatchingVersion !== undefined && - object.latestMatchingVersion !== null - ) { - message.latestMatchingVersion = PackageAppVersion.fromPartial( - object.latestMatchingVersion - ); + if (object.latestMatchingVersion !== undefined && object.latestMatchingVersion !== null) { + message.latestMatchingVersion = PackageAppVersion.fromPartial(object.latestMatchingVersion); } else { message.latestMatchingVersion = undefined; } if (object.latestVersion !== undefined && object.latestVersion !== null) { - message.latestVersion = PackageAppVersion.fromPartial( - object.latestVersion - ); + message.latestVersion = PackageAppVersion.fromPartial(object.latestVersion); } else { message.latestVersion = undefined; } @@ -3887,30 +3419,21 @@ const baseInstalledPackageDetail: object = { }; export const InstalledPackageDetail = { - encode( - message: InstalledPackageDetail, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: InstalledPackageDetail, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } if (message.pkgVersionReference !== undefined) { - VersionReference.encode( - message.pkgVersionReference, - writer.uint32(18).fork() - ).ldelim(); + VersionReference.encode(message.pkgVersionReference, writer.uint32(18).fork()).ldelim(); } if (message.name !== "") { writer.uint32(26).string(message.name); } if (message.currentVersion !== undefined) { - PackageAppVersion.encode( - message.currentVersion, - writer.uint32(34).fork() - ).ldelim(); + PackageAppVersion.encode(message.currentVersion, writer.uint32(34).fork()).ldelim(); } if (message.valuesApplied !== "") { writer.uint32(42).string(message.valuesApplied); @@ -3918,14 +3441,11 @@ export const InstalledPackageDetail = { if (message.reconciliationOptions !== undefined) { ReconciliationOptions.encode( message.reconciliationOptions, - writer.uint32(50).fork() + writer.uint32(50).fork(), ).ldelim(); } if (message.status !== undefined) { - InstalledPackageStatus.encode( - message.status, - writer.uint32(58).fork() - ).ldelim(); + InstalledPackageStatus.encode(message.status, writer.uint32(58).fork()).ldelim(); } if (message.postInstallationNotes !== "") { writer.uint32(66).string(message.postInstallationNotes); @@ -3933,20 +3453,14 @@ export const InstalledPackageDetail = { if (message.availablePackageRef !== undefined) { AvailablePackageReference.encode( message.availablePackageRef, - writer.uint32(74).fork() + writer.uint32(74).fork(), ).ldelim(); } if (message.latestMatchingVersion !== undefined) { - PackageAppVersion.encode( - message.latestMatchingVersion, - writer.uint32(82).fork() - ).ldelim(); + PackageAppVersion.encode(message.latestMatchingVersion, writer.uint32(82).fork()).ldelim(); } if (message.latestVersion !== undefined) { - PackageAppVersion.encode( - message.latestVersion, - writer.uint32(90).fork() - ).ldelim(); + PackageAppVersion.encode(message.latestVersion, writer.uint32(90).fork()).ldelim(); } if (message.customDetail !== undefined) { Any.encode(message.customDetail, writer.uint32(114).fork()).ldelim(); @@ -3954,10 +3468,7 @@ export const InstalledPackageDetail = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): InstalledPackageDetail { + decode(input: _m0.Reader | Uint8Array, length?: number): InstalledPackageDetail { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseInstalledPackageDetail } as InstalledPackageDetail; @@ -3965,61 +3476,37 @@ export const InstalledPackageDetail = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode( - reader, - reader.uint32() - ); + message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); break; case 2: - message.pkgVersionReference = VersionReference.decode( - reader, - reader.uint32() - ); + message.pkgVersionReference = VersionReference.decode(reader, reader.uint32()); break; case 3: message.name = reader.string(); break; case 4: - message.currentVersion = PackageAppVersion.decode( - reader, - reader.uint32() - ); + message.currentVersion = PackageAppVersion.decode(reader, reader.uint32()); break; case 5: message.valuesApplied = reader.string(); break; case 6: - message.reconciliationOptions = ReconciliationOptions.decode( - reader, - reader.uint32() - ); + message.reconciliationOptions = ReconciliationOptions.decode(reader, reader.uint32()); break; case 7: - message.status = InstalledPackageStatus.decode( - reader, - reader.uint32() - ); + message.status = InstalledPackageStatus.decode(reader, reader.uint32()); break; case 8: message.postInstallationNotes = reader.string(); break; case 9: - message.availablePackageRef = AvailablePackageReference.decode( - reader, - reader.uint32() - ); + message.availablePackageRef = AvailablePackageReference.decode(reader, reader.uint32()); break; case 10: - message.latestMatchingVersion = PackageAppVersion.decode( - reader, - reader.uint32() - ); + message.latestMatchingVersion = PackageAppVersion.decode(reader, reader.uint32()); break; case 11: - message.latestVersion = PackageAppVersion.decode( - reader, - reader.uint32() - ); + message.latestVersion = PackageAppVersion.decode(reader, reader.uint32()); break; case 14: message.customDetail = Any.decode(reader, reader.uint32()); @@ -4034,23 +3521,13 @@ export const InstalledPackageDetail = { fromJSON(object: any): InstalledPackageDetail { const message = { ...baseInstalledPackageDetail } as InstalledPackageDetail; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { - message.installedPackageRef = InstalledPackageReference.fromJSON( - object.installedPackageRef - ); + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { + message.installedPackageRef = InstalledPackageReference.fromJSON(object.installedPackageRef); } else { message.installedPackageRef = undefined; } - if ( - object.pkgVersionReference !== undefined && - object.pkgVersionReference !== null - ) { - message.pkgVersionReference = VersionReference.fromJSON( - object.pkgVersionReference - ); + if (object.pkgVersionReference !== undefined && object.pkgVersionReference !== null) { + message.pkgVersionReference = VersionReference.fromJSON(object.pkgVersionReference); } else { message.pkgVersionReference = undefined; } @@ -4060,9 +3537,7 @@ export const InstalledPackageDetail = { message.name = ""; } if (object.currentVersion !== undefined && object.currentVersion !== null) { - message.currentVersion = PackageAppVersion.fromJSON( - object.currentVersion - ); + message.currentVersion = PackageAppVersion.fromJSON(object.currentVersion); } else { message.currentVersion = undefined; } @@ -4071,13 +3546,8 @@ export const InstalledPackageDetail = { } else { message.valuesApplied = ""; } - if ( - object.reconciliationOptions !== undefined && - object.reconciliationOptions !== null - ) { - message.reconciliationOptions = ReconciliationOptions.fromJSON( - object.reconciliationOptions - ); + if (object.reconciliationOptions !== undefined && object.reconciliationOptions !== null) { + message.reconciliationOptions = ReconciliationOptions.fromJSON(object.reconciliationOptions); } else { message.reconciliationOptions = undefined; } @@ -4086,31 +3556,18 @@ export const InstalledPackageDetail = { } else { message.status = undefined; } - if ( - object.postInstallationNotes !== undefined && - object.postInstallationNotes !== null - ) { + if (object.postInstallationNotes !== undefined && object.postInstallationNotes !== null) { message.postInstallationNotes = String(object.postInstallationNotes); } else { message.postInstallationNotes = ""; } - if ( - object.availablePackageRef !== undefined && - object.availablePackageRef !== null - ) { - message.availablePackageRef = AvailablePackageReference.fromJSON( - object.availablePackageRef - ); + if (object.availablePackageRef !== undefined && object.availablePackageRef !== null) { + message.availablePackageRef = AvailablePackageReference.fromJSON(object.availablePackageRef); } else { message.availablePackageRef = undefined; } - if ( - object.latestMatchingVersion !== undefined && - object.latestMatchingVersion !== null - ) { - message.latestMatchingVersion = PackageAppVersion.fromJSON( - object.latestMatchingVersion - ); + if (object.latestMatchingVersion !== undefined && object.latestMatchingVersion !== null) { + message.latestMatchingVersion = PackageAppVersion.fromJSON(object.latestMatchingVersion); } else { message.latestMatchingVersion = undefined; } @@ -4142,16 +3599,13 @@ export const InstalledPackageDetail = { (obj.currentVersion = message.currentVersion ? PackageAppVersion.toJSON(message.currentVersion) : undefined); - message.valuesApplied !== undefined && - (obj.valuesApplied = message.valuesApplied); + message.valuesApplied !== undefined && (obj.valuesApplied = message.valuesApplied); message.reconciliationOptions !== undefined && (obj.reconciliationOptions = message.reconciliationOptions ? ReconciliationOptions.toJSON(message.reconciliationOptions) : undefined); message.status !== undefined && - (obj.status = message.status - ? InstalledPackageStatus.toJSON(message.status) - : undefined); + (obj.status = message.status ? InstalledPackageStatus.toJSON(message.status) : undefined); message.postInstallationNotes !== undefined && (obj.postInstallationNotes = message.postInstallationNotes); message.availablePackageRef !== undefined && @@ -4167,33 +3621,21 @@ export const InstalledPackageDetail = { ? PackageAppVersion.toJSON(message.latestVersion) : undefined); message.customDetail !== undefined && - (obj.customDetail = message.customDetail - ? Any.toJSON(message.customDetail) - : undefined); + (obj.customDetail = message.customDetail ? Any.toJSON(message.customDetail) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): InstalledPackageDetail { + fromPartial(object: DeepPartial): InstalledPackageDetail { const message = { ...baseInstalledPackageDetail } as InstalledPackageDetail; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { message.installedPackageRef = InstalledPackageReference.fromPartial( - object.installedPackageRef + object.installedPackageRef, ); } else { message.installedPackageRef = undefined; } - if ( - object.pkgVersionReference !== undefined && - object.pkgVersionReference !== null - ) { - message.pkgVersionReference = VersionReference.fromPartial( - object.pkgVersionReference - ); + if (object.pkgVersionReference !== undefined && object.pkgVersionReference !== null) { + message.pkgVersionReference = VersionReference.fromPartial(object.pkgVersionReference); } else { message.pkgVersionReference = undefined; } @@ -4203,9 +3645,7 @@ export const InstalledPackageDetail = { message.name = ""; } if (object.currentVersion !== undefined && object.currentVersion !== null) { - message.currentVersion = PackageAppVersion.fromPartial( - object.currentVersion - ); + message.currentVersion = PackageAppVersion.fromPartial(object.currentVersion); } else { message.currentVersion = undefined; } @@ -4214,12 +3654,9 @@ export const InstalledPackageDetail = { } else { message.valuesApplied = ""; } - if ( - object.reconciliationOptions !== undefined && - object.reconciliationOptions !== null - ) { + if (object.reconciliationOptions !== undefined && object.reconciliationOptions !== null) { message.reconciliationOptions = ReconciliationOptions.fromPartial( - object.reconciliationOptions + object.reconciliationOptions, ); } else { message.reconciliationOptions = undefined; @@ -4229,38 +3666,25 @@ export const InstalledPackageDetail = { } else { message.status = undefined; } - if ( - object.postInstallationNotes !== undefined && - object.postInstallationNotes !== null - ) { + if (object.postInstallationNotes !== undefined && object.postInstallationNotes !== null) { message.postInstallationNotes = object.postInstallationNotes; } else { message.postInstallationNotes = ""; } - if ( - object.availablePackageRef !== undefined && - object.availablePackageRef !== null - ) { + if (object.availablePackageRef !== undefined && object.availablePackageRef !== null) { message.availablePackageRef = AvailablePackageReference.fromPartial( - object.availablePackageRef + object.availablePackageRef, ); } else { message.availablePackageRef = undefined; } - if ( - object.latestMatchingVersion !== undefined && - object.latestMatchingVersion !== null - ) { - message.latestMatchingVersion = PackageAppVersion.fromPartial( - object.latestMatchingVersion - ); + if (object.latestMatchingVersion !== undefined && object.latestMatchingVersion !== null) { + message.latestMatchingVersion = PackageAppVersion.fromPartial(object.latestMatchingVersion); } else { message.latestMatchingVersion = undefined; } if (object.latestVersion !== undefined && object.latestVersion !== null) { - message.latestVersion = PackageAppVersion.fromPartial( - object.latestVersion - ); + message.latestVersion = PackageAppVersion.fromPartial(object.latestVersion); } else { message.latestVersion = undefined; } @@ -4276,10 +3700,7 @@ export const InstalledPackageDetail = { const baseContext: object = { cluster: "", namespace: "" }; export const Context = { - encode( - message: Context, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Context, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.cluster !== "") { writer.uint32(10).string(message.cluster); } @@ -4351,10 +3772,7 @@ export const Context = { const baseAvailablePackageReference: object = { identifier: "" }; export const AvailablePackageReference = { - encode( - message: AvailablePackageReference, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: AvailablePackageReference, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } @@ -4367,10 +3785,7 @@ export const AvailablePackageReference = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): AvailablePackageReference { + decode(input: _m0.Reader | Uint8Array, length?: number): AvailablePackageReference { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -4421,18 +3836,14 @@ export const AvailablePackageReference = { toJSON(message: AvailablePackageReference): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); message.identifier !== undefined && (obj.identifier = message.identifier); message.plugin !== undefined && (obj.plugin = message.plugin ? Plugin.toJSON(message.plugin) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): AvailablePackageReference { + fromPartial(object: DeepPartial): AvailablePackageReference { const message = { ...baseAvailablePackageReference, } as AvailablePackageReference; @@ -4458,10 +3869,7 @@ export const AvailablePackageReference = { const baseMaintainer: object = { name: "", email: "" }; export const Maintainer = { - encode( - message: Maintainer, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Maintainer, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -4539,10 +3947,7 @@ const baseFilterOptions: object = { }; export const FilterOptions = { - encode( - message: FilterOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: FilterOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.query !== "") { writer.uint32(10).string(message.query); } @@ -4629,12 +4034,12 @@ export const FilterOptions = { const obj: any = {}; message.query !== undefined && (obj.query = message.query); if (message.categories) { - obj.categories = message.categories.map((e) => e); + obj.categories = message.categories.map(e => e); } else { obj.categories = []; } if (message.repositories) { - obj.repositories = message.repositories.map((e) => e); + obj.repositories = message.repositories.map(e => e); } else { obj.repositories = []; } @@ -4679,10 +4084,7 @@ export const FilterOptions = { const basePaginationOptions: object = { pageToken: "", pageSize: 0 }; export const PaginationOptions = { - encode( - message: PaginationOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PaginationOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pageToken !== "") { writer.uint32(10).string(message.pageToken); } @@ -4754,10 +4156,7 @@ export const PaginationOptions = { const baseInstalledPackageReference: object = { identifier: "" }; export const InstalledPackageReference = { - encode( - message: InstalledPackageReference, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: InstalledPackageReference, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } @@ -4770,10 +4169,7 @@ export const InstalledPackageReference = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): InstalledPackageReference { + decode(input: _m0.Reader | Uint8Array, length?: number): InstalledPackageReference { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -4824,18 +4220,14 @@ export const InstalledPackageReference = { toJSON(message: InstalledPackageReference): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); message.identifier !== undefined && (obj.identifier = message.identifier); message.plugin !== undefined && (obj.plugin = message.plugin ? Plugin.toJSON(message.plugin) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): InstalledPackageReference { + fromPartial(object: DeepPartial): InstalledPackageReference { const message = { ...baseInstalledPackageReference, } as InstalledPackageReference; @@ -4861,10 +4253,7 @@ export const InstalledPackageReference = { const baseVersionReference: object = { version: "" }; export const VersionReference = { - encode( - message: VersionReference, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: VersionReference, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.version !== "") { writer.uint32(10).string(message.version); } @@ -4923,10 +4312,7 @@ const baseInstalledPackageStatus: object = { }; export const InstalledPackageStatus = { - encode( - message: InstalledPackageStatus, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: InstalledPackageStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.ready === true) { writer.uint32(8).bool(message.ready); } @@ -4939,10 +4325,7 @@ export const InstalledPackageStatus = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): InstalledPackageStatus { + decode(input: _m0.Reader | Uint8Array, length?: number): InstalledPackageStatus { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseInstalledPackageStatus } as InstalledPackageStatus; @@ -4974,9 +4357,7 @@ export const InstalledPackageStatus = { message.ready = false; } if (object.reason !== undefined && object.reason !== null) { - message.reason = installedPackageStatus_StatusReasonFromJSON( - object.reason - ); + message.reason = installedPackageStatus_StatusReasonFromJSON(object.reason); } else { message.reason = 0; } @@ -4997,9 +4378,7 @@ export const InstalledPackageStatus = { return obj; }, - fromPartial( - object: DeepPartial - ): InstalledPackageStatus { + fromPartial(object: DeepPartial): InstalledPackageStatus { const message = { ...baseInstalledPackageStatus } as InstalledPackageStatus; if (object.ready !== undefined && object.ready !== null) { message.ready = object.ready; @@ -5027,10 +4406,7 @@ const baseReconciliationOptions: object = { }; export const ReconciliationOptions = { - encode( - message: ReconciliationOptions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ReconciliationOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.interval !== 0) { writer.uint32(8).int32(message.interval); } @@ -5043,10 +4419,7 @@ export const ReconciliationOptions = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ReconciliationOptions { + decode(input: _m0.Reader | Uint8Array, length?: number): ReconciliationOptions { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseReconciliationOptions } as ReconciliationOptions; @@ -5082,10 +4455,7 @@ export const ReconciliationOptions = { } else { message.suspend = false; } - if ( - object.serviceAccountName !== undefined && - object.serviceAccountName !== null - ) { + if (object.serviceAccountName !== undefined && object.serviceAccountName !== null) { message.serviceAccountName = String(object.serviceAccountName); } else { message.serviceAccountName = ""; @@ -5102,9 +4472,7 @@ export const ReconciliationOptions = { return obj; }, - fromPartial( - object: DeepPartial - ): ReconciliationOptions { + fromPartial(object: DeepPartial): ReconciliationOptions { const message = { ...baseReconciliationOptions } as ReconciliationOptions; if (object.interval !== undefined && object.interval !== null) { message.interval = object.interval; @@ -5116,10 +4484,7 @@ export const ReconciliationOptions = { } else { message.suspend = false; } - if ( - object.serviceAccountName !== undefined && - object.serviceAccountName !== null - ) { + if (object.serviceAccountName !== undefined && object.serviceAccountName !== null) { message.serviceAccountName = object.serviceAccountName; } else { message.serviceAccountName = ""; @@ -5131,10 +4496,7 @@ export const ReconciliationOptions = { const basePackageAppVersion: object = { pkgVersion: "", appVersion: "" }; export const PackageAppVersion = { - encode( - message: PackageAppVersion, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PackageAppVersion, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pkgVersion !== "") { writer.uint32(10).string(message.pkgVersion); } @@ -5211,10 +4573,7 @@ const baseResourceRef: object = { }; export const ResourceRef = { - encode( - message: ResourceRef, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ResourceRef, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.apiVersion !== "") { writer.uint32(10).string(message.apiVersion); } @@ -5321,39 +4680,39 @@ export const ResourceRef = { export interface PackagesService { GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; } @@ -5362,117 +4721,113 @@ export class PackagesServiceClientImpl implements PackagesService { constructor(rpc: Rpc) { this.rpc = rpc; - this.GetAvailablePackageSummaries = - this.GetAvailablePackageSummaries.bind(this); + this.GetAvailablePackageSummaries = this.GetAvailablePackageSummaries.bind(this); this.GetAvailablePackageDetail = this.GetAvailablePackageDetail.bind(this); - this.GetAvailablePackageVersions = - this.GetAvailablePackageVersions.bind(this); - this.GetInstalledPackageSummaries = - this.GetInstalledPackageSummaries.bind(this); + this.GetAvailablePackageVersions = this.GetAvailablePackageVersions.bind(this); + this.GetInstalledPackageSummaries = this.GetInstalledPackageSummaries.bind(this); this.GetInstalledPackageDetail = this.GetInstalledPackageDetail.bind(this); this.CreateInstalledPackage = this.CreateInstalledPackage.bind(this); this.UpdateInstalledPackage = this.UpdateInstalledPackage.bind(this); this.DeleteInstalledPackage = this.DeleteInstalledPackage.bind(this); - this.GetInstalledPackageResourceRefs = - this.GetInstalledPackageResourceRefs.bind(this); + this.GetInstalledPackageResourceRefs = this.GetInstalledPackageResourceRefs.bind(this); } GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( PackagesServiceGetAvailablePackageSummariesDesc, GetAvailablePackageSummariesRequest.fromPartial(request), - metadata + metadata, ); } GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( PackagesServiceGetAvailablePackageDetailDesc, GetAvailablePackageDetailRequest.fromPartial(request), - metadata + metadata, ); } GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( PackagesServiceGetAvailablePackageVersionsDesc, GetAvailablePackageVersionsRequest.fromPartial(request), - metadata + metadata, ); } GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( PackagesServiceGetInstalledPackageSummariesDesc, GetInstalledPackageSummariesRequest.fromPartial(request), - metadata + metadata, ); } GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( PackagesServiceGetInstalledPackageDetailDesc, GetInstalledPackageDetailRequest.fromPartial(request), - metadata + metadata, ); } CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( PackagesServiceCreateInstalledPackageDesc, CreateInstalledPackageRequest.fromPartial(request), - metadata + metadata, ); } UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( PackagesServiceUpdateInstalledPackageDesc, UpdateInstalledPackageRequest.fromPartial(request), - metadata + metadata, ); } DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( PackagesServiceDeleteInstalledPackageDesc, DeleteInstalledPackageRequest.fromPartial(request), - metadata + metadata, ); } GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( PackagesServiceGetInstalledPackageResourceRefsDesc, GetInstalledPackageResourceRefsRequest.fromPartial(request), - metadata + metadata, ); } } @@ -5481,215 +4836,205 @@ export const PackagesServiceDesc = { serviceName: "kubeappsapis.core.packages.v1alpha1.PackagesService", }; -export const PackagesServiceGetAvailablePackageSummariesDesc: UnaryMethodDefinitionish = - { - methodName: "GetAvailablePackageSummaries", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageSummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageSummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const PackagesServiceGetAvailablePackageSummariesDesc: UnaryMethodDefinitionish = { + methodName: "GetAvailablePackageSummaries", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageSummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageSummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const PackagesServiceGetAvailablePackageDetailDesc: UnaryMethodDefinitionish = - { - methodName: "GetAvailablePackageDetail", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const PackagesServiceGetAvailablePackageDetailDesc: UnaryMethodDefinitionish = { + methodName: "GetAvailablePackageDetail", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const PackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = - { - methodName: "GetAvailablePackageVersions", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageVersionsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageVersionsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const PackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = { + methodName: "GetAvailablePackageVersions", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageVersionsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageVersionsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const PackagesServiceGetInstalledPackageSummariesDesc: UnaryMethodDefinitionish = - { - methodName: "GetInstalledPackageSummaries", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageSummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageSummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const PackagesServiceGetInstalledPackageSummariesDesc: UnaryMethodDefinitionish = { + methodName: "GetInstalledPackageSummaries", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageSummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageSummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const PackagesServiceGetInstalledPackageDetailDesc: UnaryMethodDefinitionish = - { - methodName: "GetInstalledPackageDetail", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const PackagesServiceGetInstalledPackageDetailDesc: UnaryMethodDefinitionish = { + methodName: "GetInstalledPackageDetail", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const PackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = - { - methodName: "CreateInstalledPackage", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return CreateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...CreateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const PackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = { + methodName: "CreateInstalledPackage", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return CreateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...CreateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const PackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = - { - methodName: "UpdateInstalledPackage", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return UpdateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...UpdateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const PackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = { + methodName: "UpdateInstalledPackage", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return UpdateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...UpdateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const PackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = - { - methodName: "DeleteInstalledPackage", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return DeleteInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...DeleteInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const PackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = { + methodName: "DeleteInstalledPackage", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return DeleteInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...DeleteInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const PackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = - { - methodName: "GetInstalledPackageResourceRefs", - service: PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageResourceRefsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageResourceRefsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const PackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = { + methodName: "GetInstalledPackageResourceRefs", + service: PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageResourceRefsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageResourceRefsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -interface UnaryMethodDefinitionishR - extends grpc.UnaryMethodDefinition { +interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -5700,7 +5045,7 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise; } @@ -5720,7 +5065,7 @@ export class GrpcWebImpl { debug?: boolean; metadata?: grpc.Metadata; - } + }, ) { this.host = host; this.options = options; @@ -5729,7 +5074,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -5761,14 +5106,7 @@ export class GrpcWebImpl { } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array diff --git a/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/repositories.ts b/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/repositories.ts index 3de756a0d0d..5703271c735 100644 --- a/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/repositories.ts +++ b/dashboard/src/gen/kubeappsapis/core/packages/v1alpha1/repositories.ts @@ -149,7 +149,7 @@ export enum PackageRepositoryAuth_PackageRepositoryAuthType { } export function packageRepositoryAuth_PackageRepositoryAuthTypeFromJSON( - object: any + object: any, ): PackageRepositoryAuth_PackageRepositoryAuthType { switch (object) { case 0: @@ -178,7 +178,7 @@ export function packageRepositoryAuth_PackageRepositoryAuthTypeFromJSON( } export function packageRepositoryAuth_PackageRepositoryAuthTypeToJSON( - object: PackageRepositoryAuth_PackageRepositoryAuthType + object: PackageRepositoryAuth_PackageRepositoryAuthType, ): string { switch (object) { case PackageRepositoryAuth_PackageRepositoryAuthType.PACKAGE_REPOSITORY_AUTH_TYPE_UNSPECIFIED: @@ -375,7 +375,7 @@ export enum PackageRepositoryStatus_StatusReason { } export function packageRepositoryStatus_StatusReasonFromJSON( - object: any + object: any, ): PackageRepositoryStatus_StatusReason { switch (object) { case 0: @@ -398,7 +398,7 @@ export function packageRepositoryStatus_StatusReasonFromJSON( } export function packageRepositoryStatus_StatusReasonToJSON( - object: PackageRepositoryStatus_StatusReason + object: PackageRepositoryStatus_StatusReason, ): string { switch (object) { case PackageRepositoryStatus_StatusReason.STATUS_REASON_UNSPECIFIED: @@ -517,7 +517,7 @@ const baseAddPackageRepositoryRequest: object = { export const AddPackageRepositoryRequest = { encode( message: AddPackageRepositoryRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); @@ -541,16 +541,10 @@ export const AddPackageRepositoryRequest = { writer.uint32(56).uint32(message.interval); } if (message.tlsConfig !== undefined) { - PackageRepositoryTlsConfig.encode( - message.tlsConfig, - writer.uint32(66).fork() - ).ldelim(); + PackageRepositoryTlsConfig.encode(message.tlsConfig, writer.uint32(66).fork()).ldelim(); } if (message.auth !== undefined) { - PackageRepositoryAuth.encode( - message.auth, - writer.uint32(74).fork() - ).ldelim(); + PackageRepositoryAuth.encode(message.auth, writer.uint32(74).fork()).ldelim(); } if (message.plugin !== undefined) { Plugin.encode(message.plugin, writer.uint32(82).fork()).ldelim(); @@ -561,10 +555,7 @@ export const AddPackageRepositoryRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): AddPackageRepositoryRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): AddPackageRepositoryRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -595,10 +586,7 @@ export const AddPackageRepositoryRequest = { message.interval = reader.uint32(); break; case 8: - message.tlsConfig = PackageRepositoryTlsConfig.decode( - reader, - reader.uint32() - ); + message.tlsConfig = PackageRepositoryTlsConfig.decode(reader, reader.uint32()); break; case 9: message.auth = PackageRepositoryAuth.decode(reader, reader.uint32()); @@ -636,10 +624,7 @@ export const AddPackageRepositoryRequest = { } else { message.description = ""; } - if ( - object.namespaceScoped !== undefined && - object.namespaceScoped !== null - ) { + if (object.namespaceScoped !== undefined && object.namespaceScoped !== null) { message.namespaceScoped = Boolean(object.namespaceScoped); } else { message.namespaceScoped = false; @@ -685,14 +670,10 @@ export const AddPackageRepositoryRequest = { toJSON(message: AddPackageRepositoryRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); message.name !== undefined && (obj.name = message.name); - message.description !== undefined && - (obj.description = message.description); - message.namespaceScoped !== undefined && - (obj.namespaceScoped = message.namespaceScoped); + message.description !== undefined && (obj.description = message.description); + message.namespaceScoped !== undefined && (obj.namespaceScoped = message.namespaceScoped); message.type !== undefined && (obj.type = message.type); message.url !== undefined && (obj.url = message.url); message.interval !== undefined && (obj.interval = message.interval); @@ -701,21 +682,15 @@ export const AddPackageRepositoryRequest = { ? PackageRepositoryTlsConfig.toJSON(message.tlsConfig) : undefined); message.auth !== undefined && - (obj.auth = message.auth - ? PackageRepositoryAuth.toJSON(message.auth) - : undefined); + (obj.auth = message.auth ? PackageRepositoryAuth.toJSON(message.auth) : undefined); message.plugin !== undefined && (obj.plugin = message.plugin ? Plugin.toJSON(message.plugin) : undefined); message.customDetail !== undefined && - (obj.customDetail = message.customDetail - ? Any.toJSON(message.customDetail) - : undefined); + (obj.customDetail = message.customDetail ? Any.toJSON(message.customDetail) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): AddPackageRepositoryRequest { + fromPartial(object: DeepPartial): AddPackageRepositoryRequest { const message = { ...baseAddPackageRepositoryRequest, } as AddPackageRepositoryRequest; @@ -734,10 +709,7 @@ export const AddPackageRepositoryRequest = { } else { message.description = ""; } - if ( - object.namespaceScoped !== undefined && - object.namespaceScoped !== null - ) { + if (object.namespaceScoped !== undefined && object.namespaceScoped !== null) { message.namespaceScoped = object.namespaceScoped; } else { message.namespaceScoped = false; @@ -758,9 +730,7 @@ export const AddPackageRepositoryRequest = { message.interval = 0; } if (object.tlsConfig !== undefined && object.tlsConfig !== null) { - message.tlsConfig = PackageRepositoryTlsConfig.fromPartial( - object.tlsConfig - ); + message.tlsConfig = PackageRepositoryTlsConfig.fromPartial(object.tlsConfig); } else { message.tlsConfig = undefined; } @@ -788,7 +758,7 @@ const basePackageRepositoryTlsConfig: object = { insecureSkipVerify: false }; export const PackageRepositoryTlsConfig = { encode( message: PackageRepositoryTlsConfig, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.insecureSkipVerify === true) { writer.uint32(8).bool(message.insecureSkipVerify); @@ -797,18 +767,12 @@ export const PackageRepositoryTlsConfig = { writer.uint32(18).string(message.certAuthority); } if (message.secretRef !== undefined) { - SecretKeyReference.encode( - message.secretRef, - writer.uint32(26).fork() - ).ldelim(); + SecretKeyReference.encode(message.secretRef, writer.uint32(26).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): PackageRepositoryTlsConfig { + decode(input: _m0.Reader | Uint8Array, length?: number): PackageRepositoryTlsConfig { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -824,10 +788,7 @@ export const PackageRepositoryTlsConfig = { message.certAuthority = reader.string(); break; case 3: - message.secretRef = SecretKeyReference.decode( - reader, - reader.uint32() - ); + message.secretRef = SecretKeyReference.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -841,10 +802,7 @@ export const PackageRepositoryTlsConfig = { const message = { ...basePackageRepositoryTlsConfig, } as PackageRepositoryTlsConfig; - if ( - object.insecureSkipVerify !== undefined && - object.insecureSkipVerify !== null - ) { + if (object.insecureSkipVerify !== undefined && object.insecureSkipVerify !== null) { message.insecureSkipVerify = Boolean(object.insecureSkipVerify); } else { message.insecureSkipVerify = false; @@ -866,8 +824,7 @@ export const PackageRepositoryTlsConfig = { const obj: any = {}; message.insecureSkipVerify !== undefined && (obj.insecureSkipVerify = message.insecureSkipVerify); - message.certAuthority !== undefined && - (obj.certAuthority = message.certAuthority); + message.certAuthority !== undefined && (obj.certAuthority = message.certAuthority); message.secretRef !== undefined && (obj.secretRef = message.secretRef ? SecretKeyReference.toJSON(message.secretRef) @@ -875,16 +832,11 @@ export const PackageRepositoryTlsConfig = { return obj; }, - fromPartial( - object: DeepPartial - ): PackageRepositoryTlsConfig { + fromPartial(object: DeepPartial): PackageRepositoryTlsConfig { const message = { ...basePackageRepositoryTlsConfig, } as PackageRepositoryTlsConfig; - if ( - object.insecureSkipVerify !== undefined && - object.insecureSkipVerify !== null - ) { + if (object.insecureSkipVerify !== undefined && object.insecureSkipVerify !== null) { message.insecureSkipVerify = object.insecureSkipVerify; } else { message.insecureSkipVerify = false; @@ -906,36 +858,24 @@ export const PackageRepositoryTlsConfig = { const basePackageRepositoryAuth: object = { type: 0, passCredentials: false }; export const PackageRepositoryAuth = { - encode( - message: PackageRepositoryAuth, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PackageRepositoryAuth, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.type !== 0) { writer.uint32(8).int32(message.type); } if (message.usernamePassword !== undefined) { - UsernamePassword.encode( - message.usernamePassword, - writer.uint32(18).fork() - ).ldelim(); + UsernamePassword.encode(message.usernamePassword, writer.uint32(18).fork()).ldelim(); } if (message.tlsCertKey !== undefined) { TlsCertKey.encode(message.tlsCertKey, writer.uint32(26).fork()).ldelim(); } if (message.dockerCreds !== undefined) { - DockerCredentials.encode( - message.dockerCreds, - writer.uint32(34).fork() - ).ldelim(); + DockerCredentials.encode(message.dockerCreds, writer.uint32(34).fork()).ldelim(); } if (message.header !== undefined) { writer.uint32(42).string(message.header); } if (message.secretRef !== undefined) { - SecretKeyReference.encode( - message.secretRef, - writer.uint32(50).fork() - ).ldelim(); + SecretKeyReference.encode(message.secretRef, writer.uint32(50).fork()).ldelim(); } if (message.passCredentials === true) { writer.uint32(56).bool(message.passCredentials); @@ -943,10 +883,7 @@ export const PackageRepositoryAuth = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): PackageRepositoryAuth { + decode(input: _m0.Reader | Uint8Array, length?: number): PackageRepositoryAuth { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...basePackageRepositoryAuth } as PackageRepositoryAuth; @@ -957,28 +894,19 @@ export const PackageRepositoryAuth = { message.type = reader.int32() as any; break; case 2: - message.usernamePassword = UsernamePassword.decode( - reader, - reader.uint32() - ); + message.usernamePassword = UsernamePassword.decode(reader, reader.uint32()); break; case 3: message.tlsCertKey = TlsCertKey.decode(reader, reader.uint32()); break; case 4: - message.dockerCreds = DockerCredentials.decode( - reader, - reader.uint32() - ); + message.dockerCreds = DockerCredentials.decode(reader, reader.uint32()); break; case 5: message.header = reader.string(); break; case 6: - message.secretRef = SecretKeyReference.decode( - reader, - reader.uint32() - ); + message.secretRef = SecretKeyReference.decode(reader, reader.uint32()); break; case 7: message.passCredentials = reader.bool(); @@ -994,19 +922,12 @@ export const PackageRepositoryAuth = { fromJSON(object: any): PackageRepositoryAuth { const message = { ...basePackageRepositoryAuth } as PackageRepositoryAuth; if (object.type !== undefined && object.type !== null) { - message.type = packageRepositoryAuth_PackageRepositoryAuthTypeFromJSON( - object.type - ); + message.type = packageRepositoryAuth_PackageRepositoryAuthTypeFromJSON(object.type); } else { message.type = 0; } - if ( - object.usernamePassword !== undefined && - object.usernamePassword !== null - ) { - message.usernamePassword = UsernamePassword.fromJSON( - object.usernamePassword - ); + if (object.usernamePassword !== undefined && object.usernamePassword !== null) { + message.usernamePassword = UsernamePassword.fromJSON(object.usernamePassword); } else { message.usernamePassword = undefined; } @@ -1030,10 +951,7 @@ export const PackageRepositoryAuth = { } else { message.secretRef = undefined; } - if ( - object.passCredentials !== undefined && - object.passCredentials !== null - ) { + if (object.passCredentials !== undefined && object.passCredentials !== null) { message.passCredentials = Boolean(object.passCredentials); } else { message.passCredentials = false; @@ -1044,17 +962,13 @@ export const PackageRepositoryAuth = { toJSON(message: PackageRepositoryAuth): unknown { const obj: any = {}; message.type !== undefined && - (obj.type = packageRepositoryAuth_PackageRepositoryAuthTypeToJSON( - message.type - )); + (obj.type = packageRepositoryAuth_PackageRepositoryAuthTypeToJSON(message.type)); message.usernamePassword !== undefined && (obj.usernamePassword = message.usernamePassword ? UsernamePassword.toJSON(message.usernamePassword) : undefined); message.tlsCertKey !== undefined && - (obj.tlsCertKey = message.tlsCertKey - ? TlsCertKey.toJSON(message.tlsCertKey) - : undefined); + (obj.tlsCertKey = message.tlsCertKey ? TlsCertKey.toJSON(message.tlsCertKey) : undefined); message.dockerCreds !== undefined && (obj.dockerCreds = message.dockerCreds ? DockerCredentials.toJSON(message.dockerCreds) @@ -1064,27 +978,19 @@ export const PackageRepositoryAuth = { (obj.secretRef = message.secretRef ? SecretKeyReference.toJSON(message.secretRef) : undefined); - message.passCredentials !== undefined && - (obj.passCredentials = message.passCredentials); + message.passCredentials !== undefined && (obj.passCredentials = message.passCredentials); return obj; }, - fromPartial( - object: DeepPartial - ): PackageRepositoryAuth { + fromPartial(object: DeepPartial): PackageRepositoryAuth { const message = { ...basePackageRepositoryAuth } as PackageRepositoryAuth; if (object.type !== undefined && object.type !== null) { message.type = object.type; } else { message.type = 0; } - if ( - object.usernamePassword !== undefined && - object.usernamePassword !== null - ) { - message.usernamePassword = UsernamePassword.fromPartial( - object.usernamePassword - ); + if (object.usernamePassword !== undefined && object.usernamePassword !== null) { + message.usernamePassword = UsernamePassword.fromPartial(object.usernamePassword); } else { message.usernamePassword = undefined; } @@ -1108,10 +1014,7 @@ export const PackageRepositoryAuth = { } else { message.secretRef = undefined; } - if ( - object.passCredentials !== undefined && - object.passCredentials !== null - ) { + if (object.passCredentials !== undefined && object.passCredentials !== null) { message.passCredentials = object.passCredentials; } else { message.passCredentials = false; @@ -1123,10 +1026,7 @@ export const PackageRepositoryAuth = { const baseUsernamePassword: object = { username: "", password: "" }; export const UsernamePassword = { - encode( - message: UsernamePassword, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: UsernamePassword, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.username !== "") { writer.uint32(10).string(message.username); } @@ -1198,10 +1098,7 @@ export const UsernamePassword = { const baseTlsCertKey: object = { cert: "", key: "" }; export const TlsCertKey = { - encode( - message: TlsCertKey, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: TlsCertKey, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.cert !== "") { writer.uint32(10).string(message.cert); } @@ -1278,10 +1175,7 @@ const baseDockerCredentials: object = { }; export const DockerCredentials = { - encode( - message: DockerCredentials, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: DockerCredentials, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.server !== "") { writer.uint32(10).string(message.server); } @@ -1387,10 +1281,7 @@ export const DockerCredentials = { const baseSecretKeyReference: object = { name: "", key: "" }; export const SecretKeyReference = { - encode( - message: SecretKeyReference, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SecretKeyReference, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -1464,21 +1355,15 @@ const baseGetPackageRepositoryDetailRequest: object = {}; export const GetPackageRepositoryDetailRequest = { encode( message: GetPackageRepositoryDetailRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.packageRepoRef !== undefined) { - PackageRepositoryReference.encode( - message.packageRepoRef, - writer.uint32(10).fork() - ).ldelim(); + PackageRepositoryReference.encode(message.packageRepoRef, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetPackageRepositoryDetailRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): GetPackageRepositoryDetailRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1488,10 +1373,7 @@ export const GetPackageRepositoryDetailRequest = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.packageRepoRef = PackageRepositoryReference.decode( - reader, - reader.uint32() - ); + message.packageRepoRef = PackageRepositoryReference.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1506,9 +1388,7 @@ export const GetPackageRepositoryDetailRequest = { ...baseGetPackageRepositoryDetailRequest, } as GetPackageRepositoryDetailRequest; if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { - message.packageRepoRef = PackageRepositoryReference.fromJSON( - object.packageRepoRef - ); + message.packageRepoRef = PackageRepositoryReference.fromJSON(object.packageRepoRef); } else { message.packageRepoRef = undefined; } @@ -1525,15 +1405,13 @@ export const GetPackageRepositoryDetailRequest = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetPackageRepositoryDetailRequest { const message = { ...baseGetPackageRepositoryDetailRequest, } as GetPackageRepositoryDetailRequest; if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { - message.packageRepoRef = PackageRepositoryReference.fromPartial( - object.packageRepoRef - ); + message.packageRepoRef = PackageRepositoryReference.fromPartial(object.packageRepoRef); } else { message.packageRepoRef = undefined; } @@ -1546,7 +1424,7 @@ const baseGetPackageRepositorySummariesRequest: object = {}; export const GetPackageRepositorySummariesRequest = { encode( message: GetPackageRepositorySummariesRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); @@ -1554,10 +1432,7 @@ export const GetPackageRepositorySummariesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetPackageRepositorySummariesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): GetPackageRepositorySummariesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1592,14 +1467,12 @@ export const GetPackageRepositorySummariesRequest = { toJSON(message: GetPackageRepositorySummariesRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); return obj; }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetPackageRepositorySummariesRequest { const message = { ...baseGetPackageRepositorySummariesRequest, @@ -1623,13 +1496,10 @@ const baseUpdatePackageRepositoryRequest: object = { export const UpdatePackageRepositoryRequest = { encode( message: UpdatePackageRepositoryRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.packageRepoRef !== undefined) { - PackageRepositoryReference.encode( - message.packageRepoRef, - writer.uint32(10).fork() - ).ldelim(); + PackageRepositoryReference.encode(message.packageRepoRef, writer.uint32(10).fork()).ldelim(); } if (message.url !== "") { writer.uint32(18).string(message.url); @@ -1644,24 +1514,15 @@ export const UpdatePackageRepositoryRequest = { writer.uint32(40).uint32(message.interval); } if (message.tlsConfig !== undefined) { - PackageRepositoryTlsConfig.encode( - message.tlsConfig, - writer.uint32(50).fork() - ).ldelim(); + PackageRepositoryTlsConfig.encode(message.tlsConfig, writer.uint32(50).fork()).ldelim(); } if (message.auth !== undefined) { - PackageRepositoryAuth.encode( - message.auth, - writer.uint32(58).fork() - ).ldelim(); + PackageRepositoryAuth.encode(message.auth, writer.uint32(58).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): UpdatePackageRepositoryRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): UpdatePackageRepositoryRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1671,10 +1532,7 @@ export const UpdatePackageRepositoryRequest = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.packageRepoRef = PackageRepositoryReference.decode( - reader, - reader.uint32() - ); + message.packageRepoRef = PackageRepositoryReference.decode(reader, reader.uint32()); break; case 2: message.url = reader.string(); @@ -1689,10 +1547,7 @@ export const UpdatePackageRepositoryRequest = { message.interval = reader.uint32(); break; case 6: - message.tlsConfig = PackageRepositoryTlsConfig.decode( - reader, - reader.uint32() - ); + message.tlsConfig = PackageRepositoryTlsConfig.decode(reader, reader.uint32()); break; case 7: message.auth = PackageRepositoryAuth.decode(reader, reader.uint32()); @@ -1710,9 +1565,7 @@ export const UpdatePackageRepositoryRequest = { ...baseUpdatePackageRepositoryRequest, } as UpdatePackageRepositoryRequest; if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { - message.packageRepoRef = PackageRepositoryReference.fromJSON( - object.packageRepoRef - ); + message.packageRepoRef = PackageRepositoryReference.fromJSON(object.packageRepoRef); } else { message.packageRepoRef = undefined; } @@ -1756,8 +1609,7 @@ export const UpdatePackageRepositoryRequest = { ? PackageRepositoryReference.toJSON(message.packageRepoRef) : undefined); message.url !== undefined && (obj.url = message.url); - message.description !== undefined && - (obj.description = message.description); + message.description !== undefined && (obj.description = message.description); message.type !== undefined && (obj.type = message.type); message.interval !== undefined && (obj.interval = message.interval); message.tlsConfig !== undefined && @@ -1765,22 +1617,16 @@ export const UpdatePackageRepositoryRequest = { ? PackageRepositoryTlsConfig.toJSON(message.tlsConfig) : undefined); message.auth !== undefined && - (obj.auth = message.auth - ? PackageRepositoryAuth.toJSON(message.auth) - : undefined); + (obj.auth = message.auth ? PackageRepositoryAuth.toJSON(message.auth) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): UpdatePackageRepositoryRequest { + fromPartial(object: DeepPartial): UpdatePackageRepositoryRequest { const message = { ...baseUpdatePackageRepositoryRequest, } as UpdatePackageRepositoryRequest; if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { - message.packageRepoRef = PackageRepositoryReference.fromPartial( - object.packageRepoRef - ); + message.packageRepoRef = PackageRepositoryReference.fromPartial(object.packageRepoRef); } else { message.packageRepoRef = undefined; } @@ -1805,9 +1651,7 @@ export const UpdatePackageRepositoryRequest = { message.interval = 0; } if (object.tlsConfig !== undefined && object.tlsConfig !== null) { - message.tlsConfig = PackageRepositoryTlsConfig.fromPartial( - object.tlsConfig - ); + message.tlsConfig = PackageRepositoryTlsConfig.fromPartial(object.tlsConfig); } else { message.tlsConfig = undefined; } @@ -1825,7 +1669,7 @@ const basePackageRepositoryReference: object = { identifier: "" }; export const PackageRepositoryReference = { encode( message: PackageRepositoryReference, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); @@ -1839,10 +1683,7 @@ export const PackageRepositoryReference = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): PackageRepositoryReference { + decode(input: _m0.Reader | Uint8Array, length?: number): PackageRepositoryReference { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1893,18 +1734,14 @@ export const PackageRepositoryReference = { toJSON(message: PackageRepositoryReference): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); message.identifier !== undefined && (obj.identifier = message.identifier); message.plugin !== undefined && (obj.plugin = message.plugin ? Plugin.toJSON(message.plugin) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): PackageRepositoryReference { + fromPartial(object: DeepPartial): PackageRepositoryReference { const message = { ...basePackageRepositoryReference, } as PackageRepositoryReference; @@ -1932,21 +1769,15 @@ const baseAddPackageRepositoryResponse: object = {}; export const AddPackageRepositoryResponse = { encode( message: AddPackageRepositoryResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.packageRepoRef !== undefined) { - PackageRepositoryReference.encode( - message.packageRepoRef, - writer.uint32(10).fork() - ).ldelim(); + PackageRepositoryReference.encode(message.packageRepoRef, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): AddPackageRepositoryResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): AddPackageRepositoryResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1956,10 +1787,7 @@ export const AddPackageRepositoryResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.packageRepoRef = PackageRepositoryReference.decode( - reader, - reader.uint32() - ); + message.packageRepoRef = PackageRepositoryReference.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -1974,9 +1802,7 @@ export const AddPackageRepositoryResponse = { ...baseAddPackageRepositoryResponse, } as AddPackageRepositoryResponse; if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { - message.packageRepoRef = PackageRepositoryReference.fromJSON( - object.packageRepoRef - ); + message.packageRepoRef = PackageRepositoryReference.fromJSON(object.packageRepoRef); } else { message.packageRepoRef = undefined; } @@ -1992,16 +1818,12 @@ export const AddPackageRepositoryResponse = { return obj; }, - fromPartial( - object: DeepPartial - ): AddPackageRepositoryResponse { + fromPartial(object: DeepPartial): AddPackageRepositoryResponse { const message = { ...baseAddPackageRepositoryResponse, } as AddPackageRepositoryResponse; if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { - message.packageRepoRef = PackageRepositoryReference.fromPartial( - object.packageRepoRef - ); + message.packageRepoRef = PackageRepositoryReference.fromPartial(object.packageRepoRef); } else { message.packageRepoRef = undefined; } @@ -2016,10 +1838,7 @@ const basePackageRepositoryStatus: object = { }; export const PackageRepositoryStatus = { - encode( - message: PackageRepositoryStatus, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PackageRepositoryStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.ready === true) { writer.uint32(8).bool(message.ready); } @@ -2032,10 +1851,7 @@ export const PackageRepositoryStatus = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): PackageRepositoryStatus { + decode(input: _m0.Reader | Uint8Array, length?: number): PackageRepositoryStatus { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2071,9 +1887,7 @@ export const PackageRepositoryStatus = { message.ready = false; } if (object.reason !== undefined && object.reason !== null) { - message.reason = packageRepositoryStatus_StatusReasonFromJSON( - object.reason - ); + message.reason = packageRepositoryStatus_StatusReasonFromJSON(object.reason); } else { message.reason = 0; } @@ -2094,9 +1908,7 @@ export const PackageRepositoryStatus = { return obj; }, - fromPartial( - object: DeepPartial - ): PackageRepositoryStatus { + fromPartial(object: DeepPartial): PackageRepositoryStatus { const message = { ...basePackageRepositoryStatus, } as PackageRepositoryStatus; @@ -2129,15 +1941,9 @@ const basePackageRepositoryDetail: object = { }; export const PackageRepositoryDetail = { - encode( - message: PackageRepositoryDetail, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PackageRepositoryDetail, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.packageRepoRef !== undefined) { - PackageRepositoryReference.encode( - message.packageRepoRef, - writer.uint32(10).fork() - ).ldelim(); + PackageRepositoryReference.encode(message.packageRepoRef, writer.uint32(10).fork()).ldelim(); } if (message.name !== "") { writer.uint32(18).string(message.name); @@ -2158,33 +1964,21 @@ export const PackageRepositoryDetail = { writer.uint32(56).uint32(message.interval); } if (message.tlsConfig !== undefined) { - PackageRepositoryTlsConfig.encode( - message.tlsConfig, - writer.uint32(66).fork() - ).ldelim(); + PackageRepositoryTlsConfig.encode(message.tlsConfig, writer.uint32(66).fork()).ldelim(); } if (message.auth !== undefined) { - PackageRepositoryAuth.encode( - message.auth, - writer.uint32(74).fork() - ).ldelim(); + PackageRepositoryAuth.encode(message.auth, writer.uint32(74).fork()).ldelim(); } if (message.customDetail !== undefined) { Any.encode(message.customDetail, writer.uint32(82).fork()).ldelim(); } if (message.status !== undefined) { - PackageRepositoryStatus.encode( - message.status, - writer.uint32(90).fork() - ).ldelim(); + PackageRepositoryStatus.encode(message.status, writer.uint32(90).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): PackageRepositoryDetail { + decode(input: _m0.Reader | Uint8Array, length?: number): PackageRepositoryDetail { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2194,10 +1988,7 @@ export const PackageRepositoryDetail = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.packageRepoRef = PackageRepositoryReference.decode( - reader, - reader.uint32() - ); + message.packageRepoRef = PackageRepositoryReference.decode(reader, reader.uint32()); break; case 2: message.name = reader.string(); @@ -2218,10 +2009,7 @@ export const PackageRepositoryDetail = { message.interval = reader.uint32(); break; case 8: - message.tlsConfig = PackageRepositoryTlsConfig.decode( - reader, - reader.uint32() - ); + message.tlsConfig = PackageRepositoryTlsConfig.decode(reader, reader.uint32()); break; case 9: message.auth = PackageRepositoryAuth.decode(reader, reader.uint32()); @@ -2230,10 +2018,7 @@ export const PackageRepositoryDetail = { message.customDetail = Any.decode(reader, reader.uint32()); break; case 11: - message.status = PackageRepositoryStatus.decode( - reader, - reader.uint32() - ); + message.status = PackageRepositoryStatus.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2248,9 +2033,7 @@ export const PackageRepositoryDetail = { ...basePackageRepositoryDetail, } as PackageRepositoryDetail; if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { - message.packageRepoRef = PackageRepositoryReference.fromJSON( - object.packageRepoRef - ); + message.packageRepoRef = PackageRepositoryReference.fromJSON(object.packageRepoRef); } else { message.packageRepoRef = undefined; } @@ -2264,10 +2047,7 @@ export const PackageRepositoryDetail = { } else { message.description = ""; } - if ( - object.namespaceScoped !== undefined && - object.namespaceScoped !== null - ) { + if (object.namespaceScoped !== undefined && object.namespaceScoped !== null) { message.namespaceScoped = Boolean(object.namespaceScoped); } else { message.namespaceScoped = false; @@ -2317,10 +2097,8 @@ export const PackageRepositoryDetail = { ? PackageRepositoryReference.toJSON(message.packageRepoRef) : undefined); message.name !== undefined && (obj.name = message.name); - message.description !== undefined && - (obj.description = message.description); - message.namespaceScoped !== undefined && - (obj.namespaceScoped = message.namespaceScoped); + message.description !== undefined && (obj.description = message.description); + message.namespaceScoped !== undefined && (obj.namespaceScoped = message.namespaceScoped); message.type !== undefined && (obj.type = message.type); message.url !== undefined && (obj.url = message.url); message.interval !== undefined && (obj.interval = message.interval); @@ -2329,30 +2107,20 @@ export const PackageRepositoryDetail = { ? PackageRepositoryTlsConfig.toJSON(message.tlsConfig) : undefined); message.auth !== undefined && - (obj.auth = message.auth - ? PackageRepositoryAuth.toJSON(message.auth) - : undefined); + (obj.auth = message.auth ? PackageRepositoryAuth.toJSON(message.auth) : undefined); message.customDetail !== undefined && - (obj.customDetail = message.customDetail - ? Any.toJSON(message.customDetail) - : undefined); + (obj.customDetail = message.customDetail ? Any.toJSON(message.customDetail) : undefined); message.status !== undefined && - (obj.status = message.status - ? PackageRepositoryStatus.toJSON(message.status) - : undefined); + (obj.status = message.status ? PackageRepositoryStatus.toJSON(message.status) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): PackageRepositoryDetail { + fromPartial(object: DeepPartial): PackageRepositoryDetail { const message = { ...basePackageRepositoryDetail, } as PackageRepositoryDetail; if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { - message.packageRepoRef = PackageRepositoryReference.fromPartial( - object.packageRepoRef - ); + message.packageRepoRef = PackageRepositoryReference.fromPartial(object.packageRepoRef); } else { message.packageRepoRef = undefined; } @@ -2366,10 +2134,7 @@ export const PackageRepositoryDetail = { } else { message.description = ""; } - if ( - object.namespaceScoped !== undefined && - object.namespaceScoped !== null - ) { + if (object.namespaceScoped !== undefined && object.namespaceScoped !== null) { message.namespaceScoped = object.namespaceScoped; } else { message.namespaceScoped = false; @@ -2390,9 +2155,7 @@ export const PackageRepositoryDetail = { message.interval = 0; } if (object.tlsConfig !== undefined && object.tlsConfig !== null) { - message.tlsConfig = PackageRepositoryTlsConfig.fromPartial( - object.tlsConfig - ); + message.tlsConfig = PackageRepositoryTlsConfig.fromPartial(object.tlsConfig); } else { message.tlsConfig = undefined; } @@ -2420,21 +2183,15 @@ const baseGetPackageRepositoryDetailResponse: object = {}; export const GetPackageRepositoryDetailResponse = { encode( message: GetPackageRepositoryDetailResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.detail !== undefined) { - PackageRepositoryDetail.encode( - message.detail, - writer.uint32(10).fork() - ).ldelim(); + PackageRepositoryDetail.encode(message.detail, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetPackageRepositoryDetailResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetPackageRepositoryDetailResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2444,10 +2201,7 @@ export const GetPackageRepositoryDetailResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.detail = PackageRepositoryDetail.decode( - reader, - reader.uint32() - ); + message.detail = PackageRepositoryDetail.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2472,14 +2226,12 @@ export const GetPackageRepositoryDetailResponse = { toJSON(message: GetPackageRepositoryDetailResponse): unknown { const obj: any = {}; message.detail !== undefined && - (obj.detail = message.detail - ? PackageRepositoryDetail.toJSON(message.detail) - : undefined); + (obj.detail = message.detail ? PackageRepositoryDetail.toJSON(message.detail) : undefined); return obj; }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetPackageRepositoryDetailResponse { const message = { ...baseGetPackageRepositoryDetailResponse, @@ -2502,15 +2254,9 @@ const basePackageRepositorySummary: object = { }; export const PackageRepositorySummary = { - encode( - message: PackageRepositorySummary, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PackageRepositorySummary, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.packageRepoRef !== undefined) { - PackageRepositoryReference.encode( - message.packageRepoRef, - writer.uint32(10).fork() - ).ldelim(); + PackageRepositoryReference.encode(message.packageRepoRef, writer.uint32(10).fork()).ldelim(); } if (message.name !== "") { writer.uint32(18).string(message.name); @@ -2528,18 +2274,12 @@ export const PackageRepositorySummary = { writer.uint32(50).string(message.url); } if (message.status !== undefined) { - PackageRepositoryStatus.encode( - message.status, - writer.uint32(58).fork() - ).ldelim(); + PackageRepositoryStatus.encode(message.status, writer.uint32(58).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): PackageRepositorySummary { + decode(input: _m0.Reader | Uint8Array, length?: number): PackageRepositorySummary { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2549,10 +2289,7 @@ export const PackageRepositorySummary = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.packageRepoRef = PackageRepositoryReference.decode( - reader, - reader.uint32() - ); + message.packageRepoRef = PackageRepositoryReference.decode(reader, reader.uint32()); break; case 2: message.name = reader.string(); @@ -2570,10 +2307,7 @@ export const PackageRepositorySummary = { message.url = reader.string(); break; case 7: - message.status = PackageRepositoryStatus.decode( - reader, - reader.uint32() - ); + message.status = PackageRepositoryStatus.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2588,9 +2322,7 @@ export const PackageRepositorySummary = { ...basePackageRepositorySummary, } as PackageRepositorySummary; if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { - message.packageRepoRef = PackageRepositoryReference.fromJSON( - object.packageRepoRef - ); + message.packageRepoRef = PackageRepositoryReference.fromJSON(object.packageRepoRef); } else { message.packageRepoRef = undefined; } @@ -2604,10 +2336,7 @@ export const PackageRepositorySummary = { } else { message.description = ""; } - if ( - object.namespaceScoped !== undefined && - object.namespaceScoped !== null - ) { + if (object.namespaceScoped !== undefined && object.namespaceScoped !== null) { message.namespaceScoped = Boolean(object.namespaceScoped); } else { message.namespaceScoped = false; @@ -2637,29 +2366,21 @@ export const PackageRepositorySummary = { ? PackageRepositoryReference.toJSON(message.packageRepoRef) : undefined); message.name !== undefined && (obj.name = message.name); - message.description !== undefined && - (obj.description = message.description); - message.namespaceScoped !== undefined && - (obj.namespaceScoped = message.namespaceScoped); + message.description !== undefined && (obj.description = message.description); + message.namespaceScoped !== undefined && (obj.namespaceScoped = message.namespaceScoped); message.type !== undefined && (obj.type = message.type); message.url !== undefined && (obj.url = message.url); message.status !== undefined && - (obj.status = message.status - ? PackageRepositoryStatus.toJSON(message.status) - : undefined); + (obj.status = message.status ? PackageRepositoryStatus.toJSON(message.status) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): PackageRepositorySummary { + fromPartial(object: DeepPartial): PackageRepositorySummary { const message = { ...basePackageRepositorySummary, } as PackageRepositorySummary; if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { - message.packageRepoRef = PackageRepositoryReference.fromPartial( - object.packageRepoRef - ); + message.packageRepoRef = PackageRepositoryReference.fromPartial(object.packageRepoRef); } else { message.packageRepoRef = undefined; } @@ -2673,10 +2394,7 @@ export const PackageRepositorySummary = { } else { message.description = ""; } - if ( - object.namespaceScoped !== undefined && - object.namespaceScoped !== null - ) { + if (object.namespaceScoped !== undefined && object.namespaceScoped !== null) { message.namespaceScoped = object.namespaceScoped; } else { message.namespaceScoped = false; @@ -2705,7 +2423,7 @@ const baseGetPackageRepositorySummariesResponse: object = {}; export const GetPackageRepositorySummariesResponse = { encode( message: GetPackageRepositorySummariesResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { for (const v of message.packageRepositorySummaries) { PackageRepositorySummary.encode(v!, writer.uint32(10).fork()).ldelim(); @@ -2713,10 +2431,7 @@ export const GetPackageRepositorySummariesResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetPackageRepositorySummariesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetPackageRepositorySummariesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2728,7 +2443,7 @@ export const GetPackageRepositorySummariesResponse = { switch (tag >>> 3) { case 1: message.packageRepositorySummaries.push( - PackageRepositorySummary.decode(reader, reader.uint32()) + PackageRepositorySummary.decode(reader, reader.uint32()), ); break; default: @@ -2749,9 +2464,7 @@ export const GetPackageRepositorySummariesResponse = { object.packageRepositorySummaries !== null ) { for (const e of object.packageRepositorySummaries) { - message.packageRepositorySummaries.push( - PackageRepositorySummary.fromJSON(e) - ); + message.packageRepositorySummaries.push(PackageRepositorySummary.fromJSON(e)); } } return message; @@ -2760,8 +2473,8 @@ export const GetPackageRepositorySummariesResponse = { toJSON(message: GetPackageRepositorySummariesResponse): unknown { const obj: any = {}; if (message.packageRepositorySummaries) { - obj.packageRepositorySummaries = message.packageRepositorySummaries.map( - (e) => (e ? PackageRepositorySummary.toJSON(e) : undefined) + obj.packageRepositorySummaries = message.packageRepositorySummaries.map(e => + e ? PackageRepositorySummary.toJSON(e) : undefined, ); } else { obj.packageRepositorySummaries = []; @@ -2770,7 +2483,7 @@ export const GetPackageRepositorySummariesResponse = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetPackageRepositorySummariesResponse { const message = { ...baseGetPackageRepositorySummariesResponse, @@ -2781,9 +2494,7 @@ export const GetPackageRepositorySummariesResponse = { object.packageRepositorySummaries !== null ) { for (const e of object.packageRepositorySummaries) { - message.packageRepositorySummaries.push( - PackageRepositorySummary.fromPartial(e) - ); + message.packageRepositorySummaries.push(PackageRepositorySummary.fromPartial(e)); } } return message; @@ -2795,21 +2506,15 @@ const baseUpdatePackageRepositoryResponse: object = {}; export const UpdatePackageRepositoryResponse = { encode( message: UpdatePackageRepositoryResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.packageRepoRef !== undefined) { - PackageRepositoryReference.encode( - message.packageRepoRef, - writer.uint32(10).fork() - ).ldelim(); + PackageRepositoryReference.encode(message.packageRepoRef, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): UpdatePackageRepositoryResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): UpdatePackageRepositoryResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2819,10 +2524,7 @@ export const UpdatePackageRepositoryResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.packageRepoRef = PackageRepositoryReference.decode( - reader, - reader.uint32() - ); + message.packageRepoRef = PackageRepositoryReference.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -2837,9 +2539,7 @@ export const UpdatePackageRepositoryResponse = { ...baseUpdatePackageRepositoryResponse, } as UpdatePackageRepositoryResponse; if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { - message.packageRepoRef = PackageRepositoryReference.fromJSON( - object.packageRepoRef - ); + message.packageRepoRef = PackageRepositoryReference.fromJSON(object.packageRepoRef); } else { message.packageRepoRef = undefined; } @@ -2856,15 +2556,13 @@ export const UpdatePackageRepositoryResponse = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): UpdatePackageRepositoryResponse { const message = { ...baseUpdatePackageRepositoryResponse, } as UpdatePackageRepositoryResponse; if (object.packageRepoRef !== undefined && object.packageRepoRef !== null) { - message.packageRepoRef = PackageRepositoryReference.fromPartial( - object.packageRepoRef - ); + message.packageRepoRef = PackageRepositoryReference.fromPartial(object.packageRepoRef); } else { message.packageRepoRef = undefined; } @@ -2876,19 +2574,19 @@ export const UpdatePackageRepositoryResponse = { export interface RepositoriesService { AddPackageRepository( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; GetPackageRepositoryDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; GetPackageRepositorySummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; UpdatePackageRepository( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; } @@ -2898,54 +2596,52 @@ export class RepositoriesServiceClientImpl implements RepositoriesService { constructor(rpc: Rpc) { this.rpc = rpc; this.AddPackageRepository = this.AddPackageRepository.bind(this); - this.GetPackageRepositoryDetail = - this.GetPackageRepositoryDetail.bind(this); - this.GetPackageRepositorySummaries = - this.GetPackageRepositorySummaries.bind(this); + this.GetPackageRepositoryDetail = this.GetPackageRepositoryDetail.bind(this); + this.GetPackageRepositorySummaries = this.GetPackageRepositorySummaries.bind(this); this.UpdatePackageRepository = this.UpdatePackageRepository.bind(this); } AddPackageRepository( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( RepositoriesServiceAddPackageRepositoryDesc, AddPackageRepositoryRequest.fromPartial(request), - metadata + metadata, ); } GetPackageRepositoryDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( RepositoriesServiceGetPackageRepositoryDetailDesc, GetPackageRepositoryDetailRequest.fromPartial(request), - metadata + metadata, ); } GetPackageRepositorySummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( RepositoriesServiceGetPackageRepositorySummariesDesc, GetPackageRepositorySummariesRequest.fromPartial(request), - metadata + metadata, ); } UpdatePackageRepository( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( RepositoriesServiceUpdatePackageRepositoryDesc, UpdatePackageRepositoryRequest.fromPartial(request), - metadata + metadata, ); } } @@ -2954,100 +2650,95 @@ export const RepositoriesServiceDesc = { serviceName: "kubeappsapis.core.packages.v1alpha1.RepositoriesService", }; -export const RepositoriesServiceAddPackageRepositoryDesc: UnaryMethodDefinitionish = - { - methodName: "AddPackageRepository", - service: RepositoriesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return AddPackageRepositoryRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...AddPackageRepositoryResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const RepositoriesServiceAddPackageRepositoryDesc: UnaryMethodDefinitionish = { + methodName: "AddPackageRepository", + service: RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return AddPackageRepositoryRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...AddPackageRepositoryResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const RepositoriesServiceGetPackageRepositoryDetailDesc: UnaryMethodDefinitionish = - { - methodName: "GetPackageRepositoryDetail", - service: RepositoriesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetPackageRepositoryDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetPackageRepositoryDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const RepositoriesServiceGetPackageRepositoryDetailDesc: UnaryMethodDefinitionish = { + methodName: "GetPackageRepositoryDetail", + service: RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetPackageRepositoryDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetPackageRepositoryDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const RepositoriesServiceGetPackageRepositorySummariesDesc: UnaryMethodDefinitionish = - { - methodName: "GetPackageRepositorySummaries", - service: RepositoriesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetPackageRepositorySummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetPackageRepositorySummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const RepositoriesServiceGetPackageRepositorySummariesDesc: UnaryMethodDefinitionish = { + methodName: "GetPackageRepositorySummaries", + service: RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetPackageRepositorySummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetPackageRepositorySummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const RepositoriesServiceUpdatePackageRepositoryDesc: UnaryMethodDefinitionish = - { - methodName: "UpdatePackageRepository", - service: RepositoriesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return UpdatePackageRepositoryRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...UpdatePackageRepositoryResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const RepositoriesServiceUpdatePackageRepositoryDesc: UnaryMethodDefinitionish = { + methodName: "UpdatePackageRepository", + service: RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return UpdatePackageRepositoryRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...UpdatePackageRepositoryResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -interface UnaryMethodDefinitionishR - extends grpc.UnaryMethodDefinition { +interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -3058,7 +2749,7 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise; } @@ -3078,7 +2769,7 @@ export class GrpcWebImpl { debug?: boolean; metadata?: grpc.Metadata; - } + }, ) { this.host = host; this.options = options; @@ -3087,7 +2778,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -3119,14 +2810,7 @@ export class GrpcWebImpl { } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array diff --git a/dashboard/src/gen/kubeappsapis/core/plugins/v1alpha1/plugins.ts b/dashboard/src/gen/kubeappsapis/core/plugins/v1alpha1/plugins.ts index a7559e731c1..21ebec26470 100644 --- a/dashboard/src/gen/kubeappsapis/core/plugins/v1alpha1/plugins.ts +++ b/dashboard/src/gen/kubeappsapis/core/plugins/v1alpha1/plugins.ts @@ -50,17 +50,11 @@ export interface Plugin { const baseGetConfiguredPluginsRequest: object = {}; export const GetConfiguredPluginsRequest = { - encode( - _: GetConfiguredPluginsRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: GetConfiguredPluginsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetConfiguredPluginsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): GetConfiguredPluginsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -89,9 +83,7 @@ export const GetConfiguredPluginsRequest = { return obj; }, - fromPartial( - _: DeepPartial - ): GetConfiguredPluginsRequest { + fromPartial(_: DeepPartial): GetConfiguredPluginsRequest { const message = { ...baseGetConfiguredPluginsRequest, } as GetConfiguredPluginsRequest; @@ -104,7 +96,7 @@ const baseGetConfiguredPluginsResponse: object = {}; export const GetConfiguredPluginsResponse = { encode( message: GetConfiguredPluginsResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { for (const v of message.plugins) { Plugin.encode(v!, writer.uint32(10).fork()).ldelim(); @@ -112,10 +104,7 @@ export const GetConfiguredPluginsResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetConfiguredPluginsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetConfiguredPluginsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -152,18 +141,14 @@ export const GetConfiguredPluginsResponse = { toJSON(message: GetConfiguredPluginsResponse): unknown { const obj: any = {}; if (message.plugins) { - obj.plugins = message.plugins.map((e) => - e ? Plugin.toJSON(e) : undefined - ); + obj.plugins = message.plugins.map(e => (e ? Plugin.toJSON(e) : undefined)); } else { obj.plugins = []; } return obj; }, - fromPartial( - object: DeepPartial - ): GetConfiguredPluginsResponse { + fromPartial(object: DeepPartial): GetConfiguredPluginsResponse { const message = { ...baseGetConfiguredPluginsResponse, } as GetConfiguredPluginsResponse; @@ -180,10 +165,7 @@ export const GetConfiguredPluginsResponse = { const basePlugin: object = { name: "", version: "" }; export const Plugin = { - encode( - message: Plugin, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Plugin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -256,7 +238,7 @@ export interface PluginsService { /** GetConfiguredPlugins returns a map of short and longnames for the configured plugins. */ GetConfiguredPlugins( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; } @@ -270,12 +252,12 @@ export class PluginsServiceClientImpl implements PluginsService { GetConfiguredPlugins( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( PluginsServiceGetConfiguredPluginsDesc, GetConfiguredPluginsRequest.fromPartial(request), - metadata + metadata, ); } } @@ -284,31 +266,29 @@ export const PluginsServiceDesc = { serviceName: "kubeappsapis.core.plugins.v1alpha1.PluginsService", }; -export const PluginsServiceGetConfiguredPluginsDesc: UnaryMethodDefinitionish = - { - methodName: "GetConfiguredPlugins", - service: PluginsServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetConfiguredPluginsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetConfiguredPluginsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const PluginsServiceGetConfiguredPluginsDesc: UnaryMethodDefinitionish = { + methodName: "GetConfiguredPlugins", + service: PluginsServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetConfiguredPluginsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetConfiguredPluginsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -interface UnaryMethodDefinitionishR - extends grpc.UnaryMethodDefinition { +interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -319,7 +299,7 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise; } @@ -339,7 +319,7 @@ export class GrpcWebImpl { debug?: boolean; metadata?: grpc.Metadata; - } + }, ) { this.host = host; this.options = options; @@ -348,7 +328,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -380,14 +360,7 @@ export class GrpcWebImpl { } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array diff --git a/dashboard/src/gen/kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.ts b/dashboard/src/gen/kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.ts index 29a0ae9e9db..4b553d4d02b 100644 --- a/dashboard/src/gen/kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.ts +++ b/dashboard/src/gen/kubeappsapis/plugins/fluxv2/packages/v1alpha1/fluxv2.ts @@ -49,7 +49,7 @@ const baseSetUserManagedSecretsRequest: object = { value: false }; export const SetUserManagedSecretsRequest = { encode( message: SetUserManagedSecretsRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.value === true) { writer.uint32(8).bool(message.value); @@ -57,10 +57,7 @@ export const SetUserManagedSecretsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SetUserManagedSecretsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): SetUserManagedSecretsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -98,9 +95,7 @@ export const SetUserManagedSecretsRequest = { return obj; }, - fromPartial( - object: DeepPartial - ): SetUserManagedSecretsRequest { + fromPartial(object: DeepPartial): SetUserManagedSecretsRequest { const message = { ...baseSetUserManagedSecretsRequest, } as SetUserManagedSecretsRequest; @@ -118,7 +113,7 @@ const baseSetUserManagedSecretsResponse: object = { value: false }; export const SetUserManagedSecretsResponse = { encode( message: SetUserManagedSecretsResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.value === true) { writer.uint32(8).bool(message.value); @@ -126,10 +121,7 @@ export const SetUserManagedSecretsResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SetUserManagedSecretsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): SetUserManagedSecretsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -167,9 +159,7 @@ export const SetUserManagedSecretsResponse = { return obj; }, - fromPartial( - object: DeepPartial - ): SetUserManagedSecretsResponse { + fromPartial(object: DeepPartial): SetUserManagedSecretsResponse { const message = { ...baseSetUserManagedSecretsResponse, } as SetUserManagedSecretsResponse; @@ -186,42 +176,42 @@ export interface FluxV2PackagesService { /** GetAvailablePackageSummaries returns the available packages managed by the 'fluxv2' plugin */ GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** GetAvailablePackageDetail returns the package metadata managed by the 'fluxv2' plugin */ GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** GetAvailablePackageVersions returns the package versions managed by the 'fluxv2' plugin */ GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** GetInstalledPackageSummaries returns the installed packages managed by the 'fluxv2' plugin */ GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** GetInstalledPackageDetail returns the requested installed package managed by the 'fluxv2' plugin */ GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** CreateInstalledPackage creates an installed package based on the request. */ CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** UpdateInstalledPackage updates an installed package based on the request. */ UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** DeleteInstalledPackage deletes an installed package based on the request. */ DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** * GetInstalledPackageResourceRefs returns the references for the Kubernetes @@ -229,7 +219,7 @@ export interface FluxV2PackagesService { */ GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; } @@ -238,332 +228,318 @@ export class FluxV2PackagesServiceClientImpl implements FluxV2PackagesService { constructor(rpc: Rpc) { this.rpc = rpc; - this.GetAvailablePackageSummaries = - this.GetAvailablePackageSummaries.bind(this); + this.GetAvailablePackageSummaries = this.GetAvailablePackageSummaries.bind(this); this.GetAvailablePackageDetail = this.GetAvailablePackageDetail.bind(this); - this.GetAvailablePackageVersions = - this.GetAvailablePackageVersions.bind(this); - this.GetInstalledPackageSummaries = - this.GetInstalledPackageSummaries.bind(this); + this.GetAvailablePackageVersions = this.GetAvailablePackageVersions.bind(this); + this.GetInstalledPackageSummaries = this.GetInstalledPackageSummaries.bind(this); this.GetInstalledPackageDetail = this.GetInstalledPackageDetail.bind(this); this.CreateInstalledPackage = this.CreateInstalledPackage.bind(this); this.UpdateInstalledPackage = this.UpdateInstalledPackage.bind(this); this.DeleteInstalledPackage = this.DeleteInstalledPackage.bind(this); - this.GetInstalledPackageResourceRefs = - this.GetInstalledPackageResourceRefs.bind(this); + this.GetInstalledPackageResourceRefs = this.GetInstalledPackageResourceRefs.bind(this); } GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2PackagesServiceGetAvailablePackageSummariesDesc, GetAvailablePackageSummariesRequest.fromPartial(request), - metadata + metadata, ); } GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2PackagesServiceGetAvailablePackageDetailDesc, GetAvailablePackageDetailRequest.fromPartial(request), - metadata + metadata, ); } GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2PackagesServiceGetAvailablePackageVersionsDesc, GetAvailablePackageVersionsRequest.fromPartial(request), - metadata + metadata, ); } GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2PackagesServiceGetInstalledPackageSummariesDesc, GetInstalledPackageSummariesRequest.fromPartial(request), - metadata + metadata, ); } GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2PackagesServiceGetInstalledPackageDetailDesc, GetInstalledPackageDetailRequest.fromPartial(request), - metadata + metadata, ); } CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2PackagesServiceCreateInstalledPackageDesc, CreateInstalledPackageRequest.fromPartial(request), - metadata + metadata, ); } UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2PackagesServiceUpdateInstalledPackageDesc, UpdateInstalledPackageRequest.fromPartial(request), - metadata + metadata, ); } DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2PackagesServiceDeleteInstalledPackageDesc, DeleteInstalledPackageRequest.fromPartial(request), - metadata + metadata, ); } GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2PackagesServiceGetInstalledPackageResourceRefsDesc, GetInstalledPackageResourceRefsRequest.fromPartial(request), - metadata + metadata, ); } } export const FluxV2PackagesServiceDesc = { - serviceName: - "kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService", + serviceName: "kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2PackagesService", }; -export const FluxV2PackagesServiceGetAvailablePackageSummariesDesc: UnaryMethodDefinitionish = - { - methodName: "GetAvailablePackageSummaries", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageSummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageSummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const FluxV2PackagesServiceGetAvailablePackageSummariesDesc: UnaryMethodDefinitionish = { + methodName: "GetAvailablePackageSummaries", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageSummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageSummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const FluxV2PackagesServiceGetAvailablePackageDetailDesc: UnaryMethodDefinitionish = - { - methodName: "GetAvailablePackageDetail", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const FluxV2PackagesServiceGetAvailablePackageDetailDesc: UnaryMethodDefinitionish = { + methodName: "GetAvailablePackageDetail", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const FluxV2PackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = - { - methodName: "GetAvailablePackageVersions", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageVersionsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageVersionsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const FluxV2PackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = { + methodName: "GetAvailablePackageVersions", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageVersionsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageVersionsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const FluxV2PackagesServiceGetInstalledPackageSummariesDesc: UnaryMethodDefinitionish = - { - methodName: "GetInstalledPackageSummaries", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageSummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageSummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const FluxV2PackagesServiceGetInstalledPackageSummariesDesc: UnaryMethodDefinitionish = { + methodName: "GetInstalledPackageSummaries", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageSummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageSummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const FluxV2PackagesServiceGetInstalledPackageDetailDesc: UnaryMethodDefinitionish = - { - methodName: "GetInstalledPackageDetail", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const FluxV2PackagesServiceGetInstalledPackageDetailDesc: UnaryMethodDefinitionish = { + methodName: "GetInstalledPackageDetail", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const FluxV2PackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = - { - methodName: "CreateInstalledPackage", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return CreateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...CreateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const FluxV2PackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = { + methodName: "CreateInstalledPackage", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return CreateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...CreateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const FluxV2PackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = - { - methodName: "UpdateInstalledPackage", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return UpdateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...UpdateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const FluxV2PackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = { + methodName: "UpdateInstalledPackage", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return UpdateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...UpdateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const FluxV2PackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = - { - methodName: "DeleteInstalledPackage", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return DeleteInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...DeleteInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const FluxV2PackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = { + methodName: "DeleteInstalledPackage", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return DeleteInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...DeleteInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const FluxV2PackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = - { - methodName: "GetInstalledPackageResourceRefs", - service: FluxV2PackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageResourceRefsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageResourceRefsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const FluxV2PackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = { + methodName: "GetInstalledPackageResourceRefs", + service: FluxV2PackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageResourceRefsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageResourceRefsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; export interface FluxV2RepositoriesService { /** @@ -572,149 +548,142 @@ export interface FluxV2RepositoriesService { */ AddPackageRepository( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; GetPackageRepositoryDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; GetPackageRepositorySummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; UpdatePackageRepository( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** this endpoint only exists for the purpose of integration tests */ SetUserManagedSecrets( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; } -export class FluxV2RepositoriesServiceClientImpl - implements FluxV2RepositoriesService -{ +export class FluxV2RepositoriesServiceClientImpl implements FluxV2RepositoriesService { private readonly rpc: Rpc; constructor(rpc: Rpc) { this.rpc = rpc; this.AddPackageRepository = this.AddPackageRepository.bind(this); - this.GetPackageRepositoryDetail = - this.GetPackageRepositoryDetail.bind(this); - this.GetPackageRepositorySummaries = - this.GetPackageRepositorySummaries.bind(this); + this.GetPackageRepositoryDetail = this.GetPackageRepositoryDetail.bind(this); + this.GetPackageRepositorySummaries = this.GetPackageRepositorySummaries.bind(this); this.UpdatePackageRepository = this.UpdatePackageRepository.bind(this); this.SetUserManagedSecrets = this.SetUserManagedSecrets.bind(this); } AddPackageRepository( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2RepositoriesServiceAddPackageRepositoryDesc, AddPackageRepositoryRequest.fromPartial(request), - metadata + metadata, ); } GetPackageRepositoryDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2RepositoriesServiceGetPackageRepositoryDetailDesc, GetPackageRepositoryDetailRequest.fromPartial(request), - metadata + metadata, ); } GetPackageRepositorySummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2RepositoriesServiceGetPackageRepositorySummariesDesc, GetPackageRepositorySummariesRequest.fromPartial(request), - metadata + metadata, ); } UpdatePackageRepository( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2RepositoriesServiceUpdatePackageRepositoryDesc, UpdatePackageRepositoryRequest.fromPartial(request), - metadata + metadata, ); } SetUserManagedSecrets( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( FluxV2RepositoriesServiceSetUserManagedSecretsDesc, SetUserManagedSecretsRequest.fromPartial(request), - metadata + metadata, ); } } export const FluxV2RepositoriesServiceDesc = { - serviceName: - "kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService", + serviceName: "kubeappsapis.plugins.fluxv2.packages.v1alpha1.FluxV2RepositoriesService", }; -export const FluxV2RepositoriesServiceAddPackageRepositoryDesc: UnaryMethodDefinitionish = - { - methodName: "AddPackageRepository", - service: FluxV2RepositoriesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return AddPackageRepositoryRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...AddPackageRepositoryResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const FluxV2RepositoriesServiceAddPackageRepositoryDesc: UnaryMethodDefinitionish = { + methodName: "AddPackageRepository", + service: FluxV2RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return AddPackageRepositoryRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...AddPackageRepositoryResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const FluxV2RepositoriesServiceGetPackageRepositoryDetailDesc: UnaryMethodDefinitionish = - { - methodName: "GetPackageRepositoryDetail", - service: FluxV2RepositoriesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetPackageRepositoryDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetPackageRepositoryDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const FluxV2RepositoriesServiceGetPackageRepositoryDetailDesc: UnaryMethodDefinitionish = { + methodName: "GetPackageRepositoryDetail", + service: FluxV2RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetPackageRepositoryDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetPackageRepositoryDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; export const FluxV2RepositoriesServiceGetPackageRepositorySummariesDesc: UnaryMethodDefinitionish = { @@ -739,54 +708,51 @@ export const FluxV2RepositoriesServiceGetPackageRepositorySummariesDesc: UnaryMe } as any, }; -export const FluxV2RepositoriesServiceUpdatePackageRepositoryDesc: UnaryMethodDefinitionish = - { - methodName: "UpdatePackageRepository", - service: FluxV2RepositoriesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return UpdatePackageRepositoryRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...UpdatePackageRepositoryResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const FluxV2RepositoriesServiceUpdatePackageRepositoryDesc: UnaryMethodDefinitionish = { + methodName: "UpdatePackageRepository", + service: FluxV2RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return UpdatePackageRepositoryRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...UpdatePackageRepositoryResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const FluxV2RepositoriesServiceSetUserManagedSecretsDesc: UnaryMethodDefinitionish = - { - methodName: "SetUserManagedSecrets", - service: FluxV2RepositoriesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return SetUserManagedSecretsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...SetUserManagedSecretsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const FluxV2RepositoriesServiceSetUserManagedSecretsDesc: UnaryMethodDefinitionish = { + methodName: "SetUserManagedSecrets", + service: FluxV2RepositoriesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return SetUserManagedSecretsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...SetUserManagedSecretsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -interface UnaryMethodDefinitionishR - extends grpc.UnaryMethodDefinition { +interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -797,7 +763,7 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise; } @@ -817,7 +783,7 @@ export class GrpcWebImpl { debug?: boolean; metadata?: grpc.Metadata; - } + }, ) { this.host = host; this.options = options; @@ -826,7 +792,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -858,14 +824,7 @@ export class GrpcWebImpl { } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array diff --git a/dashboard/src/gen/kubeappsapis/plugins/helm/packages/v1alpha1/helm.ts b/dashboard/src/gen/kubeappsapis/plugins/helm/packages/v1alpha1/helm.ts index ee34f397a54..10bd74dcede 100644 --- a/dashboard/src/gen/kubeappsapis/plugins/helm/packages/v1alpha1/helm.ts +++ b/dashboard/src/gen/kubeappsapis/plugins/helm/packages/v1alpha1/helm.ts @@ -77,7 +77,7 @@ const baseInstalledPackageDetailCustomDataHelm: object = { releaseRevision: 0 }; export const InstalledPackageDetailCustomDataHelm = { encode( message: InstalledPackageDetailCustomDataHelm, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.releaseRevision !== 0) { writer.uint32(16).int32(message.releaseRevision); @@ -85,10 +85,7 @@ export const InstalledPackageDetailCustomDataHelm = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): InstalledPackageDetailCustomDataHelm { + decode(input: _m0.Reader | Uint8Array, length?: number): InstalledPackageDetailCustomDataHelm { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -112,10 +109,7 @@ export const InstalledPackageDetailCustomDataHelm = { const message = { ...baseInstalledPackageDetailCustomDataHelm, } as InstalledPackageDetailCustomDataHelm; - if ( - object.releaseRevision !== undefined && - object.releaseRevision !== null - ) { + if (object.releaseRevision !== undefined && object.releaseRevision !== null) { message.releaseRevision = Number(object.releaseRevision); } else { message.releaseRevision = 0; @@ -125,21 +119,17 @@ export const InstalledPackageDetailCustomDataHelm = { toJSON(message: InstalledPackageDetailCustomDataHelm): unknown { const obj: any = {}; - message.releaseRevision !== undefined && - (obj.releaseRevision = message.releaseRevision); + message.releaseRevision !== undefined && (obj.releaseRevision = message.releaseRevision); return obj; }, fromPartial( - object: DeepPartial + object: DeepPartial, ): InstalledPackageDetailCustomDataHelm { const message = { ...baseInstalledPackageDetailCustomDataHelm, } as InstalledPackageDetailCustomDataHelm; - if ( - object.releaseRevision !== undefined && - object.releaseRevision !== null - ) { + if (object.releaseRevision !== undefined && object.releaseRevision !== null) { message.releaseRevision = object.releaseRevision; } else { message.releaseRevision = 0; @@ -153,12 +143,12 @@ const baseRollbackInstalledPackageRequest: object = { releaseRevision: 0 }; export const RollbackInstalledPackageRequest = { encode( message: RollbackInstalledPackageRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } if (message.releaseRevision !== 0) { @@ -167,10 +157,7 @@ export const RollbackInstalledPackageRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): RollbackInstalledPackageRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): RollbackInstalledPackageRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -180,10 +167,7 @@ export const RollbackInstalledPackageRequest = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode( - reader, - reader.uint32() - ); + message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); break; case 2: message.releaseRevision = reader.int32(); @@ -200,20 +184,12 @@ export const RollbackInstalledPackageRequest = { const message = { ...baseRollbackInstalledPackageRequest, } as RollbackInstalledPackageRequest; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { - message.installedPackageRef = InstalledPackageReference.fromJSON( - object.installedPackageRef - ); + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { + message.installedPackageRef = InstalledPackageReference.fromJSON(object.installedPackageRef); } else { message.installedPackageRef = undefined; } - if ( - object.releaseRevision !== undefined && - object.releaseRevision !== null - ) { + if (object.releaseRevision !== undefined && object.releaseRevision !== null) { message.releaseRevision = Number(object.releaseRevision); } else { message.releaseRevision = 0; @@ -227,31 +203,24 @@ export const RollbackInstalledPackageRequest = { (obj.installedPackageRef = message.installedPackageRef ? InstalledPackageReference.toJSON(message.installedPackageRef) : undefined); - message.releaseRevision !== undefined && - (obj.releaseRevision = message.releaseRevision); + message.releaseRevision !== undefined && (obj.releaseRevision = message.releaseRevision); return obj; }, fromPartial( - object: DeepPartial + object: DeepPartial, ): RollbackInstalledPackageRequest { const message = { ...baseRollbackInstalledPackageRequest, } as RollbackInstalledPackageRequest; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { message.installedPackageRef = InstalledPackageReference.fromPartial( - object.installedPackageRef + object.installedPackageRef, ); } else { message.installedPackageRef = undefined; } - if ( - object.releaseRevision !== undefined && - object.releaseRevision !== null - ) { + if (object.releaseRevision !== undefined && object.releaseRevision !== null) { message.releaseRevision = object.releaseRevision; } else { message.releaseRevision = 0; @@ -265,21 +234,18 @@ const baseRollbackInstalledPackageResponse: object = {}; export const RollbackInstalledPackageResponse = { encode( message: RollbackInstalledPackageResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): RollbackInstalledPackageResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): RollbackInstalledPackageResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -289,10 +255,7 @@ export const RollbackInstalledPackageResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode( - reader, - reader.uint32() - ); + message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -306,13 +269,8 @@ export const RollbackInstalledPackageResponse = { const message = { ...baseRollbackInstalledPackageResponse, } as RollbackInstalledPackageResponse; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { - message.installedPackageRef = InstalledPackageReference.fromJSON( - object.installedPackageRef - ); + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { + message.installedPackageRef = InstalledPackageReference.fromJSON(object.installedPackageRef); } else { message.installedPackageRef = undefined; } @@ -329,17 +287,14 @@ export const RollbackInstalledPackageResponse = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): RollbackInstalledPackageResponse { const message = { ...baseRollbackInstalledPackageResponse, } as RollbackInstalledPackageResponse; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { message.installedPackageRef = InstalledPackageReference.fromPartial( - object.installedPackageRef + object.installedPackageRef, ); } else { message.installedPackageRef = undefined; @@ -352,47 +307,47 @@ export interface HelmPackagesService { /** GetAvailablePackageSummaries returns the available packages managed by the 'helm' plugin */ GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** GetAvailablePackageDetail returns the package details managed by the 'helm' plugin */ GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** GetAvailablePackageVersions returns the package versions managed by the 'helm' plugin */ GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** GetInstalledPackageSummaries returns the installed packages managed by the 'helm' plugin */ GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** GetInstalledPackageDetail returns the requested installed package managed by the 'helm' plugin */ GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** CreateInstalledPackage creates an installed package based on the request. */ CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** UpdateInstalledPackage updates an installed package based on the request. */ UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** DeleteInstalledPackage deletes an installed package based on the request. */ DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** RollbackInstalledPackage updates an installed package based on the request. */ RollbackInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** * GetInstalledPackageResourceRefs returns the references for the Kubernetes resources created by @@ -400,7 +355,7 @@ export interface HelmPackagesService { */ GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; } @@ -409,370 +364,354 @@ export class HelmPackagesServiceClientImpl implements HelmPackagesService { constructor(rpc: Rpc) { this.rpc = rpc; - this.GetAvailablePackageSummaries = - this.GetAvailablePackageSummaries.bind(this); + this.GetAvailablePackageSummaries = this.GetAvailablePackageSummaries.bind(this); this.GetAvailablePackageDetail = this.GetAvailablePackageDetail.bind(this); - this.GetAvailablePackageVersions = - this.GetAvailablePackageVersions.bind(this); - this.GetInstalledPackageSummaries = - this.GetInstalledPackageSummaries.bind(this); + this.GetAvailablePackageVersions = this.GetAvailablePackageVersions.bind(this); + this.GetInstalledPackageSummaries = this.GetInstalledPackageSummaries.bind(this); this.GetInstalledPackageDetail = this.GetInstalledPackageDetail.bind(this); this.CreateInstalledPackage = this.CreateInstalledPackage.bind(this); this.UpdateInstalledPackage = this.UpdateInstalledPackage.bind(this); this.DeleteInstalledPackage = this.DeleteInstalledPackage.bind(this); this.RollbackInstalledPackage = this.RollbackInstalledPackage.bind(this); - this.GetInstalledPackageResourceRefs = - this.GetInstalledPackageResourceRefs.bind(this); + this.GetInstalledPackageResourceRefs = this.GetInstalledPackageResourceRefs.bind(this); } GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( HelmPackagesServiceGetAvailablePackageSummariesDesc, GetAvailablePackageSummariesRequest.fromPartial(request), - metadata + metadata, ); } GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( HelmPackagesServiceGetAvailablePackageDetailDesc, GetAvailablePackageDetailRequest.fromPartial(request), - metadata + metadata, ); } GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( HelmPackagesServiceGetAvailablePackageVersionsDesc, GetAvailablePackageVersionsRequest.fromPartial(request), - metadata + metadata, ); } GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( HelmPackagesServiceGetInstalledPackageSummariesDesc, GetInstalledPackageSummariesRequest.fromPartial(request), - metadata + metadata, ); } GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( HelmPackagesServiceGetInstalledPackageDetailDesc, GetInstalledPackageDetailRequest.fromPartial(request), - metadata + metadata, ); } CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( HelmPackagesServiceCreateInstalledPackageDesc, CreateInstalledPackageRequest.fromPartial(request), - metadata + metadata, ); } UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( HelmPackagesServiceUpdateInstalledPackageDesc, UpdateInstalledPackageRequest.fromPartial(request), - metadata + metadata, ); } DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( HelmPackagesServiceDeleteInstalledPackageDesc, DeleteInstalledPackageRequest.fromPartial(request), - metadata + metadata, ); } RollbackInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( HelmPackagesServiceRollbackInstalledPackageDesc, RollbackInstalledPackageRequest.fromPartial(request), - metadata + metadata, ); } GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( HelmPackagesServiceGetInstalledPackageResourceRefsDesc, GetInstalledPackageResourceRefsRequest.fromPartial(request), - metadata + metadata, ); } } export const HelmPackagesServiceDesc = { - serviceName: - "kubeappsapis.plugins.helm.packages.v1alpha1.HelmPackagesService", + serviceName: "kubeappsapis.plugins.helm.packages.v1alpha1.HelmPackagesService", }; -export const HelmPackagesServiceGetAvailablePackageSummariesDesc: UnaryMethodDefinitionish = - { - methodName: "GetAvailablePackageSummaries", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageSummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageSummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const HelmPackagesServiceGetAvailablePackageSummariesDesc: UnaryMethodDefinitionish = { + methodName: "GetAvailablePackageSummaries", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageSummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageSummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const HelmPackagesServiceGetAvailablePackageDetailDesc: UnaryMethodDefinitionish = - { - methodName: "GetAvailablePackageDetail", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const HelmPackagesServiceGetAvailablePackageDetailDesc: UnaryMethodDefinitionish = { + methodName: "GetAvailablePackageDetail", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const HelmPackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = - { - methodName: "GetAvailablePackageVersions", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetAvailablePackageVersionsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetAvailablePackageVersionsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const HelmPackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = { + methodName: "GetAvailablePackageVersions", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetAvailablePackageVersionsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetAvailablePackageVersionsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const HelmPackagesServiceGetInstalledPackageSummariesDesc: UnaryMethodDefinitionish = - { - methodName: "GetInstalledPackageSummaries", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageSummariesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageSummariesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const HelmPackagesServiceGetInstalledPackageSummariesDesc: UnaryMethodDefinitionish = { + methodName: "GetInstalledPackageSummaries", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageSummariesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageSummariesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const HelmPackagesServiceGetInstalledPackageDetailDesc: UnaryMethodDefinitionish = - { - methodName: "GetInstalledPackageDetail", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageDetailRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageDetailResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const HelmPackagesServiceGetInstalledPackageDetailDesc: UnaryMethodDefinitionish = { + methodName: "GetInstalledPackageDetail", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageDetailRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageDetailResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const HelmPackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = - { - methodName: "CreateInstalledPackage", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return CreateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...CreateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const HelmPackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = { + methodName: "CreateInstalledPackage", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return CreateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...CreateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const HelmPackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = - { - methodName: "UpdateInstalledPackage", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return UpdateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...UpdateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const HelmPackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = { + methodName: "UpdateInstalledPackage", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return UpdateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...UpdateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const HelmPackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = - { - methodName: "DeleteInstalledPackage", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return DeleteInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...DeleteInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const HelmPackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = { + methodName: "DeleteInstalledPackage", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return DeleteInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...DeleteInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const HelmPackagesServiceRollbackInstalledPackageDesc: UnaryMethodDefinitionish = - { - methodName: "RollbackInstalledPackage", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return RollbackInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...RollbackInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const HelmPackagesServiceRollbackInstalledPackageDesc: UnaryMethodDefinitionish = { + methodName: "RollbackInstalledPackage", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return RollbackInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...RollbackInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const HelmPackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = - { - methodName: "GetInstalledPackageResourceRefs", - service: HelmPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetInstalledPackageResourceRefsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetInstalledPackageResourceRefsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const HelmPackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = { + methodName: "GetInstalledPackageResourceRefs", + service: HelmPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetInstalledPackageResourceRefsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetInstalledPackageResourceRefsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -interface UnaryMethodDefinitionishR - extends grpc.UnaryMethodDefinition { +interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -783,7 +722,7 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise; } @@ -803,7 +742,7 @@ export class GrpcWebImpl { debug?: boolean; metadata?: grpc.Metadata; - } + }, ) { this.host = host; this.options = options; @@ -812,7 +751,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -844,14 +783,7 @@ export class GrpcWebImpl { } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array diff --git a/dashboard/src/gen/kubeappsapis/plugins/kapp_controller/packages/v1alpha1/kapp_controller.ts b/dashboard/src/gen/kubeappsapis/plugins/kapp_controller/packages/v1alpha1/kapp_controller.ts index 54012fe02e0..52e45f335a1 100644 --- a/dashboard/src/gen/kubeappsapis/plugins/kapp_controller/packages/v1alpha1/kapp_controller.ts +++ b/dashboard/src/gen/kubeappsapis/plugins/kapp_controller/packages/v1alpha1/kapp_controller.ts @@ -26,8 +26,7 @@ import { import { Plugin } from "../../../../../kubeappsapis/core/plugins/v1alpha1/plugins"; import { BrowserHeaders } from "browser-headers"; -export const protobufPackage = - "kubeappsapis.plugins.kapp_controller.packages.v1alpha1"; +export const protobufPackage = "kubeappsapis.plugins.kapp_controller.packages.v1alpha1"; /** * GetPackageRepositories @@ -90,7 +89,7 @@ const baseGetPackageRepositoriesRequest: object = {}; export const GetPackageRepositoriesRequest = { encode( message: GetPackageRepositoriesRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); @@ -98,10 +97,7 @@ export const GetPackageRepositoriesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetPackageRepositoriesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): GetPackageRepositoriesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -136,15 +132,11 @@ export const GetPackageRepositoriesRequest = { toJSON(message: GetPackageRepositoriesRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): GetPackageRepositoriesRequest { + fromPartial(object: DeepPartial): GetPackageRepositoriesRequest { const message = { ...baseGetPackageRepositoriesRequest, } as GetPackageRepositoriesRequest; @@ -162,7 +154,7 @@ const baseGetPackageRepositoriesResponse: object = {}; export const GetPackageRepositoriesResponse = { encode( message: GetPackageRepositoriesResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { for (const v of message.repositories) { PackageRepository.encode(v!, writer.uint32(10).fork()).ldelim(); @@ -170,10 +162,7 @@ export const GetPackageRepositoriesResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetPackageRepositoriesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetPackageRepositoriesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -184,9 +173,7 @@ export const GetPackageRepositoriesResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.repositories.push( - PackageRepository.decode(reader, reader.uint32()) - ); + message.repositories.push(PackageRepository.decode(reader, reader.uint32())); break; default: reader.skipType(tag & 7); @@ -212,8 +199,8 @@ export const GetPackageRepositoriesResponse = { toJSON(message: GetPackageRepositoriesResponse): unknown { const obj: any = {}; if (message.repositories) { - obj.repositories = message.repositories.map((e) => - e ? PackageRepository.toJSON(e) : undefined + obj.repositories = message.repositories.map(e => + e ? PackageRepository.toJSON(e) : undefined, ); } else { obj.repositories = []; @@ -221,9 +208,7 @@ export const GetPackageRepositoriesResponse = { return obj; }, - fromPartial( - object: DeepPartial - ): GetPackageRepositoriesResponse { + fromPartial(object: DeepPartial): GetPackageRepositoriesResponse { const message = { ...baseGetPackageRepositoriesResponse, } as GetPackageRepositoriesResponse; @@ -240,10 +225,7 @@ export const GetPackageRepositoriesResponse = { const basePackageRepository: object = { name: "", namespace: "", url: "" }; export const PackageRepository = { - encode( - message: PackageRepository, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: PackageRepository, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -351,47 +333,47 @@ export interface KappControllerPackagesService { /** GetAvailablePackageSummaries returns the available packages managed by the 'kapp_controller' plugin */ GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** GetAvailablePackageDetail returns the package details managed by the 'kapp_controller' plugin */ GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** GetPackageRepositories returns the repositories managed by the 'kapp_controller' plugin */ GetPackageRepositories( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** GetAvailablePackageVersions returns the package versions managed by the 'kapp_controller' plugin */ GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** GetInstalledPackageSummaries returns the installed packages managed by the 'kapp_controller' plugin */ GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** GetInstalledPackageDetail returns the requested installed package managed by the 'kapp_controller' plugin */ GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** CreateInstalledPackage creates an installed package based on the request. */ CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** UpdateInstalledPackage updates an installed package based on the request. */ UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** DeleteInstalledPackage deletes an installed package based on the request. */ DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; /** * GetInstalledPackageResourceRefs returns the references for the Kubernetes resources created by @@ -399,140 +381,134 @@ export interface KappControllerPackagesService { */ GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; } -export class KappControllerPackagesServiceClientImpl - implements KappControllerPackagesService -{ +export class KappControllerPackagesServiceClientImpl implements KappControllerPackagesService { private readonly rpc: Rpc; constructor(rpc: Rpc) { this.rpc = rpc; - this.GetAvailablePackageSummaries = - this.GetAvailablePackageSummaries.bind(this); + this.GetAvailablePackageSummaries = this.GetAvailablePackageSummaries.bind(this); this.GetAvailablePackageDetail = this.GetAvailablePackageDetail.bind(this); this.GetPackageRepositories = this.GetPackageRepositories.bind(this); - this.GetAvailablePackageVersions = - this.GetAvailablePackageVersions.bind(this); - this.GetInstalledPackageSummaries = - this.GetInstalledPackageSummaries.bind(this); + this.GetAvailablePackageVersions = this.GetAvailablePackageVersions.bind(this); + this.GetInstalledPackageSummaries = this.GetInstalledPackageSummaries.bind(this); this.GetInstalledPackageDetail = this.GetInstalledPackageDetail.bind(this); this.CreateInstalledPackage = this.CreateInstalledPackage.bind(this); this.UpdateInstalledPackage = this.UpdateInstalledPackage.bind(this); this.DeleteInstalledPackage = this.DeleteInstalledPackage.bind(this); - this.GetInstalledPackageResourceRefs = - this.GetInstalledPackageResourceRefs.bind(this); + this.GetInstalledPackageResourceRefs = this.GetInstalledPackageResourceRefs.bind(this); } GetAvailablePackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetAvailablePackageSummariesDesc, GetAvailablePackageSummariesRequest.fromPartial(request), - metadata + metadata, ); } GetAvailablePackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetAvailablePackageDetailDesc, GetAvailablePackageDetailRequest.fromPartial(request), - metadata + metadata, ); } GetPackageRepositories( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetPackageRepositoriesDesc, GetPackageRepositoriesRequest.fromPartial(request), - metadata + metadata, ); } GetAvailablePackageVersions( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetAvailablePackageVersionsDesc, GetAvailablePackageVersionsRequest.fromPartial(request), - metadata + metadata, ); } GetInstalledPackageSummaries( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetInstalledPackageSummariesDesc, GetInstalledPackageSummariesRequest.fromPartial(request), - metadata + metadata, ); } GetInstalledPackageDetail( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetInstalledPackageDetailDesc, GetInstalledPackageDetailRequest.fromPartial(request), - metadata + metadata, ); } CreateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( KappControllerPackagesServiceCreateInstalledPackageDesc, CreateInstalledPackageRequest.fromPartial(request), - metadata + metadata, ); } UpdateInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( KappControllerPackagesServiceUpdateInstalledPackageDesc, UpdateInstalledPackageRequest.fromPartial(request), - metadata + metadata, ); } DeleteInstalledPackage( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( KappControllerPackagesServiceDeleteInstalledPackageDesc, DeleteInstalledPackageRequest.fromPartial(request), - metadata + metadata, ); } GetInstalledPackageResourceRefs( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( KappControllerPackagesServiceGetInstalledPackageResourceRefsDesc, GetInstalledPackageResourceRefsRequest.fromPartial(request), - metadata + metadata, ); } } @@ -588,28 +564,27 @@ export const KappControllerPackagesServiceGetAvailablePackageDetailDesc: UnaryMe } as any, }; -export const KappControllerPackagesServiceGetPackageRepositoriesDesc: UnaryMethodDefinitionish = - { - methodName: "GetPackageRepositories", - service: KappControllerPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetPackageRepositoriesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetPackageRepositoriesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const KappControllerPackagesServiceGetPackageRepositoriesDesc: UnaryMethodDefinitionish = { + methodName: "GetPackageRepositories", + service: KappControllerPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetPackageRepositoriesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetPackageRepositoriesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; export const KappControllerPackagesServiceGetAvailablePackageVersionsDesc: UnaryMethodDefinitionish = { @@ -680,74 +655,71 @@ export const KappControllerPackagesServiceGetInstalledPackageDetailDesc: UnaryMe } as any, }; -export const KappControllerPackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = - { - methodName: "CreateInstalledPackage", - service: KappControllerPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return CreateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...CreateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const KappControllerPackagesServiceCreateInstalledPackageDesc: UnaryMethodDefinitionish = { + methodName: "CreateInstalledPackage", + service: KappControllerPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return CreateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...CreateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const KappControllerPackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = - { - methodName: "UpdateInstalledPackage", - service: KappControllerPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return UpdateInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...UpdateInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const KappControllerPackagesServiceUpdateInstalledPackageDesc: UnaryMethodDefinitionish = { + methodName: "UpdateInstalledPackage", + service: KappControllerPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return UpdateInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...UpdateInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; -export const KappControllerPackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = - { - methodName: "DeleteInstalledPackage", - service: KappControllerPackagesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return DeleteInstalledPackageRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...DeleteInstalledPackageResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const KappControllerPackagesServiceDeleteInstalledPackageDesc: UnaryMethodDefinitionish = { + methodName: "DeleteInstalledPackage", + service: KappControllerPackagesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return DeleteInstalledPackageRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...DeleteInstalledPackageResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; export const KappControllerPackagesServiceGetInstalledPackageResourceRefsDesc: UnaryMethodDefinitionish = { @@ -772,8 +744,7 @@ export const KappControllerPackagesServiceGetInstalledPackageResourceRefsDesc: U } as any, }; -interface UnaryMethodDefinitionishR - extends grpc.UnaryMethodDefinition { +interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -784,7 +755,7 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise; } @@ -804,7 +775,7 @@ export class GrpcWebImpl { debug?: boolean; metadata?: grpc.Metadata; - } + }, ) { this.host = host; this.options = options; @@ -813,7 +784,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -845,14 +816,7 @@ export class GrpcWebImpl { } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array diff --git a/dashboard/src/gen/kubeappsapis/plugins/resources/v1alpha1/resources.ts b/dashboard/src/gen/kubeappsapis/plugins/resources/v1alpha1/resources.ts index a02f15711a1..e362229288a 100644 --- a/dashboard/src/gen/kubeappsapis/plugins/resources/v1alpha1/resources.ts +++ b/dashboard/src/gen/kubeappsapis/plugins/resources/v1alpha1/resources.ts @@ -323,14 +323,11 @@ export interface GetSecretNamesResponse_SecretNamesEntry { const baseGetResourcesRequest: object = { watch: false }; export const GetResourcesRequest = { - encode( - message: GetResourcesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GetResourcesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.installedPackageRef !== undefined) { InstalledPackageReference.encode( message.installedPackageRef, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); } for (const v of message.resourceRefs) { @@ -351,15 +348,10 @@ export const GetResourcesRequest = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.installedPackageRef = InstalledPackageReference.decode( - reader, - reader.uint32() - ); + message.installedPackageRef = InstalledPackageReference.decode(reader, reader.uint32()); break; case 2: - message.resourceRefs.push( - ResourceRef.decode(reader, reader.uint32()) - ); + message.resourceRefs.push(ResourceRef.decode(reader, reader.uint32())); break; case 3: message.watch = reader.bool(); @@ -375,13 +367,8 @@ export const GetResourcesRequest = { fromJSON(object: any): GetResourcesRequest { const message = { ...baseGetResourcesRequest } as GetResourcesRequest; message.resourceRefs = []; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { - message.installedPackageRef = InstalledPackageReference.fromJSON( - object.installedPackageRef - ); + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { + message.installedPackageRef = InstalledPackageReference.fromJSON(object.installedPackageRef); } else { message.installedPackageRef = undefined; } @@ -405,9 +392,7 @@ export const GetResourcesRequest = { ? InstalledPackageReference.toJSON(message.installedPackageRef) : undefined); if (message.resourceRefs) { - obj.resourceRefs = message.resourceRefs.map((e) => - e ? ResourceRef.toJSON(e) : undefined - ); + obj.resourceRefs = message.resourceRefs.map(e => (e ? ResourceRef.toJSON(e) : undefined)); } else { obj.resourceRefs = []; } @@ -418,12 +403,9 @@ export const GetResourcesRequest = { fromPartial(object: DeepPartial): GetResourcesRequest { const message = { ...baseGetResourcesRequest } as GetResourcesRequest; message.resourceRefs = []; - if ( - object.installedPackageRef !== undefined && - object.installedPackageRef !== null - ) { + if (object.installedPackageRef !== undefined && object.installedPackageRef !== null) { message.installedPackageRef = InstalledPackageReference.fromPartial( - object.installedPackageRef + object.installedPackageRef, ); } else { message.installedPackageRef = undefined; @@ -445,15 +427,9 @@ export const GetResourcesRequest = { const baseGetResourcesResponse: object = { manifest: "" }; export const GetResourcesResponse = { - encode( - message: GetResourcesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GetResourcesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.resourceRef !== undefined) { - ResourceRef.encode( - message.resourceRef, - writer.uint32(10).fork() - ).ldelim(); + ResourceRef.encode(message.resourceRef, writer.uint32(10).fork()).ldelim(); } if (message.manifest !== "") { writer.uint32(18).string(message.manifest); @@ -461,10 +437,7 @@ export const GetResourcesResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetResourcesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetResourcesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseGetResourcesResponse } as GetResourcesResponse; @@ -503,9 +476,7 @@ export const GetResourcesResponse = { toJSON(message: GetResourcesResponse): unknown { const obj: any = {}; message.resourceRef !== undefined && - (obj.resourceRef = message.resourceRef - ? ResourceRef.toJSON(message.resourceRef) - : undefined); + (obj.resourceRef = message.resourceRef ? ResourceRef.toJSON(message.resourceRef) : undefined); message.manifest !== undefined && (obj.manifest = message.manifest); return obj; }, @@ -531,7 +502,7 @@ const baseGetServiceAccountNamesRequest: object = {}; export const GetServiceAccountNamesRequest = { encode( message: GetServiceAccountNamesRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); @@ -539,10 +510,7 @@ export const GetServiceAccountNamesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetServiceAccountNamesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): GetServiceAccountNamesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -577,15 +545,11 @@ export const GetServiceAccountNamesRequest = { toJSON(message: GetServiceAccountNamesRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): GetServiceAccountNamesRequest { + fromPartial(object: DeepPartial): GetServiceAccountNamesRequest { const message = { ...baseGetServiceAccountNamesRequest, } as GetServiceAccountNamesRequest; @@ -603,7 +567,7 @@ const baseGetServiceAccountNamesResponse: object = { serviceaccountNames: "" }; export const GetServiceAccountNamesResponse = { encode( message: GetServiceAccountNamesResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { for (const v of message.serviceaccountNames) { writer.uint32(10).string(v!); @@ -611,10 +575,7 @@ export const GetServiceAccountNamesResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetServiceAccountNamesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetServiceAccountNamesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -640,10 +601,7 @@ export const GetServiceAccountNamesResponse = { ...baseGetServiceAccountNamesResponse, } as GetServiceAccountNamesResponse; message.serviceaccountNames = []; - if ( - object.serviceaccountNames !== undefined && - object.serviceaccountNames !== null - ) { + if (object.serviceaccountNames !== undefined && object.serviceaccountNames !== null) { for (const e of object.serviceaccountNames) { message.serviceaccountNames.push(String(e)); } @@ -654,24 +612,19 @@ export const GetServiceAccountNamesResponse = { toJSON(message: GetServiceAccountNamesResponse): unknown { const obj: any = {}; if (message.serviceaccountNames) { - obj.serviceaccountNames = message.serviceaccountNames.map((e) => e); + obj.serviceaccountNames = message.serviceaccountNames.map(e => e); } else { obj.serviceaccountNames = []; } return obj; }, - fromPartial( - object: DeepPartial - ): GetServiceAccountNamesResponse { + fromPartial(object: DeepPartial): GetServiceAccountNamesResponse { const message = { ...baseGetServiceAccountNamesResponse, } as GetServiceAccountNamesResponse; message.serviceaccountNames = []; - if ( - object.serviceaccountNames !== undefined && - object.serviceaccountNames !== null - ) { + if (object.serviceaccountNames !== undefined && object.serviceaccountNames !== null) { for (const e of object.serviceaccountNames) { message.serviceaccountNames.push(e); } @@ -683,20 +636,14 @@ export const GetServiceAccountNamesResponse = { const baseGetNamespaceNamesRequest: object = { cluster: "" }; export const GetNamespaceNamesRequest = { - encode( - message: GetNamespaceNamesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GetNamespaceNamesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.cluster !== "") { writer.uint32(10).string(message.cluster); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetNamespaceNamesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): GetNamespaceNamesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -734,9 +681,7 @@ export const GetNamespaceNamesRequest = { return obj; }, - fromPartial( - object: DeepPartial - ): GetNamespaceNamesRequest { + fromPartial(object: DeepPartial): GetNamespaceNamesRequest { const message = { ...baseGetNamespaceNamesRequest, } as GetNamespaceNamesRequest; @@ -752,20 +697,14 @@ export const GetNamespaceNamesRequest = { const baseGetNamespaceNamesResponse: object = { namespaceNames: "" }; export const GetNamespaceNamesResponse = { - encode( - message: GetNamespaceNamesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GetNamespaceNamesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.namespaceNames) { writer.uint32(10).string(v!); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetNamespaceNamesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetNamespaceNamesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -802,16 +741,14 @@ export const GetNamespaceNamesResponse = { toJSON(message: GetNamespaceNamesResponse): unknown { const obj: any = {}; if (message.namespaceNames) { - obj.namespaceNames = message.namespaceNames.map((e) => e); + obj.namespaceNames = message.namespaceNames.map(e => e); } else { obj.namespaceNames = []; } return obj; }, - fromPartial( - object: DeepPartial - ): GetNamespaceNamesResponse { + fromPartial(object: DeepPartial): GetNamespaceNamesResponse { const message = { ...baseGetNamespaceNamesResponse, } as GetNamespaceNamesResponse; @@ -828,20 +765,14 @@ export const GetNamespaceNamesResponse = { const baseCreateNamespaceRequest: object = {}; export const CreateNamespaceRequest = { - encode( - message: CreateNamespaceRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CreateNamespaceRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): CreateNamespaceRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): CreateNamespaceRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseCreateNamespaceRequest } as CreateNamespaceRequest; @@ -872,15 +803,11 @@ export const CreateNamespaceRequest = { toJSON(message: CreateNamespaceRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): CreateNamespaceRequest { + fromPartial(object: DeepPartial): CreateNamespaceRequest { const message = { ...baseCreateNamespaceRequest } as CreateNamespaceRequest; if (object.context !== undefined && object.context !== null) { message.context = Context.fromPartial(object.context); @@ -894,17 +821,11 @@ export const CreateNamespaceRequest = { const baseCreateNamespaceResponse: object = {}; export const CreateNamespaceResponse = { - encode( - _: CreateNamespaceResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: CreateNamespaceResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): CreateNamespaceResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): CreateNamespaceResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -933,9 +854,7 @@ export const CreateNamespaceResponse = { return obj; }, - fromPartial( - _: DeepPartial - ): CreateNamespaceResponse { + fromPartial(_: DeepPartial): CreateNamespaceResponse { const message = { ...baseCreateNamespaceResponse, } as CreateNamespaceResponse; @@ -948,7 +867,7 @@ const baseCheckNamespaceExistsRequest: object = {}; export const CheckNamespaceExistsRequest = { encode( message: CheckNamespaceExistsRequest, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); @@ -956,10 +875,7 @@ export const CheckNamespaceExistsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): CheckNamespaceExistsRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): CheckNamespaceExistsRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -994,15 +910,11 @@ export const CheckNamespaceExistsRequest = { toJSON(message: CheckNamespaceExistsRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): CheckNamespaceExistsRequest { + fromPartial(object: DeepPartial): CheckNamespaceExistsRequest { const message = { ...baseCheckNamespaceExistsRequest, } as CheckNamespaceExistsRequest; @@ -1020,7 +932,7 @@ const baseCheckNamespaceExistsResponse: object = { exists: false }; export const CheckNamespaceExistsResponse = { encode( message: CheckNamespaceExistsResponse, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.exists === true) { writer.uint32(8).bool(message.exists); @@ -1028,10 +940,7 @@ export const CheckNamespaceExistsResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): CheckNamespaceExistsResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): CheckNamespaceExistsResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1069,9 +978,7 @@ export const CheckNamespaceExistsResponse = { return obj; }, - fromPartial( - object: DeepPartial - ): CheckNamespaceExistsResponse { + fromPartial(object: DeepPartial): CheckNamespaceExistsResponse { const message = { ...baseCheckNamespaceExistsResponse, } as CheckNamespaceExistsResponse; @@ -1087,10 +994,7 @@ export const CheckNamespaceExistsResponse = { const baseCreateSecretRequest: object = { type: 0, name: "" }; export const CreateSecretRequest = { - encode( - message: CreateSecretRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: CreateSecretRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } @@ -1103,7 +1007,7 @@ export const CreateSecretRequest = { Object.entries(message.stringData).forEach(([key, value]) => { CreateSecretRequest_StringDataEntry.encode( { key: key as any, value }, - writer.uint32(34).fork() + writer.uint32(34).fork(), ).ldelim(); }); return writer; @@ -1127,10 +1031,7 @@ export const CreateSecretRequest = { message.name = reader.string(); break; case 4: - const entry4 = CreateSecretRequest_StringDataEntry.decode( - reader, - reader.uint32() - ); + const entry4 = CreateSecretRequest_StringDataEntry.decode(reader, reader.uint32()); if (entry4.value !== undefined) { message.stringData[entry4.key] = entry4.value; } @@ -1172,9 +1073,7 @@ export const CreateSecretRequest = { toJSON(message: CreateSecretRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); message.type !== undefined && (obj.type = secretTypeToJSON(message.type)); message.name !== undefined && (obj.name = message.name); obj.stringData = {}; @@ -1220,7 +1119,7 @@ const baseCreateSecretRequest_StringDataEntry: object = { key: "", value: "" }; export const CreateSecretRequest_StringDataEntry = { encode( message: CreateSecretRequest_StringDataEntry, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); @@ -1231,10 +1130,7 @@ export const CreateSecretRequest_StringDataEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): CreateSecretRequest_StringDataEntry { + decode(input: _m0.Reader | Uint8Array, length?: number): CreateSecretRequest_StringDataEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1282,7 +1178,7 @@ export const CreateSecretRequest_StringDataEntry = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): CreateSecretRequest_StringDataEntry { const message = { ...baseCreateSecretRequest_StringDataEntry, @@ -1304,17 +1200,11 @@ export const CreateSecretRequest_StringDataEntry = { const baseCreateSecretResponse: object = {}; export const CreateSecretResponse = { - encode( - _: CreateSecretResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(_: CreateSecretResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): CreateSecretResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): CreateSecretResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseCreateSecretResponse } as CreateSecretResponse; @@ -1348,20 +1238,14 @@ export const CreateSecretResponse = { const baseGetSecretNamesRequest: object = {}; export const GetSecretNamesRequest = { - encode( - message: GetSecretNamesRequest, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GetSecretNamesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.context !== undefined) { Context.encode(message.context, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetSecretNamesRequest { + decode(input: _m0.Reader | Uint8Array, length?: number): GetSecretNamesRequest { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseGetSecretNamesRequest } as GetSecretNamesRequest; @@ -1392,15 +1276,11 @@ export const GetSecretNamesRequest = { toJSON(message: GetSecretNamesRequest): unknown { const obj: any = {}; message.context !== undefined && - (obj.context = message.context - ? Context.toJSON(message.context) - : undefined); + (obj.context = message.context ? Context.toJSON(message.context) : undefined); return obj; }, - fromPartial( - object: DeepPartial - ): GetSecretNamesRequest { + fromPartial(object: DeepPartial): GetSecretNamesRequest { const message = { ...baseGetSecretNamesRequest } as GetSecretNamesRequest; if (object.context !== undefined && object.context !== null) { message.context = Context.fromPartial(object.context); @@ -1414,23 +1294,17 @@ export const GetSecretNamesRequest = { const baseGetSecretNamesResponse: object = {}; export const GetSecretNamesResponse = { - encode( - message: GetSecretNamesResponse, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: GetSecretNamesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { Object.entries(message.secretNames).forEach(([key, value]) => { GetSecretNamesResponse_SecretNamesEntry.encode( { key: key as any, value }, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); }); return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetSecretNamesResponse { + decode(input: _m0.Reader | Uint8Array, length?: number): GetSecretNamesResponse { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseGetSecretNamesResponse } as GetSecretNamesResponse; @@ -1439,10 +1313,7 @@ export const GetSecretNamesResponse = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - const entry1 = GetSecretNamesResponse_SecretNamesEntry.decode( - reader, - reader.uint32() - ); + const entry1 = GetSecretNamesResponse_SecretNamesEntry.decode(reader, reader.uint32()); if (entry1.value !== undefined) { message.secretNames[entry1.key] = entry1.value; } @@ -1477,9 +1348,7 @@ export const GetSecretNamesResponse = { return obj; }, - fromPartial( - object: DeepPartial - ): GetSecretNamesResponse { + fromPartial(object: DeepPartial): GetSecretNamesResponse { const message = { ...baseGetSecretNamesResponse } as GetSecretNamesResponse; message.secretNames = {}; if (object.secretNames !== undefined && object.secretNames !== null) { @@ -1501,7 +1370,7 @@ const baseGetSecretNamesResponse_SecretNamesEntry: object = { export const GetSecretNamesResponse_SecretNamesEntry = { encode( message: GetSecretNamesResponse_SecretNamesEntry, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); @@ -1512,10 +1381,7 @@ export const GetSecretNamesResponse_SecretNamesEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): GetSecretNamesResponse_SecretNamesEntry { + decode(input: _m0.Reader | Uint8Array, length?: number): GetSecretNamesResponse_SecretNamesEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1558,13 +1424,12 @@ export const GetSecretNamesResponse_SecretNamesEntry = { toJSON(message: GetSecretNamesResponse_SecretNamesEntry): unknown { const obj: any = {}; message.key !== undefined && (obj.key = message.key); - message.value !== undefined && - (obj.value = secretTypeToJSON(message.value)); + message.value !== undefined && (obj.value = secretTypeToJSON(message.value)); return obj; }, fromPartial( - object: DeepPartial + object: DeepPartial, ): GetSecretNamesResponse_SecretNamesEntry { const message = { ...baseGetSecretNamesResponse_SecretNamesEntry, @@ -1592,31 +1457,31 @@ export const GetSecretNamesResponse_SecretNamesEntry = { export interface ResourcesService { GetResources( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Observable; GetServiceAccountNames( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; GetNamespaceNames( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; CreateNamespace( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; CheckNamespaceExists( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; GetSecretNames( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; CreateSecret( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise; } @@ -1636,78 +1501,78 @@ export class ResourcesServiceClientImpl implements ResourcesService { GetResources( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Observable { return this.rpc.invoke( ResourcesServiceGetResourcesDesc, GetResourcesRequest.fromPartial(request), - metadata + metadata, ); } GetServiceAccountNames( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( ResourcesServiceGetServiceAccountNamesDesc, GetServiceAccountNamesRequest.fromPartial(request), - metadata + metadata, ); } GetNamespaceNames( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( ResourcesServiceGetNamespaceNamesDesc, GetNamespaceNamesRequest.fromPartial(request), - metadata + metadata, ); } CreateNamespace( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( ResourcesServiceCreateNamespaceDesc, CreateNamespaceRequest.fromPartial(request), - metadata + metadata, ); } CheckNamespaceExists( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( ResourcesServiceCheckNamespaceExistsDesc, CheckNamespaceExistsRequest.fromPartial(request), - metadata + metadata, ); } GetSecretNames( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( ResourcesServiceGetSecretNamesDesc, GetSecretNamesRequest.fromPartial(request), - metadata + metadata, ); } CreateSecret( request: DeepPartial, - metadata?: grpc.Metadata + metadata?: grpc.Metadata, ): Promise { return this.rpc.unary( ResourcesServiceCreateSecretDesc, CreateSecretRequest.fromPartial(request), - metadata + metadata, ); } } @@ -1738,28 +1603,27 @@ export const ResourcesServiceGetResourcesDesc: UnaryMethodDefinitionish = { } as any, }; -export const ResourcesServiceGetServiceAccountNamesDesc: UnaryMethodDefinitionish = - { - methodName: "GetServiceAccountNames", - service: ResourcesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return GetServiceAccountNamesRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...GetServiceAccountNamesResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const ResourcesServiceGetServiceAccountNamesDesc: UnaryMethodDefinitionish = { + methodName: "GetServiceAccountNames", + service: ResourcesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return GetServiceAccountNamesRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...GetServiceAccountNamesResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; export const ResourcesServiceGetNamespaceNamesDesc: UnaryMethodDefinitionish = { methodName: "GetNamespaceNames", @@ -1805,28 +1669,27 @@ export const ResourcesServiceCreateNamespaceDesc: UnaryMethodDefinitionish = { } as any, }; -export const ResourcesServiceCheckNamespaceExistsDesc: UnaryMethodDefinitionish = - { - methodName: "CheckNamespaceExists", - service: ResourcesServiceDesc, - requestStream: false, - responseStream: false, - requestType: { - serializeBinary() { - return CheckNamespaceExistsRequest.encode(this).finish(); - }, - } as any, - responseType: { - deserializeBinary(data: Uint8Array) { - return { - ...CheckNamespaceExistsResponse.decode(data), - toObject() { - return this; - }, - }; - }, - } as any, - }; +export const ResourcesServiceCheckNamespaceExistsDesc: UnaryMethodDefinitionish = { + methodName: "CheckNamespaceExists", + service: ResourcesServiceDesc, + requestStream: false, + responseStream: false, + requestType: { + serializeBinary() { + return CheckNamespaceExistsRequest.encode(this).finish(); + }, + } as any, + responseType: { + deserializeBinary(data: Uint8Array) { + return { + ...CheckNamespaceExistsResponse.decode(data), + toObject() { + return this; + }, + }; + }, + } as any, +}; export const ResourcesServiceGetSecretNamesDesc: UnaryMethodDefinitionish = { methodName: "GetSecretNames", @@ -1872,8 +1735,7 @@ export const ResourcesServiceCreateSecretDesc: UnaryMethodDefinitionish = { } as any, }; -interface UnaryMethodDefinitionishR - extends grpc.UnaryMethodDefinition { +interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition { requestStream: any; responseStream: any; } @@ -1884,12 +1746,12 @@ interface Rpc { unary( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise; invoke( methodDesc: T, request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Observable; } @@ -1909,7 +1771,7 @@ export class GrpcWebImpl { streamingTransport?: grpc.TransportFactory; debug?: boolean; metadata?: grpc.Metadata; - } + }, ) { this.host = host; this.options = options; @@ -1918,7 +1780,7 @@ export class GrpcWebImpl { unary( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Promise { const request = { ..._request, ...methodDesc.requestType }; const maybeCombinedMetadata = @@ -1952,7 +1814,7 @@ export class GrpcWebImpl { invoke( methodDesc: T, _request: any, - metadata: grpc.Metadata | undefined + metadata: grpc.Metadata | undefined, ): Observable { // Status Response Codes (https://developers.google.com/maps-booking/reference/grpc-api/status_codes) const upStreamCodes = [2, 4, 8, 9, 10, 13, 14, 15]; @@ -1965,7 +1827,7 @@ export class GrpcWebImpl { ...metadata?.headersMap, }) : metadata || this.options.metadata; - return new Observable((observer) => { + return new Observable(observer => { const upStream = () => { const client = grpc.invoke(methodDesc, { host: this.host, @@ -1973,7 +1835,7 @@ export class GrpcWebImpl { transport: this.options.streamingTransport || this.options.transport, metadata: maybeCombinedMetadata, debug: this.options.debug, - onMessage: (next) => observer.next(next), + onMessage: next => observer.next(next), onEnd: (code: grpc.Code, message: string) => { if (code === 0) { observer.complete(); @@ -1991,14 +1853,7 @@ export class GrpcWebImpl { } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array diff --git a/dashboard/src/gen/protoc-gen-openapiv2/options/openapiv2.ts b/dashboard/src/gen/protoc-gen-openapiv2/options/openapiv2.ts index 160df0aa9b1..5201d15835e 100644 --- a/dashboard/src/gen/protoc-gen-openapiv2/options/openapiv2.ts +++ b/dashboard/src/gen/protoc-gen-openapiv2/options/openapiv2.ts @@ -604,7 +604,7 @@ export enum JSONSchema_JSONSchemaSimpleTypes { } export function jSONSchema_JSONSchemaSimpleTypesFromJSON( - object: any + object: any, ): JSONSchema_JSONSchemaSimpleTypes { switch (object) { case 0: @@ -639,7 +639,7 @@ export function jSONSchema_JSONSchemaSimpleTypesFromJSON( } export function jSONSchema_JSONSchemaSimpleTypesToJSON( - object: JSONSchema_JSONSchemaSimpleTypes + object: JSONSchema_JSONSchemaSimpleTypes, ): string { switch (object) { case JSONSchema_JSONSchemaSimpleTypes.UNKNOWN: @@ -986,10 +986,7 @@ const baseSwagger: object = { }; export const Swagger = { - encode( - message: Swagger, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Swagger, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.swagger !== "") { writer.uint32(10).string(message.swagger); } @@ -1014,30 +1011,21 @@ export const Swagger = { writer.uint32(58).string(v!); } Object.entries(message.responses).forEach(([key, value]) => { - Swagger_ResponsesEntry.encode( - { key: key as any, value }, - writer.uint32(82).fork() - ).ldelim(); + Swagger_ResponsesEntry.encode({ key: key as any, value }, writer.uint32(82).fork()).ldelim(); }); if (message.securityDefinitions !== undefined) { - SecurityDefinitions.encode( - message.securityDefinitions, - writer.uint32(90).fork() - ).ldelim(); + SecurityDefinitions.encode(message.securityDefinitions, writer.uint32(90).fork()).ldelim(); } for (const v of message.security) { SecurityRequirement.encode(v!, writer.uint32(98).fork()).ldelim(); } if (message.externalDocs !== undefined) { - ExternalDocumentation.encode( - message.externalDocs, - writer.uint32(114).fork() - ).ldelim(); + ExternalDocumentation.encode(message.externalDocs, writer.uint32(114).fork()).ldelim(); } Object.entries(message.extensions).forEach(([key, value]) => { Swagger_ExtensionsEntry.encode( { key: key as any, value }, - writer.uint32(122).fork() + writer.uint32(122).fork(), ).ldelim(); }); return writer; @@ -1085,36 +1073,22 @@ export const Swagger = { message.produces.push(reader.string()); break; case 10: - const entry10 = Swagger_ResponsesEntry.decode( - reader, - reader.uint32() - ); + const entry10 = Swagger_ResponsesEntry.decode(reader, reader.uint32()); if (entry10.value !== undefined) { message.responses[entry10.key] = entry10.value; } break; case 11: - message.securityDefinitions = SecurityDefinitions.decode( - reader, - reader.uint32() - ); + message.securityDefinitions = SecurityDefinitions.decode(reader, reader.uint32()); break; case 12: - message.security.push( - SecurityRequirement.decode(reader, reader.uint32()) - ); + message.security.push(SecurityRequirement.decode(reader, reader.uint32())); break; case 14: - message.externalDocs = ExternalDocumentation.decode( - reader, - reader.uint32() - ); + message.externalDocs = ExternalDocumentation.decode(reader, reader.uint32()); break; case 15: - const entry15 = Swagger_ExtensionsEntry.decode( - reader, - reader.uint32() - ); + const entry15 = Swagger_ExtensionsEntry.decode(reader, reader.uint32()); if (entry15.value !== undefined) { message.extensions[entry15.key] = entry15.value; } @@ -1175,13 +1149,8 @@ export const Swagger = { message.responses[key] = Response.fromJSON(value); }); } - if ( - object.securityDefinitions !== undefined && - object.securityDefinitions !== null - ) { - message.securityDefinitions = SecurityDefinitions.fromJSON( - object.securityDefinitions - ); + if (object.securityDefinitions !== undefined && object.securityDefinitions !== null) { + message.securityDefinitions = SecurityDefinitions.fromJSON(object.securityDefinitions); } else { message.securityDefinitions = undefined; } @@ -1191,9 +1160,7 @@ export const Swagger = { } } if (object.externalDocs !== undefined && object.externalDocs !== null) { - message.externalDocs = ExternalDocumentation.fromJSON( - object.externalDocs - ); + message.externalDocs = ExternalDocumentation.fromJSON(object.externalDocs); } else { message.externalDocs = undefined; } @@ -1208,22 +1175,21 @@ export const Swagger = { toJSON(message: Swagger): unknown { const obj: any = {}; message.swagger !== undefined && (obj.swagger = message.swagger); - message.info !== undefined && - (obj.info = message.info ? Info.toJSON(message.info) : undefined); + message.info !== undefined && (obj.info = message.info ? Info.toJSON(message.info) : undefined); message.host !== undefined && (obj.host = message.host); message.basePath !== undefined && (obj.basePath = message.basePath); if (message.schemes) { - obj.schemes = message.schemes.map((e) => schemeToJSON(e)); + obj.schemes = message.schemes.map(e => schemeToJSON(e)); } else { obj.schemes = []; } if (message.consumes) { - obj.consumes = message.consumes.map((e) => e); + obj.consumes = message.consumes.map(e => e); } else { obj.consumes = []; } if (message.produces) { - obj.produces = message.produces.map((e) => e); + obj.produces = message.produces.map(e => e); } else { obj.produces = []; } @@ -1238,9 +1204,7 @@ export const Swagger = { ? SecurityDefinitions.toJSON(message.securityDefinitions) : undefined); if (message.security) { - obj.security = message.security.map((e) => - e ? SecurityRequirement.toJSON(e) : undefined - ); + obj.security = message.security.map(e => (e ? SecurityRequirement.toJSON(e) : undefined)); } else { obj.security = []; } @@ -1307,13 +1271,8 @@ export const Swagger = { } }); } - if ( - object.securityDefinitions !== undefined && - object.securityDefinitions !== null - ) { - message.securityDefinitions = SecurityDefinitions.fromPartial( - object.securityDefinitions - ); + if (object.securityDefinitions !== undefined && object.securityDefinitions !== null) { + message.securityDefinitions = SecurityDefinitions.fromPartial(object.securityDefinitions); } else { message.securityDefinitions = undefined; } @@ -1323,9 +1282,7 @@ export const Swagger = { } } if (object.externalDocs !== undefined && object.externalDocs !== null) { - message.externalDocs = ExternalDocumentation.fromPartial( - object.externalDocs - ); + message.externalDocs = ExternalDocumentation.fromPartial(object.externalDocs); } else { message.externalDocs = undefined; } @@ -1343,10 +1300,7 @@ export const Swagger = { const baseSwagger_ResponsesEntry: object = { key: "" }; export const Swagger_ResponsesEntry = { - encode( - message: Swagger_ResponsesEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Swagger_ResponsesEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -1356,10 +1310,7 @@ export const Swagger_ResponsesEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): Swagger_ResponsesEntry { + decode(input: _m0.Reader | Uint8Array, length?: number): Swagger_ResponsesEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseSwagger_ResponsesEntry } as Swagger_ResponsesEntry; @@ -1403,9 +1354,7 @@ export const Swagger_ResponsesEntry = { return obj; }, - fromPartial( - object: DeepPartial - ): Swagger_ResponsesEntry { + fromPartial(object: DeepPartial): Swagger_ResponsesEntry { const message = { ...baseSwagger_ResponsesEntry } as Swagger_ResponsesEntry; if (object.key !== undefined && object.key !== null) { message.key = object.key; @@ -1424,10 +1373,7 @@ export const Swagger_ResponsesEntry = { const baseSwagger_ExtensionsEntry: object = { key: "" }; export const Swagger_ExtensionsEntry = { - encode( - message: Swagger_ExtensionsEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Swagger_ExtensionsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -1437,10 +1383,7 @@ export const Swagger_ExtensionsEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): Swagger_ExtensionsEntry { + decode(input: _m0.Reader | Uint8Array, length?: number): Swagger_ExtensionsEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1488,9 +1431,7 @@ export const Swagger_ExtensionsEntry = { return obj; }, - fromPartial( - object: DeepPartial - ): Swagger_ExtensionsEntry { + fromPartial(object: DeepPartial): Swagger_ExtensionsEntry { const message = { ...baseSwagger_ExtensionsEntry, } as Swagger_ExtensionsEntry; @@ -1520,10 +1461,7 @@ const baseOperation: object = { }; export const Operation = { - encode( - message: Operation, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Operation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.tags) { writer.uint32(10).string(v!); } @@ -1534,10 +1472,7 @@ export const Operation = { writer.uint32(26).string(message.description); } if (message.externalDocs !== undefined) { - ExternalDocumentation.encode( - message.externalDocs, - writer.uint32(34).fork() - ).ldelim(); + ExternalDocumentation.encode(message.externalDocs, writer.uint32(34).fork()).ldelim(); } if (message.operationId !== "") { writer.uint32(42).string(message.operationId); @@ -1551,7 +1486,7 @@ export const Operation = { Object.entries(message.responses).forEach(([key, value]) => { Operation_ResponsesEntry.encode( { key: key as any, value }, - writer.uint32(74).fork() + writer.uint32(74).fork(), ).ldelim(); }); writer.uint32(82).fork(); @@ -1568,7 +1503,7 @@ export const Operation = { Object.entries(message.extensions).forEach(([key, value]) => { Operation_ExtensionsEntry.encode( { key: key as any, value }, - writer.uint32(106).fork() + writer.uint32(106).fork(), ).ldelim(); }); return writer; @@ -1598,10 +1533,7 @@ export const Operation = { message.description = reader.string(); break; case 4: - message.externalDocs = ExternalDocumentation.decode( - reader, - reader.uint32() - ); + message.externalDocs = ExternalDocumentation.decode(reader, reader.uint32()); break; case 5: message.operationId = reader.string(); @@ -1613,10 +1545,7 @@ export const Operation = { message.produces.push(reader.string()); break; case 9: - const entry9 = Operation_ResponsesEntry.decode( - reader, - reader.uint32() - ); + const entry9 = Operation_ResponsesEntry.decode(reader, reader.uint32()); if (entry9.value !== undefined) { message.responses[entry9.key] = entry9.value; } @@ -1635,15 +1564,10 @@ export const Operation = { message.deprecated = reader.bool(); break; case 12: - message.security.push( - SecurityRequirement.decode(reader, reader.uint32()) - ); + message.security.push(SecurityRequirement.decode(reader, reader.uint32())); break; case 13: - const entry13 = Operation_ExtensionsEntry.decode( - reader, - reader.uint32() - ); + const entry13 = Operation_ExtensionsEntry.decode(reader, reader.uint32()); if (entry13.value !== undefined) { message.extensions[entry13.key] = entry13.value; } @@ -1681,9 +1605,7 @@ export const Operation = { message.description = ""; } if (object.externalDocs !== undefined && object.externalDocs !== null) { - message.externalDocs = ExternalDocumentation.fromJSON( - object.externalDocs - ); + message.externalDocs = ExternalDocumentation.fromJSON(object.externalDocs); } else { message.externalDocs = undefined; } @@ -1733,26 +1655,24 @@ export const Operation = { toJSON(message: Operation): unknown { const obj: any = {}; if (message.tags) { - obj.tags = message.tags.map((e) => e); + obj.tags = message.tags.map(e => e); } else { obj.tags = []; } message.summary !== undefined && (obj.summary = message.summary); - message.description !== undefined && - (obj.description = message.description); + message.description !== undefined && (obj.description = message.description); message.externalDocs !== undefined && (obj.externalDocs = message.externalDocs ? ExternalDocumentation.toJSON(message.externalDocs) : undefined); - message.operationId !== undefined && - (obj.operationId = message.operationId); + message.operationId !== undefined && (obj.operationId = message.operationId); if (message.consumes) { - obj.consumes = message.consumes.map((e) => e); + obj.consumes = message.consumes.map(e => e); } else { obj.consumes = []; } if (message.produces) { - obj.produces = message.produces.map((e) => e); + obj.produces = message.produces.map(e => e); } else { obj.produces = []; } @@ -1763,15 +1683,13 @@ export const Operation = { }); } if (message.schemes) { - obj.schemes = message.schemes.map((e) => schemeToJSON(e)); + obj.schemes = message.schemes.map(e => schemeToJSON(e)); } else { obj.schemes = []; } message.deprecated !== undefined && (obj.deprecated = message.deprecated); if (message.security) { - obj.security = message.security.map((e) => - e ? SecurityRequirement.toJSON(e) : undefined - ); + obj.security = message.security.map(e => (e ? SecurityRequirement.toJSON(e) : undefined)); } else { obj.security = []; } @@ -1809,9 +1727,7 @@ export const Operation = { message.description = ""; } if (object.externalDocs !== undefined && object.externalDocs !== null) { - message.externalDocs = ExternalDocumentation.fromPartial( - object.externalDocs - ); + message.externalDocs = ExternalDocumentation.fromPartial(object.externalDocs); } else { message.externalDocs = undefined; } @@ -1866,10 +1782,7 @@ export const Operation = { const baseOperation_ResponsesEntry: object = { key: "" }; export const Operation_ResponsesEntry = { - encode( - message: Operation_ResponsesEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Operation_ResponsesEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -1879,10 +1792,7 @@ export const Operation_ResponsesEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): Operation_ResponsesEntry { + decode(input: _m0.Reader | Uint8Array, length?: number): Operation_ResponsesEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -1930,9 +1840,7 @@ export const Operation_ResponsesEntry = { return obj; }, - fromPartial( - object: DeepPartial - ): Operation_ResponsesEntry { + fromPartial(object: DeepPartial): Operation_ResponsesEntry { const message = { ...baseOperation_ResponsesEntry, } as Operation_ResponsesEntry; @@ -1953,10 +1861,7 @@ export const Operation_ResponsesEntry = { const baseOperation_ExtensionsEntry: object = { key: "" }; export const Operation_ExtensionsEntry = { - encode( - message: Operation_ExtensionsEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Operation_ExtensionsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -1966,10 +1871,7 @@ export const Operation_ExtensionsEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): Operation_ExtensionsEntry { + decode(input: _m0.Reader | Uint8Array, length?: number): Operation_ExtensionsEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2017,9 +1919,7 @@ export const Operation_ExtensionsEntry = { return obj; }, - fromPartial( - object: DeepPartial - ): Operation_ExtensionsEntry { + fromPartial(object: DeepPartial): Operation_ExtensionsEntry { const message = { ...baseOperation_ExtensionsEntry, } as Operation_ExtensionsEntry; @@ -2046,10 +1946,7 @@ const baseHeader: object = { }; export const Header = { - encode( - message: Header, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Header, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.description !== "") { writer.uint32(10).string(message.description); } @@ -2130,8 +2027,7 @@ export const Header = { toJSON(message: Header): unknown { const obj: any = {}; - message.description !== undefined && - (obj.description = message.description); + message.description !== undefined && (obj.description = message.description); message.type !== undefined && (obj.type = message.type); message.format !== undefined && (obj.format = message.format); message.default !== undefined && (obj.default = message.default); @@ -2173,10 +2069,7 @@ export const Header = { const baseResponse: object = { description: "" }; export const Response = { - encode( - message: Response, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Response, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.description !== "") { writer.uint32(10).string(message.description); } @@ -2184,21 +2077,15 @@ export const Response = { Schema.encode(message.schema, writer.uint32(18).fork()).ldelim(); } Object.entries(message.headers).forEach(([key, value]) => { - Response_HeadersEntry.encode( - { key: key as any, value }, - writer.uint32(26).fork() - ).ldelim(); + Response_HeadersEntry.encode({ key: key as any, value }, writer.uint32(26).fork()).ldelim(); }); Object.entries(message.examples).forEach(([key, value]) => { - Response_ExamplesEntry.encode( - { key: key as any, value }, - writer.uint32(34).fork() - ).ldelim(); + Response_ExamplesEntry.encode({ key: key as any, value }, writer.uint32(34).fork()).ldelim(); }); Object.entries(message.extensions).forEach(([key, value]) => { Response_ExtensionsEntry.encode( { key: key as any, value }, - writer.uint32(42).fork() + writer.uint32(42).fork(), ).ldelim(); }); return writer; @@ -2233,10 +2120,7 @@ export const Response = { } break; case 5: - const entry5 = Response_ExtensionsEntry.decode( - reader, - reader.uint32() - ); + const entry5 = Response_ExtensionsEntry.decode(reader, reader.uint32()); if (entry5.value !== undefined) { message.extensions[entry5.key] = entry5.value; } @@ -2284,8 +2168,7 @@ export const Response = { toJSON(message: Response): unknown { const obj: any = {}; - message.description !== undefined && - (obj.description = message.description); + message.description !== undefined && (obj.description = message.description); message.schema !== undefined && (obj.schema = message.schema ? Schema.toJSON(message.schema) : undefined); obj.headers = {}; @@ -2352,10 +2235,7 @@ export const Response = { const baseResponse_HeadersEntry: object = { key: "" }; export const Response_HeadersEntry = { - encode( - message: Response_HeadersEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Response_HeadersEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -2365,10 +2245,7 @@ export const Response_HeadersEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): Response_HeadersEntry { + decode(input: _m0.Reader | Uint8Array, length?: number): Response_HeadersEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseResponse_HeadersEntry } as Response_HeadersEntry; @@ -2412,9 +2289,7 @@ export const Response_HeadersEntry = { return obj; }, - fromPartial( - object: DeepPartial - ): Response_HeadersEntry { + fromPartial(object: DeepPartial): Response_HeadersEntry { const message = { ...baseResponse_HeadersEntry } as Response_HeadersEntry; if (object.key !== undefined && object.key !== null) { message.key = object.key; @@ -2433,10 +2308,7 @@ export const Response_HeadersEntry = { const baseResponse_ExamplesEntry: object = { key: "", value: "" }; export const Response_ExamplesEntry = { - encode( - message: Response_ExamplesEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Response_ExamplesEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -2446,10 +2318,7 @@ export const Response_ExamplesEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): Response_ExamplesEntry { + decode(input: _m0.Reader | Uint8Array, length?: number): Response_ExamplesEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseResponse_ExamplesEntry } as Response_ExamplesEntry; @@ -2492,9 +2361,7 @@ export const Response_ExamplesEntry = { return obj; }, - fromPartial( - object: DeepPartial - ): Response_ExamplesEntry { + fromPartial(object: DeepPartial): Response_ExamplesEntry { const message = { ...baseResponse_ExamplesEntry } as Response_ExamplesEntry; if (object.key !== undefined && object.key !== null) { message.key = object.key; @@ -2513,10 +2380,7 @@ export const Response_ExamplesEntry = { const baseResponse_ExtensionsEntry: object = { key: "" }; export const Response_ExtensionsEntry = { - encode( - message: Response_ExtensionsEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Response_ExtensionsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -2526,10 +2390,7 @@ export const Response_ExtensionsEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): Response_ExtensionsEntry { + decode(input: _m0.Reader | Uint8Array, length?: number): Response_ExtensionsEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -2577,9 +2438,7 @@ export const Response_ExtensionsEntry = { return obj; }, - fromPartial( - object: DeepPartial - ): Response_ExtensionsEntry { + fromPartial(object: DeepPartial): Response_ExtensionsEntry { const message = { ...baseResponse_ExtensionsEntry, } as Response_ExtensionsEntry; @@ -2625,10 +2484,7 @@ export const Info = { writer.uint32(50).string(message.version); } Object.entries(message.extensions).forEach(([key, value]) => { - Info_ExtensionsEntry.encode( - { key: key as any, value }, - writer.uint32(58).fork() - ).ldelim(); + Info_ExtensionsEntry.encode({ key: key as any, value }, writer.uint32(58).fork()).ldelim(); }); return writer; }, @@ -2717,18 +2573,12 @@ export const Info = { toJSON(message: Info): unknown { const obj: any = {}; message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); - message.termsOfService !== undefined && - (obj.termsOfService = message.termsOfService); + message.description !== undefined && (obj.description = message.description); + message.termsOfService !== undefined && (obj.termsOfService = message.termsOfService); message.contact !== undefined && - (obj.contact = message.contact - ? Contact.toJSON(message.contact) - : undefined); + (obj.contact = message.contact ? Contact.toJSON(message.contact) : undefined); message.license !== undefined && - (obj.license = message.license - ? License.toJSON(message.license) - : undefined); + (obj.license = message.license ? License.toJSON(message.license) : undefined); message.version !== undefined && (obj.version = message.version); obj.extensions = {}; if (message.extensions) { @@ -2786,10 +2636,7 @@ export const Info = { const baseInfo_ExtensionsEntry: object = { key: "" }; export const Info_ExtensionsEntry = { - encode( - message: Info_ExtensionsEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Info_ExtensionsEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -2799,10 +2646,7 @@ export const Info_ExtensionsEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): Info_ExtensionsEntry { + decode(input: _m0.Reader | Uint8Array, length?: number): Info_ExtensionsEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseInfo_ExtensionsEntry } as Info_ExtensionsEntry; @@ -2865,10 +2709,7 @@ export const Info_ExtensionsEntry = { const baseContact: object = { name: "", url: "", email: "" }; export const Contact = { - encode( - message: Contact, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Contact, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -2957,10 +2798,7 @@ export const Contact = { const baseLicense: object = { name: "", url: "" }; export const License = { - encode( - message: License, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: License, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.name !== "") { writer.uint32(10).string(message.name); } @@ -3032,10 +2870,7 @@ export const License = { const baseExternalDocumentation: object = { description: "", url: "" }; export const ExternalDocumentation = { - encode( - message: ExternalDocumentation, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: ExternalDocumentation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.description !== "") { writer.uint32(10).string(message.description); } @@ -3045,10 +2880,7 @@ export const ExternalDocumentation = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): ExternalDocumentation { + decode(input: _m0.Reader | Uint8Array, length?: number): ExternalDocumentation { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { ...baseExternalDocumentation } as ExternalDocumentation; @@ -3086,15 +2918,12 @@ export const ExternalDocumentation = { toJSON(message: ExternalDocumentation): unknown { const obj: any = {}; - message.description !== undefined && - (obj.description = message.description); + message.description !== undefined && (obj.description = message.description); message.url !== undefined && (obj.url = message.url); return obj; }, - fromPartial( - object: DeepPartial - ): ExternalDocumentation { + fromPartial(object: DeepPartial): ExternalDocumentation { const message = { ...baseExternalDocumentation } as ExternalDocumentation; if (object.description !== undefined && object.description !== null) { message.description = object.description; @@ -3113,10 +2942,7 @@ export const ExternalDocumentation = { const baseSchema: object = { discriminator: "", readOnly: false, example: "" }; export const Schema = { - encode( - message: Schema, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Schema, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.jsonSchema !== undefined) { JSONSchema.encode(message.jsonSchema, writer.uint32(10).fork()).ldelim(); } @@ -3127,10 +2953,7 @@ export const Schema = { writer.uint32(24).bool(message.readOnly); } if (message.externalDocs !== undefined) { - ExternalDocumentation.encode( - message.externalDocs, - writer.uint32(42).fork() - ).ldelim(); + ExternalDocumentation.encode(message.externalDocs, writer.uint32(42).fork()).ldelim(); } if (message.example !== "") { writer.uint32(50).string(message.example); @@ -3155,10 +2978,7 @@ export const Schema = { message.readOnly = reader.bool(); break; case 5: - message.externalDocs = ExternalDocumentation.decode( - reader, - reader.uint32() - ); + message.externalDocs = ExternalDocumentation.decode(reader, reader.uint32()); break; case 6: message.example = reader.string(); @@ -3189,9 +3009,7 @@ export const Schema = { message.readOnly = false; } if (object.externalDocs !== undefined && object.externalDocs !== null) { - message.externalDocs = ExternalDocumentation.fromJSON( - object.externalDocs - ); + message.externalDocs = ExternalDocumentation.fromJSON(object.externalDocs); } else { message.externalDocs = undefined; } @@ -3206,11 +3024,8 @@ export const Schema = { toJSON(message: Schema): unknown { const obj: any = {}; message.jsonSchema !== undefined && - (obj.jsonSchema = message.jsonSchema - ? JSONSchema.toJSON(message.jsonSchema) - : undefined); - message.discriminator !== undefined && - (obj.discriminator = message.discriminator); + (obj.jsonSchema = message.jsonSchema ? JSONSchema.toJSON(message.jsonSchema) : undefined); + message.discriminator !== undefined && (obj.discriminator = message.discriminator); message.readOnly !== undefined && (obj.readOnly = message.readOnly); message.externalDocs !== undefined && (obj.externalDocs = message.externalDocs @@ -3238,9 +3053,7 @@ export const Schema = { message.readOnly = false; } if (object.externalDocs !== undefined && object.externalDocs !== null) { - message.externalDocs = ExternalDocumentation.fromPartial( - object.externalDocs - ); + message.externalDocs = ExternalDocumentation.fromPartial(object.externalDocs); } else { message.externalDocs = undefined; } @@ -3281,10 +3094,7 @@ const baseJSONSchema: object = { }; export const JSONSchema = { - encode( - message: JSONSchema, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: JSONSchema, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.ref !== "") { writer.uint32(26).string(message.ref); } @@ -3362,7 +3172,7 @@ export const JSONSchema = { if (message.fieldConfiguration !== undefined) { JSONSchema_FieldConfiguration.encode( message.fieldConfiguration, - writer.uint32(8010).fork() + writer.uint32(8010).fork(), ).ldelim(); } return writer; @@ -3461,7 +3271,7 @@ export const JSONSchema = { case 1001: message.fieldConfiguration = JSONSchema_FieldConfiguration.decode( reader, - reader.uint32() + reader.uint32(), ); break; default: @@ -3518,10 +3328,7 @@ export const JSONSchema = { } else { message.maximum = 0; } - if ( - object.exclusiveMaximum !== undefined && - object.exclusiveMaximum !== null - ) { + if (object.exclusiveMaximum !== undefined && object.exclusiveMaximum !== null) { message.exclusiveMaximum = Boolean(object.exclusiveMaximum); } else { message.exclusiveMaximum = false; @@ -3531,10 +3338,7 @@ export const JSONSchema = { } else { message.minimum = 0; } - if ( - object.exclusiveMinimum !== undefined && - object.exclusiveMinimum !== null - ) { + if (object.exclusiveMinimum !== undefined && object.exclusiveMinimum !== null) { message.exclusiveMinimum = Boolean(object.exclusiveMinimum); } else { message.exclusiveMinimum = false; @@ -3604,12 +3408,9 @@ export const JSONSchema = { message.enum.push(String(e)); } } - if ( - object.fieldConfiguration !== undefined && - object.fieldConfiguration !== null - ) { + if (object.fieldConfiguration !== undefined && object.fieldConfiguration !== null) { message.fieldConfiguration = JSONSchema_FieldConfiguration.fromJSON( - object.fieldConfiguration + object.fieldConfiguration, ); } else { message.fieldConfiguration = undefined; @@ -3621,49 +3422,41 @@ export const JSONSchema = { const obj: any = {}; message.ref !== undefined && (obj.ref = message.ref); message.title !== undefined && (obj.title = message.title); - message.description !== undefined && - (obj.description = message.description); + message.description !== undefined && (obj.description = message.description); message.default !== undefined && (obj.default = message.default); message.readOnly !== undefined && (obj.readOnly = message.readOnly); message.example !== undefined && (obj.example = message.example); message.multipleOf !== undefined && (obj.multipleOf = message.multipleOf); message.maximum !== undefined && (obj.maximum = message.maximum); - message.exclusiveMaximum !== undefined && - (obj.exclusiveMaximum = message.exclusiveMaximum); + message.exclusiveMaximum !== undefined && (obj.exclusiveMaximum = message.exclusiveMaximum); message.minimum !== undefined && (obj.minimum = message.minimum); - message.exclusiveMinimum !== undefined && - (obj.exclusiveMinimum = message.exclusiveMinimum); + message.exclusiveMinimum !== undefined && (obj.exclusiveMinimum = message.exclusiveMinimum); message.maxLength !== undefined && (obj.maxLength = message.maxLength); message.minLength !== undefined && (obj.minLength = message.minLength); message.pattern !== undefined && (obj.pattern = message.pattern); message.maxItems !== undefined && (obj.maxItems = message.maxItems); message.minItems !== undefined && (obj.minItems = message.minItems); - message.uniqueItems !== undefined && - (obj.uniqueItems = message.uniqueItems); - message.maxProperties !== undefined && - (obj.maxProperties = message.maxProperties); - message.minProperties !== undefined && - (obj.minProperties = message.minProperties); + message.uniqueItems !== undefined && (obj.uniqueItems = message.uniqueItems); + message.maxProperties !== undefined && (obj.maxProperties = message.maxProperties); + message.minProperties !== undefined && (obj.minProperties = message.minProperties); if (message.required) { - obj.required = message.required.map((e) => e); + obj.required = message.required.map(e => e); } else { obj.required = []; } if (message.array) { - obj.array = message.array.map((e) => e); + obj.array = message.array.map(e => e); } else { obj.array = []; } if (message.type) { - obj.type = message.type.map((e) => - jSONSchema_JSONSchemaSimpleTypesToJSON(e) - ); + obj.type = message.type.map(e => jSONSchema_JSONSchemaSimpleTypesToJSON(e)); } else { obj.type = []; } message.format !== undefined && (obj.format = message.format); if (message.enum) { - obj.enum = message.enum.map((e) => e); + obj.enum = message.enum.map(e => e); } else { obj.enum = []; } @@ -3720,10 +3513,7 @@ export const JSONSchema = { } else { message.maximum = 0; } - if ( - object.exclusiveMaximum !== undefined && - object.exclusiveMaximum !== null - ) { + if (object.exclusiveMaximum !== undefined && object.exclusiveMaximum !== null) { message.exclusiveMaximum = object.exclusiveMaximum; } else { message.exclusiveMaximum = false; @@ -3733,10 +3523,7 @@ export const JSONSchema = { } else { message.minimum = 0; } - if ( - object.exclusiveMinimum !== undefined && - object.exclusiveMinimum !== null - ) { + if (object.exclusiveMinimum !== undefined && object.exclusiveMinimum !== null) { message.exclusiveMinimum = object.exclusiveMinimum; } else { message.exclusiveMinimum = false; @@ -3806,12 +3593,9 @@ export const JSONSchema = { message.enum.push(e); } } - if ( - object.fieldConfiguration !== undefined && - object.fieldConfiguration !== null - ) { + if (object.fieldConfiguration !== undefined && object.fieldConfiguration !== null) { message.fieldConfiguration = JSONSchema_FieldConfiguration.fromPartial( - object.fieldConfiguration + object.fieldConfiguration, ); } else { message.fieldConfiguration = undefined; @@ -3825,7 +3609,7 @@ const baseJSONSchema_FieldConfiguration: object = { pathParamName: "" }; export const JSONSchema_FieldConfiguration = { encode( message: JSONSchema_FieldConfiguration, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.pathParamName !== "") { writer.uint32(378).string(message.pathParamName); @@ -3833,10 +3617,7 @@ export const JSONSchema_FieldConfiguration = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): JSONSchema_FieldConfiguration { + decode(input: _m0.Reader | Uint8Array, length?: number): JSONSchema_FieldConfiguration { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -3870,14 +3651,11 @@ export const JSONSchema_FieldConfiguration = { toJSON(message: JSONSchema_FieldConfiguration): unknown { const obj: any = {}; - message.pathParamName !== undefined && - (obj.pathParamName = message.pathParamName); + message.pathParamName !== undefined && (obj.pathParamName = message.pathParamName); return obj; }, - fromPartial( - object: DeepPartial - ): JSONSchema_FieldConfiguration { + fromPartial(object: DeepPartial): JSONSchema_FieldConfiguration { const message = { ...baseJSONSchema_FieldConfiguration, } as JSONSchema_FieldConfiguration; @@ -3898,10 +3676,7 @@ export const Tag = { writer.uint32(18).string(message.description); } if (message.externalDocs !== undefined) { - ExternalDocumentation.encode( - message.externalDocs, - writer.uint32(26).fork() - ).ldelim(); + ExternalDocumentation.encode(message.externalDocs, writer.uint32(26).fork()).ldelim(); } return writer; }, @@ -3917,10 +3692,7 @@ export const Tag = { message.description = reader.string(); break; case 3: - message.externalDocs = ExternalDocumentation.decode( - reader, - reader.uint32() - ); + message.externalDocs = ExternalDocumentation.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -3938,9 +3710,7 @@ export const Tag = { message.description = ""; } if (object.externalDocs !== undefined && object.externalDocs !== null) { - message.externalDocs = ExternalDocumentation.fromJSON( - object.externalDocs - ); + message.externalDocs = ExternalDocumentation.fromJSON(object.externalDocs); } else { message.externalDocs = undefined; } @@ -3949,8 +3719,7 @@ export const Tag = { toJSON(message: Tag): unknown { const obj: any = {}; - message.description !== undefined && - (obj.description = message.description); + message.description !== undefined && (obj.description = message.description); message.externalDocs !== undefined && (obj.externalDocs = message.externalDocs ? ExternalDocumentation.toJSON(message.externalDocs) @@ -3966,9 +3735,7 @@ export const Tag = { message.description = ""; } if (object.externalDocs !== undefined && object.externalDocs !== null) { - message.externalDocs = ExternalDocumentation.fromPartial( - object.externalDocs - ); + message.externalDocs = ExternalDocumentation.fromPartial(object.externalDocs); } else { message.externalDocs = undefined; } @@ -3979,14 +3746,11 @@ export const Tag = { const baseSecurityDefinitions: object = {}; export const SecurityDefinitions = { - encode( - message: SecurityDefinitions, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SecurityDefinitions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { Object.entries(message.security).forEach(([key, value]) => { SecurityDefinitions_SecurityEntry.encode( { key: key as any, value }, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); }); return writer; @@ -4001,10 +3765,7 @@ export const SecurityDefinitions = { const tag = reader.uint32(); switch (tag >>> 3) { case 1: - const entry1 = SecurityDefinitions_SecurityEntry.decode( - reader, - reader.uint32() - ); + const entry1 = SecurityDefinitions_SecurityEntry.decode(reader, reader.uint32()); if (entry1.value !== undefined) { message.security[entry1.key] = entry1.value; } @@ -4058,7 +3819,7 @@ const baseSecurityDefinitions_SecurityEntry: object = { key: "" }; export const SecurityDefinitions_SecurityEntry = { encode( message: SecurityDefinitions_SecurityEntry, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); @@ -4069,10 +3830,7 @@ export const SecurityDefinitions_SecurityEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SecurityDefinitions_SecurityEntry { + decode(input: _m0.Reader | Uint8Array, length?: number): SecurityDefinitions_SecurityEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -4116,14 +3874,12 @@ export const SecurityDefinitions_SecurityEntry = { const obj: any = {}; message.key !== undefined && (obj.key = message.key); message.value !== undefined && - (obj.value = message.value - ? SecurityScheme.toJSON(message.value) - : undefined); + (obj.value = message.value ? SecurityScheme.toJSON(message.value) : undefined); return obj; }, fromPartial( - object: DeepPartial + object: DeepPartial, ): SecurityDefinitions_SecurityEntry { const message = { ...baseSecurityDefinitions_SecurityEntry, @@ -4153,10 +3909,7 @@ const baseSecurityScheme: object = { }; export const SecurityScheme = { - encode( - message: SecurityScheme, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SecurityScheme, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.type !== 0) { writer.uint32(8).int32(message.type); } @@ -4184,7 +3937,7 @@ export const SecurityScheme = { Object.entries(message.extensions).forEach(([key, value]) => { SecurityScheme_ExtensionsEntry.encode( { key: key as any, value }, - writer.uint32(74).fork() + writer.uint32(74).fork(), ).ldelim(); }); return writer; @@ -4223,10 +3976,7 @@ export const SecurityScheme = { message.scopes = Scopes.decode(reader, reader.uint32()); break; case 9: - const entry9 = SecurityScheme_ExtensionsEntry.decode( - reader, - reader.uint32() - ); + const entry9 = SecurityScheme_ExtensionsEntry.decode(reader, reader.uint32()); if (entry9.value !== undefined) { message.extensions[entry9.key] = entry9.value; } @@ -4267,10 +4017,7 @@ export const SecurityScheme = { } else { message.flow = 0; } - if ( - object.authorizationUrl !== undefined && - object.authorizationUrl !== null - ) { + if (object.authorizationUrl !== undefined && object.authorizationUrl !== null) { message.authorizationUrl = String(object.authorizationUrl); } else { message.authorizationUrl = ""; @@ -4295,16 +4042,12 @@ export const SecurityScheme = { toJSON(message: SecurityScheme): unknown { const obj: any = {}; - message.type !== undefined && - (obj.type = securityScheme_TypeToJSON(message.type)); - message.description !== undefined && - (obj.description = message.description); + message.type !== undefined && (obj.type = securityScheme_TypeToJSON(message.type)); + message.description !== undefined && (obj.description = message.description); message.name !== undefined && (obj.name = message.name); message.in !== undefined && (obj.in = securityScheme_InToJSON(message.in)); - message.flow !== undefined && - (obj.flow = securityScheme_FlowToJSON(message.flow)); - message.authorizationUrl !== undefined && - (obj.authorizationUrl = message.authorizationUrl); + message.flow !== undefined && (obj.flow = securityScheme_FlowToJSON(message.flow)); + message.authorizationUrl !== undefined && (obj.authorizationUrl = message.authorizationUrl); message.tokenUrl !== undefined && (obj.tokenUrl = message.tokenUrl); message.scopes !== undefined && (obj.scopes = message.scopes ? Scopes.toJSON(message.scopes) : undefined); @@ -4345,10 +4088,7 @@ export const SecurityScheme = { } else { message.flow = 0; } - if ( - object.authorizationUrl !== undefined && - object.authorizationUrl !== null - ) { + if (object.authorizationUrl !== undefined && object.authorizationUrl !== null) { message.authorizationUrl = object.authorizationUrl; } else { message.authorizationUrl = ""; @@ -4379,7 +4119,7 @@ const baseSecurityScheme_ExtensionsEntry: object = { key: "" }; export const SecurityScheme_ExtensionsEntry = { encode( message: SecurityScheme_ExtensionsEntry, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); @@ -4390,10 +4130,7 @@ export const SecurityScheme_ExtensionsEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number - ): SecurityScheme_ExtensionsEntry { + decode(input: _m0.Reader | Uint8Array, length?: number): SecurityScheme_ExtensionsEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; const message = { @@ -4441,9 +4178,7 @@ export const SecurityScheme_ExtensionsEntry = { return obj; }, - fromPartial( - object: DeepPartial - ): SecurityScheme_ExtensionsEntry { + fromPartial(object: DeepPartial): SecurityScheme_ExtensionsEntry { const message = { ...baseSecurityScheme_ExtensionsEntry, } as SecurityScheme_ExtensionsEntry; @@ -4464,14 +4199,11 @@ export const SecurityScheme_ExtensionsEntry = { const baseSecurityRequirement: object = {}; export const SecurityRequirement = { - encode( - message: SecurityRequirement, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: SecurityRequirement, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { Object.entries(message.securityRequirement).forEach(([key, value]) => { SecurityRequirement_SecurityRequirementEntry.encode( { key: key as any, value }, - writer.uint32(10).fork() + writer.uint32(10).fork(), ).ldelim(); }); return writer; @@ -4488,7 +4220,7 @@ export const SecurityRequirement = { case 1: const entry1 = SecurityRequirement_SecurityRequirementEntry.decode( reader, - reader.uint32() + reader.uint32(), ); if (entry1.value !== undefined) { message.securityRequirement[entry1.key] = entry1.value; @@ -4505,10 +4237,7 @@ export const SecurityRequirement = { fromJSON(object: any): SecurityRequirement { const message = { ...baseSecurityRequirement } as SecurityRequirement; message.securityRequirement = {}; - if ( - object.securityRequirement !== undefined && - object.securityRequirement !== null - ) { + if (object.securityRequirement !== undefined && object.securityRequirement !== null) { Object.entries(object.securityRequirement).forEach(([key, value]) => { message.securityRequirement[key] = SecurityRequirement_SecurityRequirementValue.fromJSON(value); @@ -4522,8 +4251,7 @@ export const SecurityRequirement = { obj.securityRequirement = {}; if (message.securityRequirement) { Object.entries(message.securityRequirement).forEach(([k, v]) => { - obj.securityRequirement[k] = - SecurityRequirement_SecurityRequirementValue.toJSON(v); + obj.securityRequirement[k] = SecurityRequirement_SecurityRequirementValue.toJSON(v); }); } return obj; @@ -4532,10 +4260,7 @@ export const SecurityRequirement = { fromPartial(object: DeepPartial): SecurityRequirement { const message = { ...baseSecurityRequirement } as SecurityRequirement; message.securityRequirement = {}; - if ( - object.securityRequirement !== undefined && - object.securityRequirement !== null - ) { + if (object.securityRequirement !== undefined && object.securityRequirement !== null) { Object.entries(object.securityRequirement).forEach(([key, value]) => { if (value !== undefined) { message.securityRequirement[key] = @@ -4552,7 +4277,7 @@ const baseSecurityRequirement_SecurityRequirementValue: object = { scope: "" }; export const SecurityRequirement_SecurityRequirementValue = { encode( message: SecurityRequirement_SecurityRequirementValue, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { for (const v of message.scope) { writer.uint32(10).string(v!); @@ -4562,7 +4287,7 @@ export const SecurityRequirement_SecurityRequirementValue = { decode( input: _m0.Reader | Uint8Array, - length?: number + length?: number, ): SecurityRequirement_SecurityRequirementValue { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; @@ -4600,7 +4325,7 @@ export const SecurityRequirement_SecurityRequirementValue = { toJSON(message: SecurityRequirement_SecurityRequirementValue): unknown { const obj: any = {}; if (message.scope) { - obj.scope = message.scope.map((e) => e); + obj.scope = message.scope.map(e => e); } else { obj.scope = []; } @@ -4608,7 +4333,7 @@ export const SecurityRequirement_SecurityRequirementValue = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): SecurityRequirement_SecurityRequirementValue { const message = { ...baseSecurityRequirement_SecurityRequirementValue, @@ -4628,7 +4353,7 @@ const baseSecurityRequirement_SecurityRequirementEntry: object = { key: "" }; export const SecurityRequirement_SecurityRequirementEntry = { encode( message: SecurityRequirement_SecurityRequirementEntry, - writer: _m0.Writer = _m0.Writer.create() + writer: _m0.Writer = _m0.Writer.create(), ): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); @@ -4636,7 +4361,7 @@ export const SecurityRequirement_SecurityRequirementEntry = { if (message.value !== undefined) { SecurityRequirement_SecurityRequirementValue.encode( message.value, - writer.uint32(18).fork() + writer.uint32(18).fork(), ).ldelim(); } return writer; @@ -4644,7 +4369,7 @@ export const SecurityRequirement_SecurityRequirementEntry = { decode( input: _m0.Reader | Uint8Array, - length?: number + length?: number, ): SecurityRequirement_SecurityRequirementEntry { const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); let end = length === undefined ? reader.len : reader.pos + length; @@ -4660,7 +4385,7 @@ export const SecurityRequirement_SecurityRequirementEntry = { case 2: message.value = SecurityRequirement_SecurityRequirementValue.decode( reader, - reader.uint32() + reader.uint32(), ); break; default: @@ -4681,9 +4406,7 @@ export const SecurityRequirement_SecurityRequirementEntry = { message.key = ""; } if (object.value !== undefined && object.value !== null) { - message.value = SecurityRequirement_SecurityRequirementValue.fromJSON( - object.value - ); + message.value = SecurityRequirement_SecurityRequirementValue.fromJSON(object.value); } else { message.value = undefined; } @@ -4701,7 +4424,7 @@ export const SecurityRequirement_SecurityRequirementEntry = { }, fromPartial( - object: DeepPartial + object: DeepPartial, ): SecurityRequirement_SecurityRequirementEntry { const message = { ...baseSecurityRequirement_SecurityRequirementEntry, @@ -4712,9 +4435,7 @@ export const SecurityRequirement_SecurityRequirementEntry = { message.key = ""; } if (object.value !== undefined && object.value !== null) { - message.value = SecurityRequirement_SecurityRequirementValue.fromPartial( - object.value - ); + message.value = SecurityRequirement_SecurityRequirementValue.fromPartial(object.value); } else { message.value = undefined; } @@ -4725,15 +4446,9 @@ export const SecurityRequirement_SecurityRequirementEntry = { const baseScopes: object = {}; export const Scopes = { - encode( - message: Scopes, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Scopes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { Object.entries(message.scope).forEach(([key, value]) => { - Scopes_ScopeEntry.encode( - { key: key as any, value }, - writer.uint32(10).fork() - ).ldelim(); + Scopes_ScopeEntry.encode({ key: key as any, value }, writer.uint32(10).fork()).ldelim(); }); return writer; }, @@ -4799,10 +4514,7 @@ export const Scopes = { const baseScopes_ScopeEntry: object = { key: "", value: "" }; export const Scopes_ScopeEntry = { - encode( - message: Scopes_ScopeEntry, - writer: _m0.Writer = _m0.Writer.create() - ): _m0.Writer { + encode(message: Scopes_ScopeEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key !== "") { writer.uint32(10).string(message.key); } @@ -4882,14 +4594,7 @@ var globalThis: any = (() => { throw "Unable to locate global object"; })(); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends Array From 42eca6e20d060055bd36eb00b19e7f900b768d7b Mon Sep 17 00:00:00 2001 From: gfichtenholt Date: Thu, 7 Apr 2022 23:39:26 -0700 Subject: [PATCH 08/11] small clean up --- .../fluxv2/packages/v1alpha1/chart_test.go | 12 +- .../packages/v1alpha1/global_vars_test.go | 128 ++++++++++++- .../v1alpha1/repo_integration_test.go | 172 +++--------------- .../fluxv2/packages/v1alpha1/repo_test.go | 16 +- .../fluxv2/packages/v1alpha1/server_test.go | 16 +- 5 files changed, 168 insertions(+), 176 deletions(-) diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_test.go index e066a0d3914..4987b7c3859 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_test.go @@ -181,7 +181,7 @@ func TestGetAvailablePackageDetail(t *testing.T) { } defer ts2.Close() - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, secretObjs, false) + s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, secretObjs) if err != nil { t.Fatalf("%+v", err) } @@ -276,7 +276,7 @@ func TestTransientHttpFailuresAreRetriedForChartCache(t *testing.T) { } defer ts2.Close() - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil, false) + s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil) if err != nil { t.Fatalf("%+v", err) } @@ -447,7 +447,7 @@ func TestNonExistingRepoOrInvalidPkgVersionGetAvailablePackageDetail(t *testing. } defer ts2.Close() - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil, false) + s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil) if err != nil { t.Fatalf("%+v", err) } @@ -626,7 +626,7 @@ func TestGetAvailablePackageVersions(t *testing.T) { } defer ts.Close() - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil, false) + s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil) if err != nil { t.Fatalf("%+v", err) } @@ -676,7 +676,7 @@ func TestChartCacheResyncNotIdle(t *testing.T) { // start with an empty server that only has an empty repo cache // passing in []testSpecChartWithUrl{} instead of nil will add support for chart cache - s, mock, err := newServerWithRepos(t, nil, []testSpecChartWithUrl{}, nil, false) + s, mock, err := newServerWithRepos(t, nil, []testSpecChartWithUrl{}, nil) if err != nil { t.Fatalf("error instantiating the server: %v", err) } @@ -899,7 +899,7 @@ func TestChartWithRelativeURL(t *testing.T) { chartUrl: ts.URL + "/charts/airflow-1.0.0.tgz", repoNamespace: repoNamespace, }, - }, nil, false) + }, nil) if err != nil { t.Fatal(err) } diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go index 7e9b8d2ea6e..f0456f82cb7 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go @@ -1248,7 +1248,7 @@ var ( }, } - add_repo_13 = &corev1.AddPackageRepositoryRequest{ + add_repo_req_13 = &corev1.AddPackageRepositoryRequest{ Name: "bar", Context: &corev1.Context{Namespace: "foo"}, Type: "helm", @@ -1263,7 +1263,7 @@ var ( }, } - add_repo_14 = &corev1.AddPackageRepositoryRequest{ + add_repo_req_14 = &corev1.AddPackageRepositoryRequest{ Name: "bar", Context: &corev1.Context{Namespace: "foo"}, Type: "helm", @@ -1285,6 +1285,75 @@ var ( }, } + add_repo_req_15 = &corev1.AddPackageRepositoryRequest{ + Name: "my-podinfo", + Context: &corev1.Context{Namespace: "default"}, + Type: "helm", + Url: podinfo_repo_url, + } + + add_repo_req_16 = &corev1.AddPackageRepositoryRequest{ + Name: "my-podinfo-2", + Context: &corev1.Context{Namespace: "default"}, + Type: "helm", + Url: podinfo_basic_auth_repo_url, + Auth: &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_UsernamePassword{ + UsernamePassword: &corev1.UsernamePassword{ + Username: "foo", + Password: "bar", + }, + }, + }, + } + + add_repo_req_17 = &corev1.AddPackageRepositoryRequest{ + Name: "my-podinfo-3", + Context: &corev1.Context{Namespace: "default"}, + Type: "helm", + Url: podinfo_basic_auth_repo_url, + Auth: &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_UsernamePassword{ + UsernamePassword: &corev1.UsernamePassword{ + Username: "foo", + Password: "bar-2", + }, + }, + }, + } + + add_repo_req_18 = &corev1.AddPackageRepositoryRequest{ + Name: "my-podinfo-4", + Context: &corev1.Context{Namespace: "default"}, + Type: "helm", + Url: podinfo_basic_auth_repo_url, + Auth: &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_SecretRef{ + SecretRef: &corev1.SecretKeyReference{ + Name: "secret-1", + }, + }, + }, + } + + add_repo_req_19 = &corev1.AddPackageRepositoryRequest{ + Name: "my-podinfo-4", + Context: &corev1.Context{Namespace: "default"}, + Type: "helm", + Url: podinfo_tls_repo_url, + Auth: &corev1.PackageRepositoryAuth{ + Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_TLS, + PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_SecretRef{ + SecretRef: &corev1.SecretKeyReference{ + Name: "secret-2", + }, + }, + }, + } + add_repo_expected_resp = &corev1.AddPackageRepositoryResponse{ PackageRepoRef: &corev1.PackageRepositoryReference{ Context: &corev1.Context{ @@ -1296,6 +1365,61 @@ var ( }, } + add_repo_expected_resp_2 = &corev1.AddPackageRepositoryResponse{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Context: &corev1.Context{ + Namespace: "default", + Cluster: KubeappsCluster, + }, + Identifier: "my-podinfo", + Plugin: fluxPlugin, + }, + } + + add_repo_expected_resp_3 = &corev1.AddPackageRepositoryResponse{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Context: &corev1.Context{ + Namespace: "default", + Cluster: KubeappsCluster, + }, + Identifier: "my-podinfo-2", + Plugin: fluxPlugin, + }, + } + + add_repo_expected_resp_4 = &corev1.AddPackageRepositoryResponse{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Context: &corev1.Context{ + Namespace: "default", + Cluster: KubeappsCluster, + }, + Identifier: "my-podinfo-3", + Plugin: fluxPlugin, + }, + } + + add_repo_expected_resp_5 = &corev1.AddPackageRepositoryResponse{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Context: &corev1.Context{ + Namespace: "default", + Cluster: KubeappsCluster, + }, + Identifier: "my-podinfo-4", + Plugin: fluxPlugin, + }, + } + + add_repo_expected_resp_6 = &corev1.AddPackageRepositoryResponse{ + PackageRepoRef: &corev1.PackageRepositoryReference{ + Context: &corev1.Context{ + Namespace: "default", + Cluster: KubeappsCluster, + }, + Identifier: "my-podinfo-4", + Plugin: fluxPlugin, + }, + } + statusInstalled = &corev1.InstalledPackageStatus{ Ready: true, Reason: corev1.InstalledPackageStatus_STATUS_REASON_INSTALLED, diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go index 4d33d13ec1b..172c7763d21 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go @@ -190,179 +190,49 @@ func TestKindClusterAddPackageRepository(t *testing.T) { userManagedSecrets bool }{ { - testName: "add repo test (simplest case)", - request: &corev1.AddPackageRepositoryRequest{ - Name: "my-podinfo", - Context: &corev1.Context{Namespace: "default"}, - Type: "helm", - Url: podinfo_repo_url, - }, - expectedResponse: &corev1.AddPackageRepositoryResponse{ - PackageRepoRef: &corev1.PackageRepositoryReference{ - Context: &corev1.Context{ - Namespace: "default", - Cluster: KubeappsCluster, - }, - Identifier: "my-podinfo", - Plugin: fluxPlugin, - }, - }, + testName: "add repo test (simplest case)", + request: add_repo_req_15, + expectedResponse: add_repo_expected_resp_2, expectedStatusCode: codes.OK, }, { - testName: "package repository with basic auth", - request: &corev1.AddPackageRepositoryRequest{ - Name: "my-podinfo-2", - Context: &corev1.Context{Namespace: "default"}, - Type: "helm", - Url: podinfo_basic_auth_repo_url, - Auth: &corev1.PackageRepositoryAuth{ - Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, - PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_UsernamePassword{ - UsernamePassword: &corev1.UsernamePassword{ - Username: "foo", - Password: "bar", - }, - }, - }, - }, - expectedResponse: &corev1.AddPackageRepositoryResponse{ - PackageRepoRef: &corev1.PackageRepositoryReference{ - Context: &corev1.Context{ - Namespace: "default", - Cluster: KubeappsCluster, - }, - Identifier: "my-podinfo-2", - Plugin: fluxPlugin, - }, - }, + testName: "package repository with basic auth", + request: add_repo_req_16, + expectedResponse: add_repo_expected_resp_3, expectedStatusCode: codes.OK, }, { - testName: "package repository with wrong basic auth fails", - request: &corev1.AddPackageRepositoryRequest{ - Name: "my-podinfo-3", - Context: &corev1.Context{Namespace: "default"}, - Type: "helm", - Url: podinfo_basic_auth_repo_url, - Auth: &corev1.PackageRepositoryAuth{ - Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, - PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_UsernamePassword{ - UsernamePassword: &corev1.UsernamePassword{ - Username: "foo", - Password: "bar-2", - }, - }, - }, - }, - expectedResponse: &corev1.AddPackageRepositoryResponse{ - PackageRepoRef: &corev1.PackageRepositoryReference{ - Context: &corev1.Context{ - Namespace: "default", - Cluster: KubeappsCluster, - }, - Identifier: "my-podinfo-3", - Plugin: fluxPlugin, - }, - }, + testName: "package repository with wrong basic auth fails", + request: add_repo_req_17, + expectedResponse: add_repo_expected_resp_4, expectedStatusCode: codes.OK, expectedReconcileFailure: true, }, { - testName: "package repository with basic auth and existing secret", - request: &corev1.AddPackageRepositoryRequest{ - Name: "my-podinfo-4", - Context: &corev1.Context{Namespace: "default"}, - Type: "helm", - Url: podinfo_basic_auth_repo_url, - Auth: &corev1.PackageRepositoryAuth{ - Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, - PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_SecretRef{ - SecretRef: &corev1.SecretKeyReference{ - Name: "secret-1", - }, - }, - }, - }, - existingSecret: newBasicAuthSecret("secret-1", "default", "foo", "bar"), - expectedResponse: &corev1.AddPackageRepositoryResponse{ - PackageRepoRef: &corev1.PackageRepositoryReference{ - Context: &corev1.Context{ - Namespace: "default", - Cluster: KubeappsCluster, - }, - Identifier: "my-podinfo-4", - Plugin: fluxPlugin, - }, - }, + testName: "package repository with basic auth and existing secret", + request: add_repo_req_18, + existingSecret: newBasicAuthSecret("secret-1", "default", "foo", "bar"), + expectedResponse: add_repo_expected_resp_5, expectedStatusCode: codes.OK, userManagedSecrets: true, }, { - testName: "package repository with basic auth and existing secret (kubeapps managed secrets)", - request: &corev1.AddPackageRepositoryRequest{ - Name: "my-podinfo-4", - Context: &corev1.Context{Namespace: "default"}, - Type: "helm", - Url: podinfo_basic_auth_repo_url, - Auth: &corev1.PackageRepositoryAuth{ - Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_BASIC_AUTH, - PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_SecretRef{ - SecretRef: &corev1.SecretKeyReference{ - Name: "secret-1", - }, - }, - }, - }, + testName: "package repository with basic auth and existing secret (kubeapps managed secrets)", + request: add_repo_req_18, existingSecret: newBasicAuthSecret("secret-1", "default", "foo", "bar"), expectedStatusCode: codes.InvalidArgument, }, { - testName: "package repository with TLS", - request: &corev1.AddPackageRepositoryRequest{ - Name: "my-podinfo-4", - Context: &corev1.Context{Namespace: "default"}, - Type: "helm", - Url: podinfo_tls_repo_url, - Auth: &corev1.PackageRepositoryAuth{ - Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_TLS, - PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_SecretRef{ - SecretRef: &corev1.SecretKeyReference{ - Name: "secret-2", - }, - }, - }, - }, - existingSecret: newTlsSecret("secret-2", "default", pub, priv, ca), - expectedResponse: &corev1.AddPackageRepositoryResponse{ - PackageRepoRef: &corev1.PackageRepositoryReference{ - Context: &corev1.Context{ - Namespace: "default", - Cluster: KubeappsCluster, - }, - Identifier: "my-podinfo-4", - Plugin: fluxPlugin, - }, - }, + testName: "package repository with TLS", + request: add_repo_req_19, + existingSecret: newTlsSecret("secret-2", "default", pub, priv, ca), + expectedResponse: add_repo_expected_resp_6, expectedStatusCode: codes.OK, userManagedSecrets: true, }, { - testName: "package repository with TLS (kubeapps managed secrets)", - request: &corev1.AddPackageRepositoryRequest{ - Name: "my-podinfo-4", - Context: &corev1.Context{Namespace: "default"}, - Type: "helm", - Url: podinfo_tls_repo_url, - Auth: &corev1.PackageRepositoryAuth{ - Type: corev1.PackageRepositoryAuth_PACKAGE_REPOSITORY_AUTH_TYPE_TLS, - PackageRepoAuthOneOf: &corev1.PackageRepositoryAuth_SecretRef{ - SecretRef: &corev1.SecretKeyReference{ - Name: "secret-2", - }, - }, - }, - }, + testName: "package repository with TLS (kubeapps managed secrets)", + request: add_repo_req_19, existingSecret: newTlsSecret("secret-2", "default", pub, priv, ca), expectedStatusCode: codes.InvalidArgument, }, diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_test.go index f7bc50c7b19..752f717c356 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_test.go @@ -737,7 +737,7 @@ func TestGetAvailablePackageSummaryAfterFluxHelmRepoDelete(t *testing.T) { } defer ts.Close() - s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil, false) + s, mock, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, charts, nil) if err != nil { t.Fatalf("%+v", err) } @@ -1301,7 +1301,7 @@ func TestAddPackageRepository(t *testing.T) { }, { name: "package repository with basic auth and existing secret", - request: add_repo_13, + request: add_repo_req_13, expectedResponse: add_repo_expected_resp, expectedRepo: &add_repo_3, existingSecret: newBasicAuthSecret("secret-1", "foo", "baz", "zot"), @@ -1310,17 +1310,17 @@ func TestAddPackageRepository(t *testing.T) { }, { name: "package repository with basic auth and existing secret (kubeapps managed secrets)", - request: add_repo_13, + request: add_repo_req_13, statusCode: codes.InvalidArgument, }, { name: "errors when package repository with 1 secret for TLS CA and a different secret for basic auth (kubeapps managed secrets)", - request: add_repo_14, + request: add_repo_req_14, statusCode: codes.InvalidArgument, }, { name: "errors when package repository with 1 secret for TLS CA and a different secret for basic auth", - request: add_repo_14, + request: add_repo_req_14, statusCode: codes.InvalidArgument, userManagedSecrets: true, }, @@ -1332,10 +1332,11 @@ func TestAddPackageRepository(t *testing.T) { if tc.existingSecret != nil { secrets = append(secrets, tc.existingSecret) } - s, mock, err := newServerWithRepos(t, nil, nil, secrets, tc.userManagedSecrets) + s, mock, err := newServerWithRepos(t, nil, nil, secrets) if err != nil { t.Fatalf("error instantiating the server: %v", err) } + s.pluginConfig.UserManagedSecrets = tc.userManagedSecrets nsname := types.NamespacedName{Namespace: tc.request.Context.Namespace, Name: tc.request.Name} if tc.statusCode == codes.OK { @@ -1616,10 +1617,11 @@ func TestGetPackageRepositoryDetail(t *testing.T) { // the index.yaml will contain links to charts but for the purposes // of this test they do not matter - s, _, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, nil, secrets, tc.userManagedSecrets) + s, _, err := newServerWithRepos(t, []sourcev1.HelmRepository{*repo}, nil, secrets) if err != nil { t.Fatalf("error instantiating the server: %v", err) } + s.pluginConfig.UserManagedSecrets = tc.userManagedSecrets ctx := context.Background() actualResp, err := s.GetPackageRepositoryDetail(ctx, tc.request) diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server_test.go index 4edc4606648..5f6fde80a56 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/server_test.go @@ -203,10 +203,10 @@ type testSpecChartWithUrl struct { } func newSimpleServerWithRepos(t *testing.T, repos []sourcev1.HelmRepository) (*Server, redismock.ClientMock, error) { - return newServerWithRepos(t, repos, nil, nil, false) + return newServerWithRepos(t, repos, nil, nil) } -func newServerWithRepos(t *testing.T, repos []sourcev1.HelmRepository, charts []testSpecChartWithUrl, secrets []runtime.Object, userManagedSecrets bool) (*Server, redismock.ClientMock, error) { +func newServerWithRepos(t *testing.T, repos []sourcev1.HelmRepository, charts []testSpecChartWithUrl, secrets []runtime.Object) (*Server, redismock.ClientMock, error) { typedClient := typfake.NewSimpleClientset(secrets...) // ref https://stackoverflow.com/questions/68794562/kubernetes-fake-client-doesnt-handle-generatename-in-objectmeta/68794563#68794563 @@ -241,7 +241,7 @@ func newServerWithRepos(t *testing.T, repos []sourcev1.HelmRepository, charts [] WithControllerRuntime(&ctrlClient). Build(), nil } - return newServer(t, clientGetter, nil, repos, charts, userManagedSecrets) + return newServer(t, clientGetter, nil, repos, charts) } func newServerWithChartsAndReleases(t *testing.T, actionConfig *action.Configuration, charts []sourcev1.HelmChart, releases []helmv2.HelmRelease) (*Server, redismock.ClientMock, error) { @@ -263,7 +263,7 @@ func newServerWithChartsAndReleases(t *testing.T, actionConfig *action.Configura WithControllerRuntime(&ctrlClient). Build(), nil } - return newServer(t, clientGetter, actionConfig, nil, nil, false) + return newServer(t, clientGetter, actionConfig, nil, nil) } // newHelmActionConfig returns an action.Configuration with fake clients and memory storage. @@ -321,8 +321,7 @@ func newServer(t *testing.T, clientGetter clientgetter.ClientGetterFunc, actionConfig *action.Configuration, repos []sourcev1.HelmRepository, - charts []testSpecChartWithUrl, - userManagedSecrets bool) (*Server, redismock.ClientMock, error) { + charts []testSpecChartWithUrl) (*Server, redismock.ClientMock, error) { stopCh := make(chan struct{}) t.Cleanup(func() { close(stopCh) }) @@ -457,9 +456,6 @@ func newServer(t *testing.T, return nil, mock, err } - pluginConfig := common.NewDefaultPluginConfig() - pluginConfig.UserManagedSecrets = userManagedSecrets - s := &Server{ clientGetter: clientGetter, serviceAccountClientGetter: backgroundClientGetter, @@ -469,7 +465,7 @@ func newServer(t *testing.T, repoCache: repoCache, chartCache: chartCache, kubeappsCluster: KubeappsCluster, - pluginConfig: pluginConfig, + pluginConfig: common.NewDefaultPluginConfig(), } return s, mock, nil } From a5bc497f346710bd28644c8c24d559850fc566e7 Mon Sep 17 00:00:00 2001 From: gfichtenholt Date: Fri, 8 Apr 2022 22:30:54 -0700 Subject: [PATCH 09/11] small fixes --- .../v1alpha1/chart_integration_test.go | 18 ++-- .../packages/v1alpha1/global_vars_test.go | 54 ++++++------ .../v1alpha1/release_integration_test.go | 83 ++++++++++--------- .../v1alpha1/repo_integration_test.go | 26 ++++-- 4 files changed, 100 insertions(+), 81 deletions(-) diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_integration_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_integration_test.go index be19ba9400a..2ad50148969 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_integration_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/chart_integration_test.go @@ -127,7 +127,7 @@ func TestKindClusterGetAvailablePackageSummariesForLargeReposAndTinyRedis(t *tes // one particular code path I'd like to test: // make sure that GetAvailablePackageVersions() works w.r.t. a cache entry that's been evicted - grpcContext, err := newGrpcAdminContext(t, "test-create-admin", "default") + grpcContext, err := newGrpcAdminContext(t, "test-create-admin-"+randSeq(4), "default") if err != nil { t.Fatal(err) } @@ -295,27 +295,29 @@ func TestKindClusterRepoAndChartRBAC(t *testing.T) { } } - grpcCtxAdmin, err := newGrpcAdminContext(t, "test-repo-rbac-admin", "default") + svcAcctName := "test-repo-rbac-admin-" + randSeq(4) + grpcCtxAdmin, err := newGrpcAdminContext(t, svcAcctName, "default") if err != nil { t.Fatal(err) } for _, n := range names { out := kubectlCanI( - t, "test-repo-rbac-admin", "default", "get", fluxHelmRepositories, n.Namespace) + t, svcAcctName, "default", "get", fluxHelmRepositories, n.Namespace) if out != "yes" { t.Errorf("Expected [yes], got [%s]", out) } } + svcAcctName2 := "test-repo-rbac-loser-" + randSeq(4) grpcCtxLoser, err := newGrpcContextForServiceAccountWithoutAccessToAnyNamespace( - t, "test-repo-rbac-loser", "default") + t, svcAcctName2, "default") if err != nil { t.Fatal(err) } for _, n := range names { out := kubectlCanI( - t, "test-repo-rbac-loser", "default", "get", fluxHelmRepositories, n.Namespace) + t, svcAcctName2, "default", "get", fluxHelmRepositories, n.Namespace) if out != "no" { t.Errorf("Expected [no], got [%s]", out) } @@ -336,14 +338,14 @@ func TestKindClusterRepoAndChartRBAC(t *testing.T) { }, } + svcAcctName3 := "test-repo-rbac-limited-" + randSeq(4) grpcCtxLimited, err := newGrpcContextForServiceAccountWithRules( - t, "test-repo-rbac-limited", "default", rules) + t, svcAcctName3, "default", rules) if err != nil { t.Fatal(err) } for i, n := range names { - out := kubectlCanI( - t, "test-repo-rbac-limited", "default", "get", fluxHelmRepositories, n.Namespace) + out := kubectlCanI(t, svcAcctName3, "default", "get", fluxHelmRepositories, n.Namespace) if i == 0 { if out != "no" { t.Errorf("Expected [no], got [%s]", out) diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go index f0456f82cb7..01270cb1aa5 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/global_vars_test.go @@ -833,35 +833,39 @@ var ( "kubectl -n @TARGET_NS@ port-forward deploy/my-podinfo 8080:9898\n", } - available_package_summaries_podinfo_basic_auth = &corev1.GetAvailablePackageSummariesResponse{ - AvailablePackageSummaries: []*corev1.AvailablePackageSummary{ - { - Name: "podinfo", - AvailablePackageRef: availableRef("podinfo-basic-auth/podinfo", "default"), - LatestVersion: &corev1.PackageAppVersion{PkgVersion: "6.0.0", AppVersion: "6.0.0"}, - DisplayName: "podinfo", - ShortDescription: "Podinfo Helm chart for Kubernetes", - Categories: []string{""}, + available_package_summaries_podinfo_basic_auth = func(name string) *corev1.GetAvailablePackageSummariesResponse { + return &corev1.GetAvailablePackageSummariesResponse{ + AvailablePackageSummaries: []*corev1.AvailablePackageSummary{ + { + Name: "podinfo", + AvailablePackageRef: availableRef(name+"/podinfo", "default"), + LatestVersion: &corev1.PackageAppVersion{PkgVersion: "6.0.0", AppVersion: "6.0.0"}, + DisplayName: "podinfo", + ShortDescription: "Podinfo Helm chart for Kubernetes", + Categories: []string{""}, + }, }, - }, + } } - expected_detail_podinfo_basic_auth = &corev1.GetAvailablePackageDetailResponse{ - AvailablePackageDetail: &corev1.AvailablePackageDetail{ - AvailablePackageRef: availableRef("podinfo-basic-auth/podinfo", "default"), - Name: "podinfo", - Version: &corev1.PackageAppVersion{PkgVersion: "6.0.0", AppVersion: "6.0.0"}, - RepoUrl: "http://fluxv2plugin-testdata-svc.default.svc.cluster.local:80/podinfo-basic-auth", - HomeUrl: "https://github.com/stefanprodan/podinfo", - DisplayName: "podinfo", - ShortDescription: "Podinfo Helm chart for Kubernetes", - SourceUrls: []string{"https://github.com/stefanprodan/podinfo"}, - Maintainers: []*corev1.Maintainer{ - {Name: "stefanprodan", Email: "stefanprodan@users.noreply.github.com"}, + expected_detail_podinfo_basic_auth = func(name string) *corev1.GetAvailablePackageDetailResponse { + return &corev1.GetAvailablePackageDetailResponse{ + AvailablePackageDetail: &corev1.AvailablePackageDetail{ + AvailablePackageRef: availableRef(name+"/podinfo", "default"), + Name: "podinfo", + Version: &corev1.PackageAppVersion{PkgVersion: "6.0.0", AppVersion: "6.0.0"}, + RepoUrl: "http://fluxv2plugin-testdata-svc.default.svc.cluster.local:80/podinfo-basic-auth", + HomeUrl: "https://github.com/stefanprodan/podinfo", + DisplayName: "podinfo", + ShortDescription: "Podinfo Helm chart for Kubernetes", + SourceUrls: []string{"https://github.com/stefanprodan/podinfo"}, + Maintainers: []*corev1.Maintainer{ + {Name: "stefanprodan", Email: "stefanprodan@users.noreply.github.com"}, + }, + Readme: "Podinfo is used by CNCF projects like [Flux](https://github.com/fluxcd/flux2)", + DefaultValues: "Default values for podinfo.\n\nreplicaCount: 1\n", }, - Readme: "Podinfo is used by CNCF projects like [Flux](https://github.com/fluxcd/flux2)", - DefaultValues: "Default values for podinfo.\n\nreplicaCount: 1\n", - }, + } } valid_index_charts_spec = []testSpecChartWithFile{ diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_integration_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_integration_test.go index 4a2a02866d4..6f9a808ca4a 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_integration_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/release_integration_test.go @@ -118,7 +118,7 @@ func TestKindClusterCreateInstalledPackage(t *testing.T) { }, } - grpcContext, err := newGrpcAdminContext(t, "test-create-admin", "default") + grpcContext, err := newGrpcAdminContext(t, "test-create-admin"+randSeq(4), "default") if err != nil { t.Fatal(err) } @@ -225,7 +225,7 @@ func TestKindClusterUpdateInstalledPackage(t *testing.T) { }, } - grpcContext, err := newGrpcAdminContext(t, "test-create-admin", "default") + grpcContext, err := newGrpcAdminContext(t, "test-create-admin"+randSeq(4), "default") if err != nil { t.Fatal(err) } @@ -308,7 +308,7 @@ func TestKindClusterAutoUpdateInstalledPackage(t *testing.T) { expectedResourceRefs: expected_resource_refs_auto_update, } - grpcContext, err := newGrpcAdminContext(t, "test-auto-update", "default") + grpcContext, err := newGrpcAdminContext(t, "test-auto-update"+randSeq(4), "default") if err != nil { t.Fatal(err) } @@ -403,7 +403,7 @@ func TestKindClusterDeleteInstalledPackage(t *testing.T) { }, } - grpcContext, err := newGrpcAdminContext(t, "test-delete-admin", "default") + grpcContext, err := newGrpcAdminContext(t, "test-delete-admin"+randSeq(4), "default") if err != nil { t.Fatal(err) } @@ -530,24 +530,24 @@ func TestKindClusterRBAC_ReadRelease(t *testing.T) { } }) - grpcCtxAdmin, err := newGrpcAdminContext(t, "test-release-rbac-admin", "default") + adminAcctName := "test-release-rbac-admin-" + randSeq(4) + grpcCtxAdmin, err := newGrpcAdminContext(t, adminAcctName, "default") if err != nil { t.Fatal(err) } + loserAcctName := "test-release-rbac-loser-" + randSeq(4) grpcCtxLoser, err := newGrpcContextForServiceAccountWithoutAccessToAnyNamespace( - t, "test-release-rbac-loser", "default") + t, loserAcctName, "default") if err != nil { t.Fatal(err) } - out := kubectlCanI( - t, "test-release-rbac-admin", "default", "get", "helmcharts", ns1) + out := kubectlCanI(t, adminAcctName, "default", "get", "helmcharts", ns1) if out != "yes" { t.Errorf("Expected [yes], got [%s]", out) } - out = kubectlCanI( - t, "test-release-rbac-loser", "default", "get", "helmcharts", ns1) + out = kubectlCanI(t, loserAcctName, "default", "get", "helmcharts", ns1) if out != "no" { t.Errorf("Expected [no], got [%s]", out) } @@ -576,8 +576,7 @@ func TestKindClusterRBAC_ReadRelease(t *testing.T) { ns2 := tc.request.TargetContext.Namespace - out = kubectlCanI( - t, "test-release-rbac-admin", "default", "get", fluxHelmReleases, ns2) + out = kubectlCanI(t, adminAcctName, "default", "get", fluxHelmReleases, ns2) if out != "yes" { t.Errorf("Expected [yes], got [%s]", out) } @@ -645,8 +644,7 @@ func TestKindClusterRBAC_ReadRelease(t *testing.T) { } } - out = kubectlCanI( - t, "test-release-rbac-loser", "default", "get", fluxHelmReleases, ns2) + out = kubectlCanI(t, loserAcctName, "default", "get", fluxHelmReleases, ns2) if out != "no" { t.Errorf("Expected [no], got [%s]", out) } @@ -711,24 +709,22 @@ func TestKindClusterRBAC_ReadRelease(t *testing.T) { }, } + svcAcctName := "test-release-rbac-helmreleases-" + randSeq(4) grpcCtxReadHelmReleases, err := newGrpcContextForServiceAccountWithRules( - t, "test-release-rbac-helmreleases", "default", rules) + t, svcAcctName, "default", rules) if err != nil { t.Fatal(err) } - out = kubectlCanI( - t, "test-release-rbac-helmreleases", "default", "get", fluxHelmRepositories, ns2) + out = kubectlCanI(t, svcAcctName, "default", "get", fluxHelmRepositories, ns2) if out != "no" { t.Errorf("Expected [no], got [%s]", out) } - out = kubectlCanI( - t, "test-release-rbac-helmreleases", "default", "get", "helmcharts", ns2) + out = kubectlCanI(t, svcAcctName, "default", "get", "helmcharts", ns2) if out != "no" { t.Errorf("Expected [no], got [%s]", out) } - out = kubectlCanI( - t, "test-release-rbac-helmreleases", "default", "get", fluxHelmReleases, ns2) + out = kubectlCanI(t, svcAcctName, "default", "get", fluxHelmReleases, ns2) if out != "yes" { t.Errorf("Expected [yes], got [%s]", out) } @@ -817,19 +813,18 @@ func TestKindClusterRBAC_ReadRelease(t *testing.T) { }, } + svcAcctName2 := "test-release-rbac-helmreleases-and-charts-" + randSeq(4) grpcCtxReadHelmReleasesAndCharts, err := newGrpcContextForServiceAccountWithRules( - t, "test-release-rbac-helmreleases-and-charts", "default", nsToRules) + t, svcAcctName2, "default", nsToRules) if err != nil { t.Fatal(err) } - out = kubectlCanI( - t, "test-release-rbac-helmreleases-and-charts", "default", "get", "helmcharts", ns1) + out = kubectlCanI(t, svcAcctName2, "default", "get", "helmcharts", ns1) if out != "yes" { t.Errorf("Expected [yes], got [%s]", out) } - out = kubectlCanI( - t, "test-release-rbac-helmreleases-and-charts", "default", "get", fluxHelmReleases, ns2) + out = kubectlCanI(t, svcAcctName2, "default", "get", fluxHelmReleases, ns2) if out != "yes" { t.Errorf("Expected [yes], got [%s]", out) } @@ -901,8 +896,9 @@ func TestKindClusterRBAC_CreateRelease(t *testing.T) { t.Fatal(err) } + loserAcctName := "test-release-rbac-loser-" + randSeq(4) grpcCtxLoser, err := newGrpcContextForServiceAccountWithoutAccessToAnyNamespace( - t, "test-release-rbac-loser", "default") + t, loserAcctName, "default") if err != nil { t.Fatal(err) } @@ -917,17 +913,17 @@ func TestKindClusterRBAC_CreateRelease(t *testing.T) { } }) - out := kubectlCanI(t, "test-release-rbac-loser", "default", "get", "helmcharts", ns2) + out := kubectlCanI(t, loserAcctName, "default", "get", "helmcharts", ns2) if out != "no" { t.Errorf("Expected [no], got [%s]", out) } - out = kubectlCanI(t, "test-release-rbac-loser", "default", "get", "helmreleases", ns2) + out = kubectlCanI(t, loserAcctName, "default", "get", "helmreleases", ns2) if out != "no" { t.Errorf("Expected [no], got [%s]", out) } - out = kubectlCanI(t, "test-release-rbac-loser", "default", "create", "helmreleases", ns2) + out = kubectlCanI(t, loserAcctName, "default", "create", "helmreleases", ns2) if out != "no" { t.Errorf("Expected [no], got [%s]", out) } @@ -958,8 +954,9 @@ func TestKindClusterRBAC_CreateRelease(t *testing.T) { }, } + svcAcctName2 := "test-release-rbac-helmreleases-2-" + randSeq(4) grpcCtx2, err := newGrpcContextForServiceAccountWithRules( - t, "test-release-rbac-helmreleases-2", "default", nsToRules) + t, svcAcctName2, "default", nsToRules) if err != nil { t.Fatal(err) } @@ -991,8 +988,9 @@ func TestKindClusterRBAC_CreateRelease(t *testing.T) { }, } + svcAcctName3 := "test-release-rbac-helmreleases-3-" + randSeq(4) grpcCtx3, err := newGrpcContextForServiceAccountWithRules( - t, "test-release-rbac-helmreleases-3", "default", nsToRules) + t, svcAcctName3, "default", nsToRules) if err != nil { t.Fatal(err) } @@ -1053,7 +1051,8 @@ func TestKindClusterRBAC_UpdateRelease(t *testing.T) { expectedResourceRefs: expected_resource_refs_basic, } - grpcCtxAdmin, err := newGrpcAdminContext(t, "test-release-rbac-admin", "default") + adminAcctName := "test-release-rbac-admin-" + randSeq(4) + grpcCtxAdmin, err := newGrpcAdminContext(t, adminAcctName, "default") if err != nil { t.Fatal(err) } @@ -1062,8 +1061,9 @@ func TestKindClusterRBAC_UpdateRelease(t *testing.T) { ns2 := tc.request.TargetContext.Namespace + loserAcctName := "test-release-rbac-loser-" + randSeq(4) grpcCtxLoser, err := newGrpcContextForServiceAccountWithoutAccessToAnyNamespace( - t, "test-release-rbac-loser", "default") + t, loserAcctName, "default") if err != nil { t.Fatal(err) } @@ -1095,8 +1095,9 @@ func TestKindClusterRBAC_UpdateRelease(t *testing.T) { }, } + svcAcctName2 := "test-release-rbac-helmreleases-2-" + randSeq(4) grpcCtx2, err := newGrpcContextForServiceAccountWithRules( - t, "test-release-rbac-helmreleases-2", "default", nsToRules) + t, svcAcctName2, "default", nsToRules) if err != nil { t.Fatal(err) } @@ -1124,8 +1125,9 @@ func TestKindClusterRBAC_UpdateRelease(t *testing.T) { }, } + svcAcctName3 := "test-release-rbac-helmreleases-3-" + randSeq(4) grpcCtx3, err := newGrpcContextForServiceAccountWithRules( - t, "test-release-rbac-helmreleases-3", "default", nsToRules) + t, svcAcctName3, "default", nsToRules) if err != nil { t.Fatal(err) } @@ -1185,7 +1187,8 @@ func TestKindClusterRBAC_DeleteRelease(t *testing.T) { expectedResourceRefs: expected_resource_refs_basic, } - grpcCtxAdmin, err := newGrpcAdminContext(t, "test-release-rbac-admin", "default") + adminAcctName := "test-release-rbac-admin-" + randSeq(4) + grpcCtxAdmin, err := newGrpcAdminContext(t, adminAcctName, "default") if err != nil { t.Fatal(err) } @@ -1194,8 +1197,9 @@ func TestKindClusterRBAC_DeleteRelease(t *testing.T) { ns2 := tc.request.TargetContext.Namespace + loserAcctName := "test-release-rbac-loser-" + randSeq(4) grpcCtxLoser, err := newGrpcContextForServiceAccountWithoutAccessToAnyNamespace( - t, "test-release-rbac-loser", "default") + t, loserAcctName, "default") if err != nil { t.Fatal(err) } @@ -1226,8 +1230,9 @@ func TestKindClusterRBAC_DeleteRelease(t *testing.T) { }, } + svcAcctName := "test-release-rbac-helmreleases-3-" + randSeq(4) grpcCtx3, err := newGrpcContextForServiceAccountWithRules( - t, "test-release-rbac-helmreleases-3", "default", nsToRules) + t, svcAcctName, "default", nsToRules) if err != nil { t.Fatal(err) } diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go index 172c7763d21..0e0c15eb28d 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go @@ -72,8 +72,8 @@ func TestKindClusterRepoWithBasicAuth(t *testing.T) { t.Fatal(err) } - secretName := "podinfo-basic-auth-secret" - repoName := "podinfo-basic-auth" + secretName := "podinfo-basic-auth-secret-" + randSeq(4) + repoName := "podinfo-basic-auth-" + randSeq(4) if err := kubeCreateSecret(t, newBasicAuthSecret(secretName, "default", "foo", "bar")); err != nil { t.Fatalf("%v", err) @@ -125,7 +125,7 @@ func TestKindClusterRepoWithBasicAuth(t *testing.T) { plugins.Plugin{}, corev1.PackageAppVersion{}) opt2 := cmpopts.SortSlices(lessAvailablePackageFunc) - if got, want := resp, available_package_summaries_podinfo_basic_auth; !cmp.Equal(got, want, opt1, opt2) { + if got, want := resp, available_package_summaries_podinfo_basic_auth(repoName); !cmp.Equal(got, want, opt1, opt2) { t.Errorf("mismatch (-want +got):\n%s", cmp.Diff(want, got, opt1, opt2)) } break @@ -167,7 +167,10 @@ func TestKindClusterRepoWithBasicAuth(t *testing.T) { t.Fatalf("%v", err) } - compareActualVsExpectedAvailablePackageDetail(t, resp.AvailablePackageDetail, expected_detail_podinfo_basic_auth.AvailablePackageDetail) + compareActualVsExpectedAvailablePackageDetail( + t, + resp.AvailablePackageDetail, + expected_detail_podinfo_basic_auth(repoName).AvailablePackageDetail) } func TestKindClusterAddPackageRepository(t *testing.T) { @@ -238,7 +241,8 @@ func TestKindClusterAddPackageRepository(t *testing.T) { }, } - grpcContext, err := newGrpcAdminContext(t, "test-add-repo-admin", "default") + adminAcctName := "test-add-repo-admin-" + randSeq(4) + grpcContext, err := newGrpcAdminContext(t, adminAcctName, "default") if err != nil { t.Fatal(err) } @@ -382,12 +386,14 @@ func TestKindClusterGetPackageRepositoryDetail(t *testing.T) { }, } - grpcAdmin, err := newGrpcAdminContext(t, "test-get-repo-admin", "default") + adminAcctName := "test-get-repo-admin-" + randSeq(4) + grpcAdmin, err := newGrpcAdminContext(t, adminAcctName, "default") if err != nil { t.Fatal(err) } - grpcLoser, err := newGrpcContextForServiceAccountWithoutAccessToAnyNamespace(t, "test-get-repo-loser", "default") + loserAcctName := "test-get-repo-loser-" + randSeq(4) + grpcLoser, err := newGrpcContextForServiceAccountWithoutAccessToAnyNamespace(t, loserAcctName, "default") if err != nil { t.Fatal(err) } @@ -602,12 +608,14 @@ func TestKindClusterGetPackageRepositorySummaries(t *testing.T) { }, } - grpcAdmin, err := newGrpcAdminContext(t, "test-get-repo-admin", "default") + adminAcctName := "test-get-repo-admin-" + randSeq(4) + grpcAdmin, err := newGrpcAdminContext(t, adminAcctName, "default") if err != nil { t.Fatal(err) } - grpcLoser, err := newGrpcContextForServiceAccountWithoutAccessToAnyNamespace(t, "test-get-repo-loser", "default") + loserAcctName := "test-get-repo-loser-" + randSeq(4) + grpcLoser, err := newGrpcContextForServiceAccountWithoutAccessToAnyNamespace(t, loserAcctName, "default") if err != nil { t.Fatal(err) } From e15b4ba10e080497a012f51510b151c50dc7b13f Mon Sep 17 00:00:00 2001 From: gfichtenholt Date: Fri, 8 Apr 2022 22:32:28 -0700 Subject: [PATCH 10/11] forgot a file --- dashboard/src/gen/google/protobuf/wrappers.ts | 646 ++++++++++++++++++ 1 file changed, 646 insertions(+) create mode 100644 dashboard/src/gen/google/protobuf/wrappers.ts diff --git a/dashboard/src/gen/google/protobuf/wrappers.ts b/dashboard/src/gen/google/protobuf/wrappers.ts new file mode 100644 index 00000000000..96b3bcabea3 --- /dev/null +++ b/dashboard/src/gen/google/protobuf/wrappers.ts @@ -0,0 +1,646 @@ +/* eslint-disable */ +import Long from "long"; +import _m0 from "protobufjs/minimal"; + +export const protobufPackage = "google.protobuf"; + +/** + * Wrapper message for `double`. + * + * The JSON representation for `DoubleValue` is JSON number. + */ +export interface DoubleValue { + /** The double value. */ + value: number; +} + +/** + * Wrapper message for `float`. + * + * The JSON representation for `FloatValue` is JSON number. + */ +export interface FloatValue { + /** The float value. */ + value: number; +} + +/** + * Wrapper message for `int64`. + * + * The JSON representation for `Int64Value` is JSON string. + */ +export interface Int64Value { + /** The int64 value. */ + value: number; +} + +/** + * Wrapper message for `uint64`. + * + * The JSON representation for `UInt64Value` is JSON string. + */ +export interface UInt64Value { + /** The uint64 value. */ + value: number; +} + +/** + * Wrapper message for `int32`. + * + * The JSON representation for `Int32Value` is JSON number. + */ +export interface Int32Value { + /** The int32 value. */ + value: number; +} + +/** + * Wrapper message for `uint32`. + * + * The JSON representation for `UInt32Value` is JSON number. + */ +export interface UInt32Value { + /** The uint32 value. */ + value: number; +} + +/** + * Wrapper message for `bool`. + * + * The JSON representation for `BoolValue` is JSON `true` and `false`. + */ +export interface BoolValue { + /** The bool value. */ + value: boolean; +} + +/** + * Wrapper message for `string`. + * + * The JSON representation for `StringValue` is JSON string. + */ +export interface StringValue { + /** The string value. */ + value: string; +} + +/** + * Wrapper message for `bytes`. + * + * The JSON representation for `BytesValue` is JSON string. + */ +export interface BytesValue { + /** The bytes value. */ + value: Uint8Array; +} + +const baseDoubleValue: object = { value: 0 }; + +export const DoubleValue = { + encode(message: DoubleValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.value !== 0) { + writer.uint32(9).double(message.value); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DoubleValue { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseDoubleValue } as DoubleValue; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.double(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): DoubleValue { + const message = { ...baseDoubleValue } as DoubleValue; + if (object.value !== undefined && object.value !== null) { + message.value = Number(object.value); + } else { + message.value = 0; + } + return message; + }, + + toJSON(message: DoubleValue): unknown { + const obj: any = {}; + message.value !== undefined && (obj.value = message.value); + return obj; + }, + + fromPartial(object: DeepPartial): DoubleValue { + const message = { ...baseDoubleValue } as DoubleValue; + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = 0; + } + return message; + }, +}; + +const baseFloatValue: object = { value: 0 }; + +export const FloatValue = { + encode(message: FloatValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.value !== 0) { + writer.uint32(13).float(message.value); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): FloatValue { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseFloatValue } as FloatValue; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.float(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): FloatValue { + const message = { ...baseFloatValue } as FloatValue; + if (object.value !== undefined && object.value !== null) { + message.value = Number(object.value); + } else { + message.value = 0; + } + return message; + }, + + toJSON(message: FloatValue): unknown { + const obj: any = {}; + message.value !== undefined && (obj.value = message.value); + return obj; + }, + + fromPartial(object: DeepPartial): FloatValue { + const message = { ...baseFloatValue } as FloatValue; + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = 0; + } + return message; + }, +}; + +const baseInt64Value: object = { value: 0 }; + +export const Int64Value = { + encode(message: Int64Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.value !== 0) { + writer.uint32(8).int64(message.value); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Int64Value { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseInt64Value } as Int64Value; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = longToNumber(reader.int64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Int64Value { + const message = { ...baseInt64Value } as Int64Value; + if (object.value !== undefined && object.value !== null) { + message.value = Number(object.value); + } else { + message.value = 0; + } + return message; + }, + + toJSON(message: Int64Value): unknown { + const obj: any = {}; + message.value !== undefined && (obj.value = message.value); + return obj; + }, + + fromPartial(object: DeepPartial): Int64Value { + const message = { ...baseInt64Value } as Int64Value; + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = 0; + } + return message; + }, +}; + +const baseUInt64Value: object = { value: 0 }; + +export const UInt64Value = { + encode(message: UInt64Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.value !== 0) { + writer.uint32(8).uint64(message.value); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UInt64Value { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseUInt64Value } as UInt64Value; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = longToNumber(reader.uint64() as Long); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): UInt64Value { + const message = { ...baseUInt64Value } as UInt64Value; + if (object.value !== undefined && object.value !== null) { + message.value = Number(object.value); + } else { + message.value = 0; + } + return message; + }, + + toJSON(message: UInt64Value): unknown { + const obj: any = {}; + message.value !== undefined && (obj.value = message.value); + return obj; + }, + + fromPartial(object: DeepPartial): UInt64Value { + const message = { ...baseUInt64Value } as UInt64Value; + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = 0; + } + return message; + }, +}; + +const baseInt32Value: object = { value: 0 }; + +export const Int32Value = { + encode(message: Int32Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.value !== 0) { + writer.uint32(8).int32(message.value); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Int32Value { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseInt32Value } as Int32Value; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): Int32Value { + const message = { ...baseInt32Value } as Int32Value; + if (object.value !== undefined && object.value !== null) { + message.value = Number(object.value); + } else { + message.value = 0; + } + return message; + }, + + toJSON(message: Int32Value): unknown { + const obj: any = {}; + message.value !== undefined && (obj.value = message.value); + return obj; + }, + + fromPartial(object: DeepPartial): Int32Value { + const message = { ...baseInt32Value } as Int32Value; + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = 0; + } + return message; + }, +}; + +const baseUInt32Value: object = { value: 0 }; + +export const UInt32Value = { + encode(message: UInt32Value, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.value !== 0) { + writer.uint32(8).uint32(message.value); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): UInt32Value { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseUInt32Value } as UInt32Value; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.uint32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): UInt32Value { + const message = { ...baseUInt32Value } as UInt32Value; + if (object.value !== undefined && object.value !== null) { + message.value = Number(object.value); + } else { + message.value = 0; + } + return message; + }, + + toJSON(message: UInt32Value): unknown { + const obj: any = {}; + message.value !== undefined && (obj.value = message.value); + return obj; + }, + + fromPartial(object: DeepPartial): UInt32Value { + const message = { ...baseUInt32Value } as UInt32Value; + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = 0; + } + return message; + }, +}; + +const baseBoolValue: object = { value: false }; + +export const BoolValue = { + encode(message: BoolValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.value === true) { + writer.uint32(8).bool(message.value); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): BoolValue { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseBoolValue } as BoolValue; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): BoolValue { + const message = { ...baseBoolValue } as BoolValue; + if (object.value !== undefined && object.value !== null) { + message.value = Boolean(object.value); + } else { + message.value = false; + } + return message; + }, + + toJSON(message: BoolValue): unknown { + const obj: any = {}; + message.value !== undefined && (obj.value = message.value); + return obj; + }, + + fromPartial(object: DeepPartial): BoolValue { + const message = { ...baseBoolValue } as BoolValue; + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = false; + } + return message; + }, +}; + +const baseStringValue: object = { value: "" }; + +export const StringValue = { + encode(message: StringValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.value !== "") { + writer.uint32(10).string(message.value); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): StringValue { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseStringValue } as StringValue; + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.string(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): StringValue { + const message = { ...baseStringValue } as StringValue; + if (object.value !== undefined && object.value !== null) { + message.value = String(object.value); + } else { + message.value = ""; + } + return message; + }, + + toJSON(message: StringValue): unknown { + const obj: any = {}; + message.value !== undefined && (obj.value = message.value); + return obj; + }, + + fromPartial(object: DeepPartial): StringValue { + const message = { ...baseStringValue } as StringValue; + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = ""; + } + return message; + }, +}; + +const baseBytesValue: object = {}; + +export const BytesValue = { + encode(message: BytesValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.value.length !== 0) { + writer.uint32(10).bytes(message.value); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): BytesValue { + const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = { ...baseBytesValue } as BytesValue; + message.value = new Uint8Array(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.value = reader.bytes(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }, + + fromJSON(object: any): BytesValue { + const message = { ...baseBytesValue } as BytesValue; + message.value = new Uint8Array(); + if (object.value !== undefined && object.value !== null) { + message.value = bytesFromBase64(object.value); + } + return message; + }, + + toJSON(message: BytesValue): unknown { + const obj: any = {}; + message.value !== undefined && + (obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array())); + return obj; + }, + + fromPartial(object: DeepPartial): BytesValue { + const message = { ...baseBytesValue } as BytesValue; + if (object.value !== undefined && object.value !== null) { + message.value = object.value; + } else { + message.value = new Uint8Array(); + } + return message; + }, +}; + +declare var self: any | undefined; +declare var window: any | undefined; +declare var global: any | undefined; +var globalThis: any = (() => { + if (typeof globalThis !== "undefined") return globalThis; + if (typeof self !== "undefined") return self; + if (typeof window !== "undefined") return window; + if (typeof global !== "undefined") return global; + throw "Unable to locate global object"; +})(); + +const atob: (b64: string) => string = + globalThis.atob || (b64 => globalThis.Buffer.from(b64, "base64").toString("binary")); +function bytesFromBase64(b64: string): Uint8Array { + const bin = atob(b64); + const arr = new Uint8Array(bin.length); + for (let i = 0; i < bin.length; ++i) { + arr[i] = bin.charCodeAt(i); + } + return arr; +} + +const btoa: (bin: string) => string = + globalThis.btoa || (bin => globalThis.Buffer.from(bin, "binary").toString("base64")); +function base64FromBytes(arr: Uint8Array): string { + const bin: string[] = []; + for (const byte of arr) { + bin.push(String.fromCharCode(byte)); + } + return btoa(bin.join("")); +} + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; +export type DeepPartial = T extends Builtin + ? T + : T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray> + : T extends {} + ? { [K in keyof T]?: DeepPartial } + : Partial; + +function longToNumber(long: Long): number { + if (long.gt(Number.MAX_SAFE_INTEGER)) { + throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); + } + return long.toNumber(); +} + +if (_m0.util.Long !== Long) { + _m0.util.Long = Long as any; + _m0.configure(); +} From 79ba3bfae1fc22917459ea8561b9e0d0011cff49 Mon Sep 17 00:00:00 2001 From: gfichtenholt Date: Sun, 10 Apr 2022 16:29:51 -0700 Subject: [PATCH 11/11] small clean up before final push --- .../plugins/fluxv2/packages/v1alpha1/repo_integration_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go index 0e0c15eb28d..3dca1f5ac33 100644 --- a/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go +++ b/cmd/kubeapps-apis/plugins/fluxv2/packages/v1alpha1/repo_integration_test.go @@ -25,7 +25,7 @@ import ( // 1) kind cluster with flux deployed // 2) kubeapps apis apiserver service running with fluxv2 plug-in enabled, port forwarded to 8080, e.g. // kubectl -n kubeapps port-forward svc/kubeapps-internal-kubeappsapis 8080:8080 -// 3) run './kind-cluster-setup.sh deploy' once prior to these tests +// 3) run './kind-cluster-setup.sh deploy' from testdata dir once prior to these tests // this test is testing a scenario when a repo that takes a long time to index is added // and while the indexing is in progress this repo is deleted by another request.