diff --git a/packages/google-cloud-gkehub/README.md b/packages/google-cloud-gkehub/README.md index 28574f4ff22..7d257008baf 100644 --- a/packages/google-cloud-gkehub/README.md +++ b/packages/google-cloud-gkehub/README.md @@ -59,16 +59,49 @@ Samples are in the [`samples/`][homepage_samples] directory. Each sample's `READ | Sample | Source Code | | --------------------------- | --------------------------------- | | create feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_feature.js) | +| create fleet | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_fleet.js) | | create membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership.js) | +| create membership binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership_binding.js) | +| create membership r b a c role binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership_r_b_a_c_role_binding.js) | +| create scope | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_scope.js) | +| create scope namespace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_scope_namespace.js) | +| create scope r b a c role binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_scope_r_b_a_c_role_binding.js) | | delete feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_feature.js) | +| delete fleet | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_fleet.js) | | delete membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership.js) | +| delete membership binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership_binding.js) | +| delete membership r b a c role binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership_r_b_a_c_role_binding.js) | +| delete scope | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_scope.js) | +| delete scope namespace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_scope_namespace.js) | +| delete scope r b a c role binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_scope_r_b_a_c_role_binding.js) | | generate connect manifest | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.generate_connect_manifest.js) | +| generate membership r b a c role binding y a m l | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.generate_membership_r_b_a_c_role_binding_y_a_m_l.js) | | get feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_feature.js) | +| get fleet | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_fleet.js) | | get membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_membership.js) | +| get membership binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_membership_binding.js) | +| get membership r b a c role binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_membership_r_b_a_c_role_binding.js) | +| get scope | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_scope.js) | +| get scope namespace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_scope_namespace.js) | +| get scope r b a c role binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_scope_r_b_a_c_role_binding.js) | +| list bound memberships | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_bound_memberships.js) | | list features | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_features.js) | +| list fleets | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_fleets.js) | +| list membership bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_membership_bindings.js) | +| list membership r b a c role bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_membership_r_b_a_c_role_bindings.js) | | list memberships | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_memberships.js) | +| list permitted scopes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_permitted_scopes.js) | +| list scope namespaces | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_scope_namespaces.js) | +| list scope r b a c role bindings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_scope_r_b_a_c_role_bindings.js) | +| list scopes | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_scopes.js) | | update feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_feature.js) | +| update fleet | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_fleet.js) | | update membership | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_membership.js) | +| update membership binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_membership_binding.js) | +| update membership r b a c role binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_membership_r_b_a_c_role_binding.js) | +| update scope | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_scope.js) | +| update scope namespace | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_scope_namespace.js) | +| update scope r b a c role binding | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_scope_r_b_a_c_role_binding.js) | | cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata_google.cloud.gkehub.v1.json) | | create feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1alpha/gke_hub.create_feature.js) | | delete feature | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-gkehub/samples/generated/v1alpha/gke_hub.delete_feature.js) | diff --git a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/feature.proto b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/feature.proto index 42d299841c8..a45b19338aa 100644 --- a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/feature.proto +++ b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/feature.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/gkehub/v1/configmanagement/configmanagement.proto"; import "google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto"; +import "google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.GkeHub.V1"; @@ -30,7 +31,7 @@ option java_package = "com.google.cloud.gkehub.v1"; option php_namespace = "Google\\Cloud\\GkeHub\\V1"; option ruby_package = "Google::Cloud::GkeHub::V1"; -// Feature represents the settings and status of any Hub Feature. +// Feature represents the settings and status of any Fleet Feature. message Feature { option (google.api.resource) = { type: "gkehub.googleapis.com/Feature" @@ -41,22 +42,24 @@ message Feature { // `projects/*/locations/*/features/*`. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // GCP labels for this Feature. + // Labels for this Feature. map labels = 2; // Output only. State of the Feature resource itself. - FeatureResourceState resource_state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + FeatureResourceState resource_state = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. Hub-wide Feature configuration. If this Feature does not support any - // Hub-wide configuration, this field may be unused. + // Optional. Fleet-wide Feature configuration. If this Feature does not + // support any Fleet-wide configuration, this field may be unused. CommonFeatureSpec spec = 4 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Membership-specific configuration for this Feature. If this Feature does - // not support any per-Membership configuration, this field may be unused. + // Optional. Membership-specific configuration for this Feature. If this + // Feature does not support any per-Membership configuration, this field may + // be unused. // // The keys indicate which Membership the configuration is for, in the form: // - // projects/{p}/locations/{l}/memberships/{m} + // `projects/{p}/locations/{l}/memberships/{m}` // // Where {p} is the project, {l} is a valid location and {m} is a valid // Membership in this project at that location. {p} WILL match the Feature's @@ -68,9 +71,10 @@ message Feature { // ONE of the entries will be saved, with no guarantees as to which. For this // reason, it is recommended the same format be used for all entries when // mutating a Feature. - map membership_specs = 5 [(google.api.field_behavior) = OPTIONAL]; + map membership_specs = 5 + [(google.api.field_behavior) = OPTIONAL]; - // Output only. The Hub-wide Feature state. + // Output only. The Fleet-wide Feature state. CommonFeatureState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Membership-specific Feature status. If this Feature does @@ -78,26 +82,65 @@ message Feature { // // The keys indicate which Membership the state is for, in the form: // - // projects/{p}/locations/{l}/memberships/{m} + // `projects/{p}/locations/{l}/memberships/{m}` // // Where {p} is the project number, {l} is a valid location and {m} is a valid // Membership in this project at that location. {p} MUST match the Feature's // project number. - map membership_states = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + map membership_states = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. When the Feature resource was created. - google.protobuf.Timestamp create_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. When the Feature resource was last updated. - google.protobuf.Timestamp update_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 9 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. When the Feature resource was deleted. - google.protobuf.Timestamp delete_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Scope-specific configuration for this Feature. If this Feature + // does not support any per-Scope configuration, this field may be unused. + // + // The keys indicate which Scope the configuration is for, in the form: + // + // `projects/{p}/locations/global/scopes/{s}` + // + // Where {p} is the project, {s} is a valid Scope in this project. + // {p} WILL match the Feature's project. + // + // {p} will always be returned as the project number, but the project ID is + // also accepted during input. If the same Scope is specified in the map + // twice (using the project ID form, and the project number form), exactly + // ONE of the entries will be saved, with no guarantees as to which. For this + // reason, it is recommended the same format be used for all entries when + // mutating a Feature. + map scope_specs = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Scope-specific Feature status. If this Feature does + // report any per-Scope status, this field may be unused. + // + // The keys indicate which Scope the state is for, in the form: + // + // `projects/{p}/locations/global/scopes/{s}` + // + // Where {p} is the project, {s} is a valid Scope in this project. + // {p} WILL match the Feature's project. + map scope_states = 13 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. List of locations that could not be reached while fetching + // this feature. + repeated string unreachable = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; } // FeatureResourceState describes the state of a Feature *resource* in the // GkeHub API. See `FeatureState` for the "running state" of the Feature in the -// Hub and across Memberships. +// Fleet and across Memberships. message FeatureResourceState { // State describes the lifecycle status of a Feature. enum State { @@ -105,14 +148,14 @@ message FeatureResourceState { STATE_UNSPECIFIED = 0; // The Feature is being enabled, and the Feature resource is being created. - // Once complete, the corresponding Feature will be enabled in this Hub. + // Once complete, the corresponding Feature will be enabled in this Fleet. ENABLING = 1; - // The Feature is enabled in this Hub, and the Feature resource is fully + // The Feature is enabled in this Fleet, and the Feature resource is fully // available. ACTIVE = 2; - // The Feature is being disabled in this Hub, and the Feature resource + // The Feature is being disabled in this Fleet, and the Feature resource // is being deleted. DISABLING = 3; @@ -166,13 +209,29 @@ message FeatureState { message CommonFeatureSpec { oneof feature_spec { // Multicluster Ingress-specific spec. - google.cloud.gkehub.multiclusteringress.v1.FeatureSpec multiclusteringress = 102; + google.cloud.gkehub.multiclusteringress.v1.FeatureSpec multiclusteringress = + 102; } } -// CommonFeatureState contains Hub-wide Feature status information. +// CommonFeatureState contains Fleet-wide Feature status information. message CommonFeatureState { - // Output only. The "running state" of the Feature in this Hub. + oneof feature_state { + // RBAC Role Binding Actuation feature state + google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState + rbacrolebindingactuation = 120; + } + + // Output only. The "running state" of the Feature in this Fleet. + FeatureState state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// ScopeFeatureSpec contains feature specs for a fleet scope. +message ScopeFeatureSpec {} + +// ScopeFeatureState contains Scope-wide Feature status information. +message ScopeFeatureState { + // Output only. The "running state" of the Feature in this Scope. FeatureState state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } @@ -181,7 +240,8 @@ message CommonFeatureState { message MembershipFeatureSpec { oneof feature_spec { // Config Management-specific spec. - google.cloud.gkehub.configmanagement.v1.MembershipSpec configmanagement = 106; + google.cloud.gkehub.configmanagement.v1.MembershipSpec configmanagement = + 106; } } @@ -190,7 +250,8 @@ message MembershipFeatureSpec { message MembershipFeatureState { oneof feature_state { // Config Management-specific state. - google.cloud.gkehub.configmanagement.v1.MembershipState configmanagement = 106; + google.cloud.gkehub.configmanagement.v1.MembershipState configmanagement = + 106; } // The high-level state of this Feature for a single membership. diff --git a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/fleet.proto b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/fleet.proto new file mode 100644 index 00000000000..0d11cb80fb5 --- /dev/null +++ b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/fleet.proto @@ -0,0 +1,538 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkehub.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.GkeHub.V1"; +option go_package = "cloud.google.com/go/gkehub/apiv1/gkehubpb;gkehubpb"; +option java_multiple_files = true; +option java_outer_classname = "FleetProto"; +option java_package = "com.google.cloud.gkehub.v1"; +option php_namespace = "Google\\Cloud\\GkeHub\\V1"; +option ruby_package = "Google::Cloud::GkeHub::V1"; + +// Fleet contains the Fleet-wide metadata and configuration. +message Fleet { + option (google.api.resource) = { + type: "gkehub.googleapis.com/Fleet" + pattern: "projects/{project}/locations/{location}/fleets/{fleet}" + pattern: "organizations/{organization}/locations/{location}/fleets/{fleet}" + }; + + // Output only. The full, unique resource name of this fleet in the format of + // `projects/{project}/locations/{location}/fleets/{fleet}`. + // + // Each Google Cloud project can have at most one fleet resource, named + // "default". + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. A user-assigned display name of the Fleet. + // When present, it must be between 4 to 30 characters. + // Allowed characters are: lowercase and uppercase letters, numbers, + // hyphen, single-quote, double-quote, space, and exclamation point. + // + // Example: `Production Fleet` + string display_name = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. When the Fleet was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the Fleet was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the Fleet was deleted. + google.protobuf.Timestamp delete_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Google-generated UUID for this resource. This is unique across + // all Fleet resources. If a Fleet resource is deleted and another resource + // with the same name is created, it gets a different uid. + string uid = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the namespace resource. + FleetLifecycleState state = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The default cluster configurations to apply across the fleet. + DefaultClusterConfig default_cluster_config = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels for this Fleet. + map labels = 11 [(google.api.field_behavior) = OPTIONAL]; +} + +// DefaultClusterConfig describes the default cluster configurations to be +// applied to all clusters born-in-fleet. +message DefaultClusterConfig { + // Enable/Disable Security Posture features for the cluster. + SecurityPostureConfig security_posture_config = 1; + + // Optional. Enable/Disable binary authorization features for the cluster. + BinaryAuthorizationConfig binary_authorization_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Enable/Disable Compliance Posture features for the cluster. + // Note that on UpdateFleet, only full replacement of this field is allowed. + // Users are not allowed for partial updates through field mask. + CompliancePostureConfig compliance_posture_config = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// SecurityPostureConfig defines the flags needed to enable/disable features for +// the Security Posture API. +message SecurityPostureConfig { + // Mode defines enablement mode for GKE Security posture features. + enum Mode { + // Default value not specified. + MODE_UNSPECIFIED = 0; + + // Disables Security Posture features on the cluster. + DISABLED = 1; + + // Applies Security Posture features on the cluster. + BASIC = 2; + + // Applies the Security Posture off cluster Enterprise level features. + ENTERPRISE = 3; + } + + // VulnerabilityMode defines enablement mode for vulnerability scanning. + enum VulnerabilityMode { + // Default value not specified. + VULNERABILITY_MODE_UNSPECIFIED = 0; + + // Disables vulnerability scanning on the cluster. + VULNERABILITY_DISABLED = 1; + + // Applies basic vulnerability scanning on the cluster. + VULNERABILITY_BASIC = 2; + + // Applies the Security Posture's vulnerability on cluster Enterprise level + // features. + VULNERABILITY_ENTERPRISE = 3; + } + + // Sets which mode to use for Security Posture features. + Mode mode = 1; + + // Sets which mode to use for vulnerability scanning. + VulnerabilityMode vulnerability_mode = 2; +} + +// BinaryAuthorizationConfig defines the fleet level configuration of binary +// authorization feature. +message BinaryAuthorizationConfig { + // Binauthz policy that applies to this cluster. + message PolicyBinding { + // The relative resource name of the binauthz platform policy to audit. GKE + // platform policies have the following format: + // `projects/{project_number}/platforms/gke/policies/{policy_id}`. + string name = 1; + } + + // Binary Authorization mode of operation. + enum EvaluationMode { + // Default value + EVALUATION_MODE_UNSPECIFIED = 0; + + // Disable BinaryAuthorization + DISABLED = 1; + + // Use Binary Authorization with the policies specified in policy_bindings. + POLICY_BINDINGS = 2; + } + + // Optional. Mode of operation for binauthz policy evaluation. + EvaluationMode evaluation_mode = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Binauthz policies that apply to this cluster. + repeated PolicyBinding policy_bindings = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// CompliancePostureConfig defines the settings needed to enable/disable +// features for the Compliance Posture. +message CompliancePostureConfig { + message ComplianceStandard { + // Name of the compliance standard. + string standard = 1; + } + + enum Mode { + // Default value not specified. + MODE_UNSPECIFIED = 0; + + // Disables Compliance Posture features on the cluster. + DISABLED = 1; + + // Enables Compliance Posture features on the cluster. + ENABLED = 2; + } + + // Defines the enablement mode for Compliance Posture. + Mode mode = 1; + + // List of enabled compliance standards. + repeated ComplianceStandard compliance_standards = 2; +} + +// FleetLifecycleState describes the state of a Fleet resource. +message FleetLifecycleState { + // Code describes the state of a Fleet resource. + enum Code { + // The code is not set. + CODE_UNSPECIFIED = 0; + + // The fleet is being created. + CREATING = 1; + + // The fleet active. + READY = 2; + + // The fleet is being deleted. + DELETING = 3; + + // The fleet is being updated. + UPDATING = 4; + } + + // Output only. The current state of the Fleet resource. + Code code = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Namespace represents a namespace across the Fleet +message Namespace { + option (google.api.resource) = { + type: "gkehub.googleapis.com/Namespace" + pattern: "projects/{project}/locations/{location}/scopes/{scope}/namespaces/{namespace}" + }; + + // The resource name for the namespace + // `projects/{project}/locations/{location}/namespaces/{namespace}` + string name = 1; + + // Output only. Google-generated UUID for this resource. This is unique across + // all namespace resources. If a namespace resource is deleted and another + // resource with the same name is created, it gets a different uid. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the namespace was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the namespace was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the namespace was deleted. + google.protobuf.Timestamp delete_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the namespace resource. + NamespaceLifecycleState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Scope associated with the namespace + string scope = 8 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "gkehub.googleapis.com/Scope" } + ]; + + // Optional. Namespace-level cluster namespace labels. These labels are + // applied to the related namespace of the member clusters bound to the parent + // Scope. Scope-level labels (`namespace_labels` in the Fleet Scope + // resource) take precedence over Namespace-level labels if they share + // a key. Keys and values must be Kubernetes-conformant. + map namespace_labels = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels for this Namespace. + map labels = 10 [(google.api.field_behavior) = OPTIONAL]; +} + +// NamespaceLifecycleState describes the state of a Namespace resource. +message NamespaceLifecycleState { + // Code describes the state of a Namespace resource. + enum Code { + // The code is not set. + CODE_UNSPECIFIED = 0; + + // The namespace is being created. + CREATING = 1; + + // The namespace active. + READY = 2; + + // The namespace is being deleted. + DELETING = 3; + + // The namespace is being updated. + UPDATING = 4; + } + + // Output only. The current state of the Namespace resource. + Code code = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// RBACRoleBinding represents a rbacrolebinding across the Fleet +message RBACRoleBinding { + option (google.api.resource) = { + type: "gkehub.googleapis.com/RBACRoleBinding" + pattern: "projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}" + pattern: "projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}" + }; + + // Role is the type for Kubernetes roles + message Role { + // PredefinedRoles is an ENUM representation of the default Kubernetes Roles + enum PredefinedRoles { + // UNKNOWN + UNKNOWN = 0; + + // ADMIN has EDIT and RBAC permissions + ADMIN = 1; + + // EDIT can edit all resources except RBAC + EDIT = 2; + + // VIEW can only read resources + VIEW = 3; + + // ANTHOS_SUPPORT gives Google Support read-only access to a number of + // cluster resources. + ANTHOS_SUPPORT = 4; + } + + // predefined_role is the Kubernetes default role to use + PredefinedRoles predefined_role = 1; + + // Optional. custom_role is the name of a custom KubernetesClusterRole to + // use. + string custom_role = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Principal that is be authorized in the cluster (at least of one the oneof + // is required). Updating one will unset the other automatically. + oneof principal { + // user is the name of the user as seen by the kubernetes cluster, example + // "alice" or "alice@domain.tld" + string user = 7; + + // group is the group, as seen by the kubernetes cluster. + string group = 8; + } + + // The resource name for the rbacrolebinding + // `projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}` + // or + // `projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}` + string name = 1; + + // Output only. Google-generated UUID for this resource. This is unique across + // all rbacrolebinding resources. If a rbacrolebinding resource is deleted and + // another resource with the same name is created, it gets a different uid. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the rbacrolebinding was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the rbacrolebinding was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the rbacrolebinding was deleted. + google.protobuf.Timestamp delete_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the rbacrolebinding resource. + RBACRoleBindingLifecycleState state = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Role to bind to the principal + Role role = 9 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Labels for this RBACRolebinding. + map labels = 10 [(google.api.field_behavior) = OPTIONAL]; +} + +// RBACRoleBindingLifecycleState describes the state of a RbacRoleBinding +// resource. +message RBACRoleBindingLifecycleState { + // Code describes the state of a rbacrolebinding resource. + enum Code { + // The code is not set. + CODE_UNSPECIFIED = 0; + + // The rbacrolebinding is being created. + CREATING = 1; + + // The rbacrolebinding active. + READY = 2; + + // The rbacrolebinding is being deleted. + DELETING = 3; + + // The rbacrolebinding is being updated. + UPDATING = 4; + } + + // Output only. The current state of the rbacrolebinding resource. + Code code = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Scope represents a Scope in a Fleet. +message Scope { + option (google.api.resource) = { + type: "gkehub.googleapis.com/Scope" + pattern: "projects/{project}/locations/{location}/scopes/{scope}" + }; + + // The resource name for the scope + // `projects/{project}/locations/{location}/scopes/{scope}` + string name = 1; + + // Output only. Google-generated UUID for this resource. This is unique across + // all scope resources. If a scope resource is deleted and another resource + // with the same name is created, it gets a different uid. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the scope was created. + google.protobuf.Timestamp create_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the scope was last updated. + google.protobuf.Timestamp update_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the scope was deleted. + google.protobuf.Timestamp delete_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the scope resource. + ScopeLifecycleState state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Scope-level cluster namespace labels. For the member clusters + // bound to the Scope, these labels are applied to each namespace under the + // Scope. Scope-level labels take precedence over Namespace-level + // labels (`namespace_labels` in the Fleet Namespace resource) if they + // share a key. Keys and values must be Kubernetes-conformant. + map namespace_labels = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Labels for this Scope. + map labels = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// ScopeLifecycleState describes the state of a Scope resource. +message ScopeLifecycleState { + // Code describes the state of a Scope resource. + enum Code { + // The code is not set. + CODE_UNSPECIFIED = 0; + + // The scope is being created. + CREATING = 1; + + // The scope active. + READY = 2; + + // The scope is being deleted. + DELETING = 3; + + // The scope is being updated. + UPDATING = 4; + } + + // Output only. The current state of the scope resource. + Code code = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// MembershipBinding is a subresource of a Membership, representing +// what Fleet Scopes (or other, future Fleet resources) a Membership is bound +// to. +message MembershipBinding { + option (google.api.resource) = { + type: "gkehub.googleapis.com/MembershipBinding" + pattern: "projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}" + }; + + // What type of membershipbinding this is. + oneof target { + // A Scope resource name in the format + // `projects/*/locations/*/scopes/*`. + string scope = 3 [ + (google.api.resource_reference) = { type: "gkehub.googleapis.com/Scope" } + ]; + } + + // The resource name for the membershipbinding itself + // `projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}` + string name = 1; + + // Output only. Google-generated UUID for this resource. This is unique across + // all membershipbinding resources. If a membershipbinding resource is deleted + // and another resource with the same name is created, it gets a different + // uid. + string uid = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the membership binding was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the membership binding was last updated. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. When the membership binding was deleted. + google.protobuf.Timestamp delete_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. State of the membership binding resource. + MembershipBindingLifecycleState state = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Labels for this MembershipBinding. + map labels = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// MembershipBindingLifecycleState describes the state of a Binding resource. +message MembershipBindingLifecycleState { + // Code describes the state of a MembershipBinding resource. + enum Code { + // The code is not set. + CODE_UNSPECIFIED = 0; + + // The membershipbinding is being created. + CREATING = 1; + + // The membershipbinding active. + READY = 2; + + // The membershipbinding is being deleted. + DELETING = 3; + + // The membershipbinding is being updated. + UPDATING = 4; + } + + // Output only. The current state of the MembershipBinding resource. + Code code = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.proto b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.proto new file mode 100644 index 00000000000..678b440a53f --- /dev/null +++ b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.proto @@ -0,0 +1,40 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.gkehub.rbacrolebindingactuation.v1; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.GkeHub.RbacRoleBindingActuation.V1"; +option go_package = "cloud.google.com/go/gkehub/rbacrolebindingactuation/apiv1/rbacrolebindingactuationpb;rbacrolebindingactuationpb"; +option java_multiple_files = true; +option java_outer_classname = "RBACRoleBindingActuationProto"; +option java_package = "com.google.cloud.gkehub.rbacrolebindingactuation.v1"; +option php_namespace = "Google\\Cloud\\GkeHub\\RbacRoleBindingActuation\\V1"; +option ruby_package = "Google::Cloud::GkeHub::RbacRoleBindingActuation::V1"; + +// **RBAC RoleBinding Actuation**: The Hub-wide input for the +// RBACRoleBindingActuation feature. +message FeatureSpec { + // The list of allowed custom roles (ClusterRoles). If a ClusterRole is not + // part of this list, it cannot be used in a Scope RBACRoleBinding. If a + // ClusterRole in this list is in use, it cannot be removed from the list. + repeated string allowed_custom_roles = 2; +} + +// **RBAC RoleBinding Actuation**: An empty state left as an example Hub-wide +// Feature state. +message FeatureState {} diff --git a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/service.proto b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/service.proto index e9c729c7db6..82fd6d084c2 100644 --- a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/service.proto +++ b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -21,6 +21,7 @@ import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/cloud/gkehub/v1/feature.proto"; +import "google/cloud/gkehub/v1/fleet.proto"; import "google/cloud/gkehub/v1/membership.proto"; import "google/longrunning/operations.proto"; import "google/protobuf/field_mask.proto"; @@ -65,6 +66,16 @@ service GkeHub { option (google.api.method_signature) = "parent"; } + // Lists Memberships bound to a Scope. The response includes relevant + // Memberships from all regions. + rpc ListBoundMemberships(ListBoundMembershipsRequest) + returns (ListBoundMembershipsResponse) { + option (google.api.http) = { + get: "/v1/{scope_name=projects/*/locations/*/scopes/*}:listMemberships" + }; + option (google.api.method_signature) = "scope_name"; + } + // Lists Features in a given project and location. rpc ListFeatures(ListFeaturesRequest) returns (ListFeaturesResponse) { option (google.api.http) = { @@ -89,106 +100,877 @@ service GkeHub { option (google.api.method_signature) = "name"; } - // Creates a new Membership. - // - // **This is currently only supported for GKE clusters on Google Cloud**. - // To register other clusters, follow the instructions at - // https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. - rpc CreateMembership(CreateMembershipRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/memberships" - body: "resource" - }; - option (google.api.method_signature) = "parent,resource,membership_id"; - option (google.longrunning.operation_info) = { - response_type: "Membership" - metadata_type: "OperationMetadata" - }; - } + // Creates a new Membership. + // + // **This is currently only supported for GKE clusters on Google Cloud**. + // To register other clusters, follow the instructions at + // https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. + rpc CreateMembership(CreateMembershipRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/memberships" + body: "resource" + }; + option (google.api.method_signature) = "parent,resource,membership_id"; + option (google.longrunning.operation_info) = { + response_type: "Membership" + metadata_type: "OperationMetadata" + }; + } + + // Adds a new Feature. + rpc CreateFeature(CreateFeatureRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/features" + body: "resource" + }; + option (google.api.method_signature) = "parent,resource,feature_id"; + option (google.longrunning.operation_info) = { + response_type: "Feature" + metadata_type: "OperationMetadata" + }; + } + + // Removes a Membership. + // + // **This is currently only supported for GKE clusters on Google Cloud**. + // To unregister other clusters, follow the instructions at + // https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. + rpc DeleteMembership(DeleteMembershipRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/memberships/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Removes a Feature. + rpc DeleteFeature(DeleteFeatureRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/features/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Updates an existing Membership. + rpc UpdateMembership(UpdateMembershipRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/memberships/*}" + body: "resource" + }; + option (google.api.method_signature) = "name,resource,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Membership" + metadata_type: "OperationMetadata" + }; + } + + // Updates an existing Feature. + rpc UpdateFeature(UpdateFeatureRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/features/*}" + body: "resource" + }; + option (google.api.method_signature) = "name,resource,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Feature" + metadata_type: "OperationMetadata" + }; + } + + // Generates the manifest for deployment of the GKE connect agent. + // + // **This method is used internally by Google-provided libraries.** + // Most clients should not need to call this method directly. + rpc GenerateConnectManifest(GenerateConnectManifestRequest) + returns (GenerateConnectManifestResponse) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest" + }; + } + + // Creates a fleet. + rpc CreateFleet(CreateFleetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/fleets" + body: "fleet" + }; + option (google.api.method_signature) = "parent,fleet"; + option (google.longrunning.operation_info) = { + response_type: "Fleet" + metadata_type: "OperationMetadata" + }; + } + + // Returns the details of a fleet. + rpc GetFleet(GetFleetRequest) returns (Fleet) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/fleets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates a fleet. + rpc UpdateFleet(UpdateFleetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{fleet.name=projects/*/locations/*/fleets/*}" + body: "fleet" + }; + option (google.api.method_signature) = "fleet,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Fleet" + metadata_type: "OperationMetadata" + }; + } + + // Removes a Fleet. There must be no memberships remaining in the Fleet. + rpc DeleteFleet(DeleteFleetRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/fleets/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Returns all fleets within an organization or a project that the caller has + // access to. + rpc ListFleets(ListFleetsRequest) returns (ListFleetsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/fleets" + additional_bindings { + get: "/v1/{parent=organizations/*/locations/*}/fleets" + } + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the details of a fleet namespace. + rpc GetScopeNamespace(GetScopeNamespaceRequest) returns (Namespace) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a fleet namespace. + rpc CreateScopeNamespace(CreateScopeNamespaceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/scopes/*}/namespaces" + body: "scope_namespace" + }; + option (google.api.method_signature) = + "parent,scope_namespace,scope_namespace_id"; + option (google.longrunning.operation_info) = { + response_type: "Namespace" + metadata_type: "OperationMetadata" + }; + } + + // Updates a fleet namespace. + rpc UpdateScopeNamespace(UpdateScopeNamespaceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{scope_namespace.name=projects/*/locations/*/scopes/*/namespaces/*}" + body: "scope_namespace" + }; + option (google.api.method_signature) = "scope_namespace,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Namespace" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a fleet namespace. + rpc DeleteScopeNamespace(DeleteScopeNamespaceRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists fleet namespaces. + rpc ListScopeNamespaces(ListScopeNamespacesRequest) + returns (ListScopeNamespacesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/scopes/*}/namespaces" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the details of a Scope RBACRoleBinding. + rpc GetScopeRBACRoleBinding(GetScopeRBACRoleBindingRequest) + returns (RBACRoleBinding) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a Scope RBACRoleBinding. + rpc CreateScopeRBACRoleBinding(CreateScopeRBACRoleBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings" + body: "rbacrolebinding" + }; + option (google.api.method_signature) = + "parent,rbacrolebinding,rbacrolebinding_id"; + option (google.longrunning.operation_info) = { + response_type: "RBACRoleBinding" + metadata_type: "OperationMetadata" + }; + } + + // Updates a Scope RBACRoleBinding. + rpc UpdateScopeRBACRoleBinding(UpdateScopeRBACRoleBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{rbacrolebinding.name=projects/*/locations/*/scopes/*/rbacrolebindings/*}" + body: "rbacrolebinding" + }; + option (google.api.method_signature) = "rbacrolebinding,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "RBACRoleBinding" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a Scope RBACRoleBinding. + rpc DeleteScopeRBACRoleBinding(DeleteScopeRBACRoleBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists all Scope RBACRoleBindings. + rpc ListScopeRBACRoleBindings(ListScopeRBACRoleBindingsRequest) + returns (ListScopeRBACRoleBindingsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the details of a Scope. + rpc GetScope(GetScopeRequest) returns (Scope) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/scopes/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a Scope. + rpc CreateScope(CreateScopeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/scopes" + body: "scope" + }; + option (google.api.method_signature) = "parent,scope,scope_id"; + option (google.longrunning.operation_info) = { + response_type: "Scope" + metadata_type: "OperationMetadata" + }; + } + + // Updates a scopes. + rpc UpdateScope(UpdateScopeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{scope.name=projects/*/locations/*/scopes/*}" + body: "scope" + }; + option (google.api.method_signature) = "scope,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Scope" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a Scope. + rpc DeleteScope(DeleteScopeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/scopes/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists Scopes. + rpc ListScopes(ListScopesRequest) returns (ListScopesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/scopes" + }; + option (google.api.method_signature) = "parent"; + } + + // Lists permitted Scopes. + rpc ListPermittedScopes(ListPermittedScopesRequest) + returns (ListPermittedScopesResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/scopes:listPermitted" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the details of a MembershipBinding. + rpc GetMembershipBinding(GetMembershipBindingRequest) + returns (MembershipBinding) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/memberships/*/bindings/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a MembershipBinding. + rpc CreateMembershipBinding(CreateMembershipBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/memberships/*}/bindings" + body: "membership_binding" + }; + option (google.api.method_signature) = + "parent,membership_binding,membership_binding_id"; + option (google.longrunning.operation_info) = { + response_type: "MembershipBinding" + metadata_type: "OperationMetadata" + }; + } + + // Updates a MembershipBinding. + rpc UpdateMembershipBinding(UpdateMembershipBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{membership_binding.name=projects/*/locations/*/memberships/*/bindings/*}" + body: "membership_binding" + }; + option (google.api.method_signature) = "membership_binding,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "MembershipBinding" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a MembershipBinding. + rpc DeleteMembershipBinding(DeleteMembershipBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/memberships/*/bindings/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists MembershipBindings. + rpc ListMembershipBindings(ListMembershipBindingsRequest) + returns (ListMembershipBindingsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/memberships/*}/bindings" + }; + option (google.api.method_signature) = "parent"; + } + + // Returns the details of a Membership RBACRoleBinding. + rpc GetMembershipRBACRoleBinding(GetMembershipRBACRoleBindingRequest) + returns (RBACRoleBinding) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a Membership RBACRoleBinding. + rpc CreateMembershipRBACRoleBinding(CreateMembershipRBACRoleBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings" + body: "rbacrolebinding" + }; + option (google.api.method_signature) = + "parent,rbacrolebinding,rbacrolebinding_id"; + option (google.longrunning.operation_info) = { + response_type: "RBACRoleBinding" + metadata_type: "OperationMetadata" + }; + } + + // Updates a Membership RBACRoleBinding. + rpc UpdateMembershipRBACRoleBinding(UpdateMembershipRBACRoleBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{rbacrolebinding.name=projects/*/locations/*/memberships/*/rbacrolebindings/*}" + body: "rbacrolebinding" + }; + option (google.api.method_signature) = "rbacrolebinding,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "RBACRoleBinding" + metadata_type: "OperationMetadata" + }; + } + + // Deletes a Membership RBACRoleBinding. + rpc DeleteMembershipRBACRoleBinding(DeleteMembershipRBACRoleBindingRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Lists all Membership RBACRoleBindings. + rpc ListMembershipRBACRoleBindings(ListMembershipRBACRoleBindingsRequest) + returns (ListMembershipRBACRoleBindingsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings" + }; + option (google.api.method_signature) = "parent"; + } + + // Generates a YAML of the RBAC policies for the specified + // RoleBinding and its associated impersonation resources. + rpc GenerateMembershipRBACRoleBindingYAML( + GenerateMembershipRBACRoleBindingYAMLRequest) + returns (GenerateMembershipRBACRoleBindingYAMLResponse) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:generateMembershipRBACRoleBindingYAML" + body: "rbacrolebinding" + }; + } +} + +// Request message for the `GkeHub.GetNamespace` method. +message GetScopeNamespaceRequest { + // Required. The Namespace resource name in the format + // `projects/*/locations/*/scopes/*/namespaces/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkehub.googleapis.com/Namespace" + } + ]; +} + +// Request to create a fleet namespace. +message CreateScopeNamespaceRequest { + // Required. The parent (project and location) where the Namespace will be + // created. Specified in the format `projects/*/locations/*/scopes/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkehub.googleapis.com/Namespace" + } + ]; + + // Required. Client chosen ID for the Namespace. `namespace_id` must be a + // valid RFC 1123 compliant DNS label: + // + // 1. At most 63 characters in length + // 2. It must consist of lower case alphanumeric characters or `-` + // 3. It must start and end with an alphanumeric character + // + // Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + // with a maximum length of 63 characters. + string scope_namespace_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The fleet namespace to create. + Namespace scope_namespace = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update a fleet namespace. +message UpdateScopeNamespaceRequest { + // Required. A namespace with fields updated. The 'name' field in this + // namespace is used to identify the resource to update. Given 'updated' + // prefix to follow go/proto-best-practices-checkers#keyword_conflict + Namespace scope_namespace = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The fields to be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request to delete a fleet namespace. +message DeleteScopeNamespaceRequest { + // Required. The Namespace resource name in the format + // `projects/*/locations/*/scopes/*/namespaces/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkehub.googleapis.com/Namespace" + } + ]; +} + +// Request to list fleet namespaces. +message ListScopeNamespacesRequest { + // Required. The parent (project and location) where the Features will be + // listed. Specified in the format `projects/*/locations/*/scopes/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkehub.googleapis.com/Namespace" + } + ]; + + // Optional. When requesting a 'page' of resources, `page_size` specifies + // number of resources to return. If unspecified or set to 0, all resources + // will be returned. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token returned by previous call to `ListFeatures` which + // specifies the position in the list from where to continue listing the + // resources. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// List of fleet namespaces. +message ListScopeNamespacesResponse { + // The list of fleet namespaces + repeated Namespace scope_namespaces = 1; + + // A token to request the next page of resources from the + // `ListNamespaces` method. The value of an empty string means + // that there are no more resources to return. + string next_page_token = 2; +} + +// Request message for the `GkeHub.GetScopeRBACRoleBinding` method. +message GetScopeRBACRoleBindingRequest { + // Required. The RBACRoleBinding resource name in the format + // `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkehub.googleapis.com/RBACRoleBinding" + } + ]; +} + +// Request to create a rbacrolebindings. +message CreateScopeRBACRoleBindingRequest { + // Required. The parent (project and location) where the RBACRoleBinding will + // be created. Specified in the format `projects/*/locations/*/scopes/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkehub.googleapis.com/RBACRoleBinding" + } + ]; + + // Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + // must be a valid RFC 1123 compliant DNS label: + // + // 1. At most 63 characters in length + // 2. It must consist of lower case alphanumeric characters or `-` + // 3. It must start and end with an alphanumeric character + // + // Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + // with a maximum length of 63 characters. + string rbacrolebinding_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The rbacrolebindings to create. + RBACRoleBinding rbacrolebinding = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update a scope rbacrolebinding. +message UpdateScopeRBACRoleBindingRequest { + // Required. A rbacrolebinding with fields updated. The 'name' field in this + // rbacrolebinding is used to identify the resource to update. + RBACRoleBinding rbacrolebinding = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The fields to be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request to delete a Scope RBACRoleBinding. +message DeleteScopeRBACRoleBindingRequest { + // Required. The RBACRoleBinding resource name in the format + // `projects/*/locations/*/scopes/*/rbacrolebindings/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkehub.googleapis.com/RBACRoleBinding" + } + ]; +} + +// Request to list Scope RBACRoleBindings. +message ListScopeRBACRoleBindingsRequest { + // Required. The parent (project and location) where the Features will be + // listed. Specified in the format `projects/*/locations/*/scopes/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkehub.googleapis.com/RBACRoleBinding" + } + ]; + + // Optional. When requesting a 'page' of resources, `page_size` specifies + // number of resources to return. If unspecified or set to 0, all resources + // will be returned. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + // which specifies the position in the list from where to continue listing the + // resources. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// List of Scope RBACRoleBindings. +message ListScopeRBACRoleBindingsResponse { + // The list of Scope RBACRoleBindings. + repeated RBACRoleBinding rbacrolebindings = 1; + + // A token to request the next page of resources from the + // `ListScopeRBACRoleBindings` method. The value of an empty string means + // that there are no more resources to return. + string next_page_token = 2; +} + +// Request message for the `GkeHub.GetScope` method. +message GetScopeRequest { + // Required. The Scope resource name in the format + // `projects/*/locations/*/scopes/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "gkehub.googleapis.com/Scope" } + ]; +} + +// Request to create a Scope. +message CreateScopeRequest { + // Required. The parent (project and location) where the Scope will be + // created. Specified in the format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkehub.googleapis.com/Scope" + } + ]; + + // Required. Client chosen ID for the Scope. `scope_id` must be a + // ???? + string scope_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Scope to create. + Scope scope = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update a Scope. +message UpdateScopeRequest { + // Required. A Scope with fields updated. The 'name' field in this + // namespace is used to identify the resource to update. + Scope scope = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The fields to be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request to delete a Scope. +message DeleteScopeRequest { + // Required. The Scope resource name in the format + // `projects/*/locations/*/scopes/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "gkehub.googleapis.com/Scope" } + ]; +} + +// Request to list Scopes. +message ListScopesRequest { + // Required. The parent (project and location) where the Scope will be listed. + // Specified in the format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkehub.googleapis.com/Scope" + } + ]; + + // Optional. When requesting a 'page' of resources, `page_size` specifies + // number of resources to return. If unspecified or set to 0, all resources + // will be returned. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token returned by previous call to `ListScopes` which + // specifies the position in the list from where to continue listing the + // resources. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// List of Scopes. +message ListScopesResponse { + // The list of Scopes + repeated Scope scopes = 1; + + // A token to request the next page of resources from the + // `ListScopes` method. The value of an empty string means + // that there are no more resources to return. + string next_page_token = 2; +} + +// Request to list permitted Scopes. +message ListPermittedScopesRequest { + // Required. The parent (project and location) where the Scope will be listed. + // Specified in the format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkehub.googleapis.com/Scope" + } + ]; + + // Optional. When requesting a 'page' of resources, `page_size` specifies + // number of resources to return. If unspecified or set to 0, all resources + // will be returned. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token returned by previous call to `ListPermittedScopes` which + // specifies the position in the list from where to continue listing the + // resources. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// List of permitted Scopes. +message ListPermittedScopesResponse { + // The list of permitted Scopes + repeated Scope scopes = 1; + + // A token to request the next page of resources from the + // `ListPermittedScopes` method. The value of an empty string means + // that there are no more resources to return. + string next_page_token = 2; +} + +// Request message for the `GkeHub.GetMembershipBinding` method. +message GetMembershipBindingRequest { + // Required. The MembershipBinding resource name in the format + // `projects/*/locations/*/memberships/*/bindings/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkehub.googleapis.com/MembershipBinding" + } + ]; +} + +// Request to create a MembershipBinding. +message CreateMembershipBindingRequest { + // Required. The parent (project and location) where the MembershipBinding + // will be created. Specified in the format + // `projects/*/locations/*/memberships/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkehub.googleapis.com/MembershipBinding" + } + ]; + + // Required. The MembershipBinding to create. + MembershipBinding membership_binding = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The ID to use for the MembershipBinding. + string membership_binding_id = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update a MembershipBinding. +message UpdateMembershipBindingRequest { + // Required. The MembershipBinding object with fields updated. + MembershipBinding membership_binding = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The fields to be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request to delete a Binding. +message DeleteMembershipBindingRequest { + // Required. The MembershipBinding resource name in the format + // `projects/*/locations/*/memberships/*/bindings/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkehub.googleapis.com/MembershipBinding" + } + ]; +} + +// Request to list MembershipBinding. +message ListMembershipBindingsRequest { + // Required. The parent Membership for which the MembershipBindings will be + // listed. Specified in the format `projects/*/locations/*/memberships/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkehub.googleapis.com/MembershipBinding" + } + ]; - // Adds a new Feature. - rpc CreateFeature(CreateFeatureRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/features" - body: "resource" - }; - option (google.api.method_signature) = "parent,resource,feature_id"; - option (google.longrunning.operation_info) = { - response_type: "Feature" - metadata_type: "OperationMetadata" - }; - } + // Optional. When requesting a 'page' of resources, `page_size` specifies + // number of resources to return. If unspecified or set to 0, all resources + // will be returned. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - // Removes a Membership. - // - // **This is currently only supported for GKE clusters on Google Cloud**. - // To unregister other clusters, follow the instructions at - // https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. - rpc DeleteMembership(DeleteMembershipRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/memberships/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } + // Optional. Token returned by previous call to `ListMembershipBindings` which + // specifies the position in the list from where to continue listing the + // resources. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Removes a Feature. - rpc DeleteFeature(DeleteFeatureRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/features/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "OperationMetadata" - }; - } + // Optional. Lists MembershipBindings that match the filter expression, + // following the syntax outlined in https://google.aip.dev/160. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} - // Updates an existing Membership. - rpc UpdateMembership(UpdateMembershipRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{name=projects/*/locations/*/memberships/*}" - body: "resource" - }; - option (google.api.method_signature) = "name,resource,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Membership" - metadata_type: "OperationMetadata" - }; - } +// List of MembershipBindings. +message ListMembershipBindingsResponse { + // The list of membership_bindings + repeated MembershipBinding membership_bindings = 1; - // Updates an existing Feature. - rpc UpdateFeature(UpdateFeatureRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{name=projects/*/locations/*/features/*}" - body: "resource" - }; - option (google.api.method_signature) = "name,resource,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Feature" - metadata_type: "OperationMetadata" - }; - } + // A token to request the next page of resources from the + // `ListMembershipBindings` method. The value of an empty string means + // that there are no more resources to return. + string next_page_token = 2; - // Generates the manifest for deployment of the GKE connect agent. - // - // **This method is used internally by Google-provided libraries.** - // Most clients should not need to call this method directly. - rpc GenerateConnectManifest(GenerateConnectManifestRequest) - returns (GenerateConnectManifestResponse) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest" - }; - } + // List of locations that could not be reached while fetching this list. + repeated string unreachable = 3; } // Request message for `GkeHub.ListMemberships` method. @@ -240,6 +1022,140 @@ message ListMembershipsRequest { string order_by = 5 [(google.api.field_behavior) = OPTIONAL]; } +// Request message for the `GkeHub.GetMembershipRBACRoleBinding` method. +message GetMembershipRBACRoleBindingRequest { + // Required. The RBACRoleBinding resource name in the format + // `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkehub.googleapis.com/RBACRoleBinding" + } + ]; +} + +// Request to create a rbacrolebindings. +message CreateMembershipRBACRoleBindingRequest { + // Required. The parent (project and location) where the RBACRoleBinding will + // be created. Specified in the format `projects/*/locations/*/memberships/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkehub.googleapis.com/RBACRoleBinding" + } + ]; + + // Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + // must be a valid RFC 1123 compliant DNS label: + // + // 1. At most 63 characters in length + // 2. It must consist of lower case alphanumeric characters or `-` + // 3. It must start and end with an alphanumeric character + // + // Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + // with a maximum length of 63 characters. + string rbacrolebinding_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The rbacrolebindings to create. + RBACRoleBinding rbacrolebinding = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request to update a membership rbacrolebinding. +message UpdateMembershipRBACRoleBindingRequest { + // Required. A rbacrolebinding with fields updated. The 'name' field in this + // rbacrolebinding is used to identify the resource to update. + RBACRoleBinding rbacrolebinding = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The fields to be updated. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request to delete a Membership RBACRoleBinding. +message DeleteMembershipRBACRoleBindingRequest { + // Required. The RBACRoleBinding resource name in the format + // `projects/*/locations/*/memberships/*/rbacrolebindings/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "gkehub.googleapis.com/RBACRoleBinding" + } + ]; +} + +// Request to list Membership RBACRoleBindings. +message ListMembershipRBACRoleBindingsRequest { + // Required. The parent (project and location) where the Features will be + // listed. Specified in the format `projects/*/locations/*/memberships/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "gkehub.googleapis.com/RBACRoleBinding" + } + ]; + + // Optional. When requesting a 'page' of resources, `page_size` specifies + // number of resources to return. If unspecified or set to 0, all resources + // will be returned. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token returned by previous call to + // `ListMembershipRBACRoleBindings` which specifies the position in the list + // from where to continue listing the resources. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// List of Membership RBACRoleBindings. +message ListMembershipRBACRoleBindingsResponse { + // The list of Membership RBACRoleBindings. + repeated RBACRoleBinding rbacrolebindings = 1; + + // A token to request the next page of resources from the + // `ListMembershipRBACRoleBindings` method. The value of an empty string means + // that there are no more resources to return. + string next_page_token = 2; + + // List of locations that could not be reached while fetching this list. + repeated string unreachable = 3; +} + +// Request to generate a YAML of the RBAC policies for the specified +// RoleBinding and its associated impersonation resources. +message GenerateMembershipRBACRoleBindingYAMLRequest { + // Required. The parent (project and location) where the RBACRoleBinding will + // be created. Specified in the format `projects/*/locations/*/memberships/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + // Manually set the type to be the Membership resource type because the + // RBACRoleBinding is a child of the Membership resource and + // GenerateMembershipRBACRoleBindingYAM RPC should + // only be called with the membership resource parent. + type: "gkehub.googleapis.com/Membership" + } + ]; + + // Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + // must be a valid RFC 1123 compliant DNS label: + // + // 1. At most 63 characters in length + // 2. It must consist of lower case alphanumeric characters or `-` + // 3. It must start and end with an alphanumeric character + // + // Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + // with a maximum length of 63 characters. + string rbacrolebinding_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The rbacrolebindings to generate the YAML for. + RBACRoleBinding rbacrolebinding = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Response for GenerateRBACRoleBindingYAML. +message GenerateMembershipRBACRoleBindingYAMLResponse { + // a yaml text blob including the RBAC policies. + string role_bindings_yaml = 1; +} + // Response message for the `GkeHub.ListMemberships` method. message ListMembershipsResponse { // The list of matching Memberships. @@ -266,6 +1182,47 @@ message GetMembershipRequest { ]; } +// Request to list Memberships bound to a Scope. +message ListBoundMembershipsRequest { + // Required. Name of the Scope, in the format + // `projects/*/locations/global/scopes/*`, to which the Memberships are bound. + string scope_name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "gkehub.googleapis.com/Scope" } + ]; + + // Optional. Lists Memberships that match the filter expression, following the + // syntax outlined in https://google.aip.dev/160. Currently, filtering + // can be done only based on Memberships's `name`, `labels`, `create_time`, + // `update_time`, and `unique_id`. + string filter = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When requesting a 'page' of resources, `page_size` specifies + // number of resources to return. If unspecified or set to 0, all resources + // will be returned. Pagination is currently not supported; therefore, setting + // this field does not have any impact for now. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Token returned by previous call to `ListBoundMemberships` which + // specifies the position in the list from where to continue listing the + // resources. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// List of Memberships bound to a Scope. +message ListBoundMembershipsResponse { + // The list of Memberships bound to the given Scope. + repeated Membership memberships = 1; + + // List of locations that could not be reached while fetching this list. + repeated string unreachable = 2; + + // A token to request the next page of resources from the + // `ListBoundMemberships` method. The value of an empty string means that + // there are no more resources to return. + string next_page_token = 3; +} + // Request message for the `GkeHub.CreateMembership` method. message CreateMembershipRequest { // Required. The parent (project and location) where the Memberships will be @@ -491,6 +1448,12 @@ message ListFeaturesRequest { // One or more fields to compare and use to sort the output. // See https://google.aip.dev/132#ordering. string order_by = 5; + + // Optional. If set to true, the response will return partial results when + // some regions are unreachable and the unreachable field in Feature proto + // will be populated. If set to false, the request will fail when some regions + // are unreachable. + bool return_partial_success = 6 [(google.api.field_behavior) = OPTIONAL]; } // Response message for the `GkeHub.ListFeatures` method. @@ -511,6 +1474,12 @@ message GetFeatureRequest { string name = 1 [ (google.api.resource_reference) = { type: "gkehub.googleapis.com/Feature" } ]; + + // Optional. If set to true, the response will return partial results when + // some regions are unreachable and the unreachable field in Feature proto + // will be populated. If set to false, the request will fail when some regions + // are unreachable. + bool return_partial_success = 2 [(google.api.field_behavior) = OPTIONAL]; } // Request message for the `GkeHub.CreateFeature` method. @@ -527,7 +1496,7 @@ message CreateFeatureRequest { // The Feature resource to create. Feature resource = 3; - // Optional. A request ID to identify requests. Specify a unique request ID + // A request ID to identify requests. Specify a unique request ID // so that if you must retry your request, the server will know to ignore // the request if it has already been completed. The server will guarantee // that for at least 60 minutes after the first request. @@ -593,7 +1562,7 @@ message UpdateFeatureRequest { // user-modifiable fields to match `resource`. Feature resource = 3; - // Optional. A request ID to identify requests. Specify a unique request ID + // A request ID to identify requests. Specify a unique request ID // so that if you must retry your request, the server will know to ignore // the request if it has already been completed. The server will guarantee // that for at least 60 minutes after the first request. @@ -609,6 +1578,97 @@ message UpdateFeatureRequest { string request_id = 4; } +// Request message for the `GkeHub.CreateFleet` method. +message CreateFleetRequest { + // Required. The parent (project and location) where the Fleet will be + // created. Specified in the format `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + // Manually set the type to "locations.googleapis.com/Location" because + // the generated child_type - `gkehub.googleapis.com/Fleet` creates a + // conflict between Organization and Project Level locations with client + // library generation. + type: "locations.googleapis.com/Location", + } + ]; + + // Required. The fleet to create. + Fleet fleet = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for the `GkeHub.GetFleet` method. +message GetFleetRequest { + // Required. The Fleet resource name in the format + // `projects/*/locations/*/fleets/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "gkehub.googleapis.com/Fleet" } + ]; +} + +// Request message for the `GkeHub.UpdateFleet` method. +message UpdateFleetRequest { + // Required. The Fleet to update. + // + // The `name` field of the Fleet object identifies which fleet will be + // updated. + Fleet fleet = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The fields to be updated; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for `GkeHub.DeleteFleet` method. +message DeleteFleetRequest { + // Required. The Fleet resource name in the format + // `projects/*/locations/*/fleets/*`. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "gkehub.googleapis.com/Fleet" } + ]; +} + +// Request message for the `GkeHub.ListFleets` method. +message ListFleetsRequest { + // Required. The organization or project to list for Fleets under, in the + // format `organizations/*/locations/*` or `projects/*/locations/*`. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + // Manually set the type to "locations.googleapis.com/Location" because + // the generated child_type - `gkehub.googleapis.com/Fleet` creates a + // conflict between Organization and Project Level locations with client + // library generation. + type: "locations.googleapis.com/Location", + } + ]; + + // Optional. A page token, received from a previous `ListFleets` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListFleets` must match + // the call that provided the page token. + string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of fleets to return. The service may return + // fewer than this value. If unspecified, at most 200 fleets will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for the `GkeHub.ListFleetsResponse` method. +message ListFleetsResponse { + // The list of matching fleets. + repeated Fleet fleets = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + // The token is only valid for 1h. + string next_page_token = 2; +} + // Represents the metadata of the long-running operation. message OperationMetadata { // Output only. The time the operation was created. @@ -630,9 +1690,10 @@ message OperationMetadata { // Output only. Identifies whether the user has requested cancellation // of the operation. Operations that have successfully been cancelled - // have [Operation.error][] value with a - // [google.rpc.Status.code][google.rpc.Status.code] of 1, corresponding to - // `Code.CANCELLED`. + // have + // [google.longrunning.Operation.error][google.longrunning.Operation.error] + // value with a [google.rpc.Status.code][google.rpc.Status.code] of 1, + // corresponding to `Code.CANCELLED`. bool cancel_requested = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. API version used to start the operation. diff --git a/packages/google-cloud-gkehub/protos/protos.d.ts b/packages/google-cloud-gkehub/protos/protos.d.ts index 27d79adbfe6..8510dd18ed0 100644 --- a/packages/google-cloud-gkehub/protos/protos.d.ts +++ b/packages/google-cloud-gkehub/protos/protos.d.ts @@ -13750,6 +13750,15 @@ export namespace google { /** Feature deleteTime */ deleteTime?: (google.protobuf.ITimestamp|null); + + /** Feature scopeSpecs */ + scopeSpecs?: ({ [k: string]: google.cloud.gkehub.v1.IScopeFeatureSpec }|null); + + /** Feature scopeStates */ + scopeStates?: ({ [k: string]: google.cloud.gkehub.v1.IScopeFeatureState }|null); + + /** Feature unreachable */ + unreachable?: (string[]|null); } /** Represents a Feature. */ @@ -13791,6 +13800,15 @@ export namespace google { /** Feature deleteTime. */ public deleteTime?: (google.protobuf.ITimestamp|null); + /** Feature scopeSpecs. */ + public scopeSpecs: { [k: string]: google.cloud.gkehub.v1.IScopeFeatureSpec }; + + /** Feature scopeStates. */ + public scopeStates: { [k: string]: google.cloud.gkehub.v1.IScopeFeatureState }; + + /** Feature unreachable. */ + public unreachable: string[]; + /** * Creates a new Feature instance using the specified properties. * @param [properties] Properties to set @@ -14202,6 +14220,9 @@ export namespace google { /** Properties of a CommonFeatureState. */ interface ICommonFeatureState { + /** CommonFeatureState rbacrolebindingactuation */ + rbacrolebindingactuation?: (google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureState|null); + /** CommonFeatureState state */ state?: (google.cloud.gkehub.v1.IFeatureState|null); } @@ -14215,9 +14236,15 @@ export namespace google { */ constructor(properties?: google.cloud.gkehub.v1.ICommonFeatureState); + /** CommonFeatureState rbacrolebindingactuation. */ + public rbacrolebindingactuation?: (google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureState|null); + /** CommonFeatureState state. */ public state?: (google.cloud.gkehub.v1.IFeatureState|null); + /** CommonFeatureState featureState. */ + public featureState?: "rbacrolebindingactuation"; + /** * Creates a new CommonFeatureState instance using the specified properties. * @param [properties] Properties to set @@ -14296,6 +14323,194 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ScopeFeatureSpec. */ + interface IScopeFeatureSpec { + } + + /** Represents a ScopeFeatureSpec. */ + class ScopeFeatureSpec implements IScopeFeatureSpec { + + /** + * Constructs a new ScopeFeatureSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IScopeFeatureSpec); + + /** + * Creates a new ScopeFeatureSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns ScopeFeatureSpec instance + */ + public static create(properties?: google.cloud.gkehub.v1.IScopeFeatureSpec): google.cloud.gkehub.v1.ScopeFeatureSpec; + + /** + * Encodes the specified ScopeFeatureSpec message. Does not implicitly {@link google.cloud.gkehub.v1.ScopeFeatureSpec.verify|verify} messages. + * @param message ScopeFeatureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IScopeFeatureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScopeFeatureSpec message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ScopeFeatureSpec.verify|verify} messages. + * @param message ScopeFeatureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IScopeFeatureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScopeFeatureSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScopeFeatureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ScopeFeatureSpec; + + /** + * Decodes a ScopeFeatureSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScopeFeatureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ScopeFeatureSpec; + + /** + * Verifies a ScopeFeatureSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScopeFeatureSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScopeFeatureSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ScopeFeatureSpec; + + /** + * Creates a plain object from a ScopeFeatureSpec message. Also converts values to other types if specified. + * @param message ScopeFeatureSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ScopeFeatureSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScopeFeatureSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScopeFeatureSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ScopeFeatureState. */ + interface IScopeFeatureState { + + /** ScopeFeatureState state */ + state?: (google.cloud.gkehub.v1.IFeatureState|null); + } + + /** Represents a ScopeFeatureState. */ + class ScopeFeatureState implements IScopeFeatureState { + + /** + * Constructs a new ScopeFeatureState. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IScopeFeatureState); + + /** ScopeFeatureState state. */ + public state?: (google.cloud.gkehub.v1.IFeatureState|null); + + /** + * Creates a new ScopeFeatureState instance using the specified properties. + * @param [properties] Properties to set + * @returns ScopeFeatureState instance + */ + public static create(properties?: google.cloud.gkehub.v1.IScopeFeatureState): google.cloud.gkehub.v1.ScopeFeatureState; + + /** + * Encodes the specified ScopeFeatureState message. Does not implicitly {@link google.cloud.gkehub.v1.ScopeFeatureState.verify|verify} messages. + * @param message ScopeFeatureState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IScopeFeatureState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScopeFeatureState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ScopeFeatureState.verify|verify} messages. + * @param message ScopeFeatureState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IScopeFeatureState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScopeFeatureState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScopeFeatureState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ScopeFeatureState; + + /** + * Decodes a ScopeFeatureState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScopeFeatureState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ScopeFeatureState; + + /** + * Verifies a ScopeFeatureState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScopeFeatureState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScopeFeatureState + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ScopeFeatureState; + + /** + * Creates a plain object from a ScopeFeatureState message. Also converts values to other types if specified. + * @param message ScopeFeatureState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ScopeFeatureState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScopeFeatureState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScopeFeatureState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a MembershipFeatureSpec. */ interface IMembershipFeatureSpec { @@ -14502,1506 +14717,6934 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Membership. */ - interface IMembership { - - /** Membership endpoint */ - endpoint?: (google.cloud.gkehub.v1.IMembershipEndpoint|null); + /** Properties of a Fleet. */ + interface IFleet { - /** Membership name */ + /** Fleet name */ name?: (string|null); - /** Membership labels */ - labels?: ({ [k: string]: string }|null); - - /** Membership description */ - description?: (string|null); - - /** Membership state */ - state?: (google.cloud.gkehub.v1.IMembershipState|null); + /** Fleet displayName */ + displayName?: (string|null); - /** Membership createTime */ + /** Fleet createTime */ createTime?: (google.protobuf.ITimestamp|null); - /** Membership updateTime */ + /** Fleet updateTime */ updateTime?: (google.protobuf.ITimestamp|null); - /** Membership deleteTime */ + /** Fleet deleteTime */ deleteTime?: (google.protobuf.ITimestamp|null); - /** Membership externalId */ - externalId?: (string|null); - - /** Membership lastConnectionTime */ - lastConnectionTime?: (google.protobuf.ITimestamp|null); + /** Fleet uid */ + uid?: (string|null); - /** Membership uniqueId */ - uniqueId?: (string|null); + /** Fleet state */ + state?: (google.cloud.gkehub.v1.IFleetLifecycleState|null); - /** Membership authority */ - authority?: (google.cloud.gkehub.v1.IAuthority|null); + /** Fleet defaultClusterConfig */ + defaultClusterConfig?: (google.cloud.gkehub.v1.IDefaultClusterConfig|null); - /** Membership monitoringConfig */ - monitoringConfig?: (google.cloud.gkehub.v1.IMonitoringConfig|null); + /** Fleet labels */ + labels?: ({ [k: string]: string }|null); } - /** Represents a Membership. */ - class Membership implements IMembership { + /** Represents a Fleet. */ + class Fleet implements IFleet { /** - * Constructs a new Membership. + * Constructs a new Fleet. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IMembership); - - /** Membership endpoint. */ - public endpoint?: (google.cloud.gkehub.v1.IMembershipEndpoint|null); + constructor(properties?: google.cloud.gkehub.v1.IFleet); - /** Membership name. */ + /** Fleet name. */ public name: string; - /** Membership labels. */ - public labels: { [k: string]: string }; - - /** Membership description. */ - public description: string; - - /** Membership state. */ - public state?: (google.cloud.gkehub.v1.IMembershipState|null); + /** Fleet displayName. */ + public displayName: string; - /** Membership createTime. */ + /** Fleet createTime. */ public createTime?: (google.protobuf.ITimestamp|null); - /** Membership updateTime. */ + /** Fleet updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); - /** Membership deleteTime. */ + /** Fleet deleteTime. */ public deleteTime?: (google.protobuf.ITimestamp|null); - /** Membership externalId. */ - public externalId: string; - - /** Membership lastConnectionTime. */ - public lastConnectionTime?: (google.protobuf.ITimestamp|null); - - /** Membership uniqueId. */ - public uniqueId: string; + /** Fleet uid. */ + public uid: string; - /** Membership authority. */ - public authority?: (google.cloud.gkehub.v1.IAuthority|null); + /** Fleet state. */ + public state?: (google.cloud.gkehub.v1.IFleetLifecycleState|null); - /** Membership monitoringConfig. */ - public monitoringConfig?: (google.cloud.gkehub.v1.IMonitoringConfig|null); + /** Fleet defaultClusterConfig. */ + public defaultClusterConfig?: (google.cloud.gkehub.v1.IDefaultClusterConfig|null); - /** Membership type. */ - public type?: "endpoint"; + /** Fleet labels. */ + public labels: { [k: string]: string }; /** - * Creates a new Membership instance using the specified properties. + * Creates a new Fleet instance using the specified properties. * @param [properties] Properties to set - * @returns Membership instance + * @returns Fleet instance */ - public static create(properties?: google.cloud.gkehub.v1.IMembership): google.cloud.gkehub.v1.Membership; + public static create(properties?: google.cloud.gkehub.v1.IFleet): google.cloud.gkehub.v1.Fleet; /** - * Encodes the specified Membership message. Does not implicitly {@link google.cloud.gkehub.v1.Membership.verify|verify} messages. - * @param message Membership message or plain object to encode + * Encodes the specified Fleet message. Does not implicitly {@link google.cloud.gkehub.v1.Fleet.verify|verify} messages. + * @param message Fleet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IMembership, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IFleet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Membership message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Membership.verify|verify} messages. - * @param message Membership message or plain object to encode + * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Fleet.verify|verify} messages. + * @param message Fleet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IMembership, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IFleet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Membership message from the specified reader or buffer. + * Decodes a Fleet message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Membership + * @returns Fleet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.Membership; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.Fleet; /** - * Decodes a Membership message from the specified reader or buffer, length delimited. + * Decodes a Fleet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Membership + * @returns Fleet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.Membership; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.Fleet; /** - * Verifies a Membership message. + * Verifies a Fleet message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Membership message from a plain object. Also converts values to their respective internal types. + * Creates a Fleet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Membership + * @returns Fleet */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.Membership; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.Fleet; /** - * Creates a plain object from a Membership message. Also converts values to other types if specified. - * @param message Membership + * Creates a plain object from a Fleet message. Also converts values to other types if specified. + * @param message Fleet * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.Membership, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.Fleet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Membership to JSON. + * Converts this Fleet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Membership + * Gets the default type url for Fleet * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MembershipEndpoint. */ - interface IMembershipEndpoint { - - /** MembershipEndpoint gkeCluster */ - gkeCluster?: (google.cloud.gkehub.v1.IGkeCluster|null); + /** Properties of a DefaultClusterConfig. */ + interface IDefaultClusterConfig { - /** MembershipEndpoint kubernetesMetadata */ - kubernetesMetadata?: (google.cloud.gkehub.v1.IKubernetesMetadata|null); + /** DefaultClusterConfig securityPostureConfig */ + securityPostureConfig?: (google.cloud.gkehub.v1.ISecurityPostureConfig|null); - /** MembershipEndpoint kubernetesResource */ - kubernetesResource?: (google.cloud.gkehub.v1.IKubernetesResource|null); + /** DefaultClusterConfig binaryAuthorizationConfig */ + binaryAuthorizationConfig?: (google.cloud.gkehub.v1.IBinaryAuthorizationConfig|null); - /** MembershipEndpoint googleManaged */ - googleManaged?: (boolean|null); + /** DefaultClusterConfig compliancePostureConfig */ + compliancePostureConfig?: (google.cloud.gkehub.v1.ICompliancePostureConfig|null); } - /** Represents a MembershipEndpoint. */ - class MembershipEndpoint implements IMembershipEndpoint { + /** Represents a DefaultClusterConfig. */ + class DefaultClusterConfig implements IDefaultClusterConfig { /** - * Constructs a new MembershipEndpoint. + * Constructs a new DefaultClusterConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IMembershipEndpoint); + constructor(properties?: google.cloud.gkehub.v1.IDefaultClusterConfig); - /** MembershipEndpoint gkeCluster. */ - public gkeCluster?: (google.cloud.gkehub.v1.IGkeCluster|null); - - /** MembershipEndpoint kubernetesMetadata. */ - public kubernetesMetadata?: (google.cloud.gkehub.v1.IKubernetesMetadata|null); + /** DefaultClusterConfig securityPostureConfig. */ + public securityPostureConfig?: (google.cloud.gkehub.v1.ISecurityPostureConfig|null); - /** MembershipEndpoint kubernetesResource. */ - public kubernetesResource?: (google.cloud.gkehub.v1.IKubernetesResource|null); + /** DefaultClusterConfig binaryAuthorizationConfig. */ + public binaryAuthorizationConfig?: (google.cloud.gkehub.v1.IBinaryAuthorizationConfig|null); - /** MembershipEndpoint googleManaged. */ - public googleManaged: boolean; + /** DefaultClusterConfig compliancePostureConfig. */ + public compliancePostureConfig?: (google.cloud.gkehub.v1.ICompliancePostureConfig|null); /** - * Creates a new MembershipEndpoint instance using the specified properties. + * Creates a new DefaultClusterConfig instance using the specified properties. * @param [properties] Properties to set - * @returns MembershipEndpoint instance + * @returns DefaultClusterConfig instance */ - public static create(properties?: google.cloud.gkehub.v1.IMembershipEndpoint): google.cloud.gkehub.v1.MembershipEndpoint; + public static create(properties?: google.cloud.gkehub.v1.IDefaultClusterConfig): google.cloud.gkehub.v1.DefaultClusterConfig; /** - * Encodes the specified MembershipEndpoint message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipEndpoint.verify|verify} messages. - * @param message MembershipEndpoint message or plain object to encode + * Encodes the specified DefaultClusterConfig message. Does not implicitly {@link google.cloud.gkehub.v1.DefaultClusterConfig.verify|verify} messages. + * @param message DefaultClusterConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IMembershipEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IDefaultClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MembershipEndpoint message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipEndpoint.verify|verify} messages. - * @param message MembershipEndpoint message or plain object to encode + * Encodes the specified DefaultClusterConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DefaultClusterConfig.verify|verify} messages. + * @param message DefaultClusterConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IMembershipEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IDefaultClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MembershipEndpoint message from the specified reader or buffer. + * Decodes a DefaultClusterConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MembershipEndpoint + * @returns DefaultClusterConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.MembershipEndpoint; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.DefaultClusterConfig; /** - * Decodes a MembershipEndpoint message from the specified reader or buffer, length delimited. + * Decodes a DefaultClusterConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MembershipEndpoint + * @returns DefaultClusterConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.MembershipEndpoint; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.DefaultClusterConfig; /** - * Verifies a MembershipEndpoint message. + * Verifies a DefaultClusterConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MembershipEndpoint message from a plain object. Also converts values to their respective internal types. + * Creates a DefaultClusterConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MembershipEndpoint + * @returns DefaultClusterConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.MembershipEndpoint; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.DefaultClusterConfig; /** - * Creates a plain object from a MembershipEndpoint message. Also converts values to other types if specified. - * @param message MembershipEndpoint + * Creates a plain object from a DefaultClusterConfig message. Also converts values to other types if specified. + * @param message DefaultClusterConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.MembershipEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.DefaultClusterConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MembershipEndpoint to JSON. + * Converts this DefaultClusterConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MembershipEndpoint + * Gets the default type url for DefaultClusterConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a KubernetesResource. */ - interface IKubernetesResource { - - /** KubernetesResource membershipCrManifest */ - membershipCrManifest?: (string|null); - - /** KubernetesResource membershipResources */ - membershipResources?: (google.cloud.gkehub.v1.IResourceManifest[]|null); + /** Properties of a SecurityPostureConfig. */ + interface ISecurityPostureConfig { - /** KubernetesResource connectResources */ - connectResources?: (google.cloud.gkehub.v1.IResourceManifest[]|null); + /** SecurityPostureConfig mode */ + mode?: (google.cloud.gkehub.v1.SecurityPostureConfig.Mode|keyof typeof google.cloud.gkehub.v1.SecurityPostureConfig.Mode|null); - /** KubernetesResource resourceOptions */ - resourceOptions?: (google.cloud.gkehub.v1.IResourceOptions|null); + /** SecurityPostureConfig vulnerabilityMode */ + vulnerabilityMode?: (google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode|null); } - /** Represents a KubernetesResource. */ - class KubernetesResource implements IKubernetesResource { + /** Represents a SecurityPostureConfig. */ + class SecurityPostureConfig implements ISecurityPostureConfig { /** - * Constructs a new KubernetesResource. + * Constructs a new SecurityPostureConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IKubernetesResource); - - /** KubernetesResource membershipCrManifest. */ - public membershipCrManifest: string; + constructor(properties?: google.cloud.gkehub.v1.ISecurityPostureConfig); - /** KubernetesResource membershipResources. */ - public membershipResources: google.cloud.gkehub.v1.IResourceManifest[]; - - /** KubernetesResource connectResources. */ - public connectResources: google.cloud.gkehub.v1.IResourceManifest[]; + /** SecurityPostureConfig mode. */ + public mode: (google.cloud.gkehub.v1.SecurityPostureConfig.Mode|keyof typeof google.cloud.gkehub.v1.SecurityPostureConfig.Mode); - /** KubernetesResource resourceOptions. */ - public resourceOptions?: (google.cloud.gkehub.v1.IResourceOptions|null); + /** SecurityPostureConfig vulnerabilityMode. */ + public vulnerabilityMode: (google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode); /** - * Creates a new KubernetesResource instance using the specified properties. + * Creates a new SecurityPostureConfig instance using the specified properties. * @param [properties] Properties to set - * @returns KubernetesResource instance + * @returns SecurityPostureConfig instance */ - public static create(properties?: google.cloud.gkehub.v1.IKubernetesResource): google.cloud.gkehub.v1.KubernetesResource; + public static create(properties?: google.cloud.gkehub.v1.ISecurityPostureConfig): google.cloud.gkehub.v1.SecurityPostureConfig; /** - * Encodes the specified KubernetesResource message. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesResource.verify|verify} messages. - * @param message KubernetesResource message or plain object to encode + * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.cloud.gkehub.v1.SecurityPostureConfig.verify|verify} messages. + * @param message SecurityPostureConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IKubernetesResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified KubernetesResource message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesResource.verify|verify} messages. - * @param message KubernetesResource message or plain object to encode + * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.SecurityPostureConfig.verify|verify} messages. + * @param message SecurityPostureConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IKubernetesResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a KubernetesResource message from the specified reader or buffer. + * Decodes a SecurityPostureConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns KubernetesResource + * @returns SecurityPostureConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.KubernetesResource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.SecurityPostureConfig; /** - * Decodes a KubernetesResource message from the specified reader or buffer, length delimited. + * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns KubernetesResource + * @returns SecurityPostureConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.KubernetesResource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.SecurityPostureConfig; /** - * Verifies a KubernetesResource message. + * Verifies a SecurityPostureConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a KubernetesResource message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns KubernetesResource + * @returns SecurityPostureConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.KubernetesResource; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.SecurityPostureConfig; /** - * Creates a plain object from a KubernetesResource message. Also converts values to other types if specified. - * @param message KubernetesResource + * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. + * @param message SecurityPostureConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.KubernetesResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.SecurityPostureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this KubernetesResource to JSON. + * Converts this SecurityPostureConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for KubernetesResource + * Gets the default type url for SecurityPostureConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ResourceOptions. */ - interface IResourceOptions { + namespace SecurityPostureConfig { - /** ResourceOptions connectVersion */ - connectVersion?: (string|null); + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + DISABLED = 1, + BASIC = 2, + ENTERPRISE = 3 + } - /** ResourceOptions v1beta1Crd */ - v1beta1Crd?: (boolean|null); + /** VulnerabilityMode enum. */ + enum VulnerabilityMode { + VULNERABILITY_MODE_UNSPECIFIED = 0, + VULNERABILITY_DISABLED = 1, + VULNERABILITY_BASIC = 2, + VULNERABILITY_ENTERPRISE = 3 + } + } - /** ResourceOptions k8sVersion */ - k8sVersion?: (string|null); + /** Properties of a BinaryAuthorizationConfig. */ + interface IBinaryAuthorizationConfig { - /** ResourceOptions k8sGitVersion */ - k8sGitVersion?: (string|null); + /** BinaryAuthorizationConfig evaluationMode */ + evaluationMode?: (google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode|keyof typeof google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode|null); + + /** BinaryAuthorizationConfig policyBindings */ + policyBindings?: (google.cloud.gkehub.v1.BinaryAuthorizationConfig.IPolicyBinding[]|null); } - /** Represents a ResourceOptions. */ - class ResourceOptions implements IResourceOptions { + /** Represents a BinaryAuthorizationConfig. */ + class BinaryAuthorizationConfig implements IBinaryAuthorizationConfig { /** - * Constructs a new ResourceOptions. + * Constructs a new BinaryAuthorizationConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IResourceOptions); - - /** ResourceOptions connectVersion. */ - public connectVersion: string; + constructor(properties?: google.cloud.gkehub.v1.IBinaryAuthorizationConfig); - /** ResourceOptions v1beta1Crd. */ - public v1beta1Crd: boolean; - - /** ResourceOptions k8sVersion. */ - public k8sVersion: string; + /** BinaryAuthorizationConfig evaluationMode. */ + public evaluationMode: (google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode|keyof typeof google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode); - /** ResourceOptions k8sGitVersion. */ - public k8sGitVersion: string; + /** BinaryAuthorizationConfig policyBindings. */ + public policyBindings: google.cloud.gkehub.v1.BinaryAuthorizationConfig.IPolicyBinding[]; /** - * Creates a new ResourceOptions instance using the specified properties. + * Creates a new BinaryAuthorizationConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceOptions instance + * @returns BinaryAuthorizationConfig instance */ - public static create(properties?: google.cloud.gkehub.v1.IResourceOptions): google.cloud.gkehub.v1.ResourceOptions; + public static create(properties?: google.cloud.gkehub.v1.IBinaryAuthorizationConfig): google.cloud.gkehub.v1.BinaryAuthorizationConfig; /** - * Encodes the specified ResourceOptions message. Does not implicitly {@link google.cloud.gkehub.v1.ResourceOptions.verify|verify} messages. - * @param message ResourceOptions message or plain object to encode + * Encodes the specified BinaryAuthorizationConfig message. Does not implicitly {@link google.cloud.gkehub.v1.BinaryAuthorizationConfig.verify|verify} messages. + * @param message BinaryAuthorizationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IResourceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IBinaryAuthorizationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceOptions message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ResourceOptions.verify|verify} messages. - * @param message ResourceOptions message or plain object to encode + * Encodes the specified BinaryAuthorizationConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.BinaryAuthorizationConfig.verify|verify} messages. + * @param message BinaryAuthorizationConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IResourceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IBinaryAuthorizationConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceOptions message from the specified reader or buffer. + * Decodes a BinaryAuthorizationConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceOptions + * @returns BinaryAuthorizationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ResourceOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.BinaryAuthorizationConfig; /** - * Decodes a ResourceOptions message from the specified reader or buffer, length delimited. + * Decodes a BinaryAuthorizationConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceOptions + * @returns BinaryAuthorizationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ResourceOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.BinaryAuthorizationConfig; /** - * Verifies a ResourceOptions message. + * Verifies a BinaryAuthorizationConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResourceOptions message from a plain object. Also converts values to their respective internal types. + * Creates a BinaryAuthorizationConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceOptions + * @returns BinaryAuthorizationConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ResourceOptions; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.BinaryAuthorizationConfig; /** - * Creates a plain object from a ResourceOptions message. Also converts values to other types if specified. - * @param message ResourceOptions + * Creates a plain object from a BinaryAuthorizationConfig message. Also converts values to other types if specified. + * @param message BinaryAuthorizationConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.ResourceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.BinaryAuthorizationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceOptions to JSON. + * Converts this BinaryAuthorizationConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceOptions + * Gets the default type url for BinaryAuthorizationConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ResourceManifest. */ - interface IResourceManifest { + namespace BinaryAuthorizationConfig { - /** ResourceManifest manifest */ - manifest?: (string|null); + /** Properties of a PolicyBinding. */ + interface IPolicyBinding { - /** ResourceManifest clusterScoped */ - clusterScoped?: (boolean|null); + /** PolicyBinding name */ + name?: (string|null); + } + + /** Represents a PolicyBinding. */ + class PolicyBinding implements IPolicyBinding { + + /** + * Constructs a new PolicyBinding. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.BinaryAuthorizationConfig.IPolicyBinding); + + /** PolicyBinding name. */ + public name: string; + + /** + * Creates a new PolicyBinding instance using the specified properties. + * @param [properties] Properties to set + * @returns PolicyBinding instance + */ + public static create(properties?: google.cloud.gkehub.v1.BinaryAuthorizationConfig.IPolicyBinding): google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding; + + /** + * Encodes the specified PolicyBinding message. Does not implicitly {@link google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding.verify|verify} messages. + * @param message PolicyBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.BinaryAuthorizationConfig.IPolicyBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PolicyBinding message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding.verify|verify} messages. + * @param message PolicyBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.BinaryAuthorizationConfig.IPolicyBinding, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PolicyBinding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PolicyBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding; + + /** + * Decodes a PolicyBinding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PolicyBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding; + + /** + * Verifies a PolicyBinding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PolicyBinding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PolicyBinding + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding; + + /** + * Creates a plain object from a PolicyBinding message. Also converts values to other types if specified. + * @param message PolicyBinding + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PolicyBinding to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PolicyBinding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** EvaluationMode enum. */ + enum EvaluationMode { + EVALUATION_MODE_UNSPECIFIED = 0, + DISABLED = 1, + POLICY_BINDINGS = 2 + } } - /** Represents a ResourceManifest. */ - class ResourceManifest implements IResourceManifest { + /** Properties of a CompliancePostureConfig. */ + interface ICompliancePostureConfig { + + /** CompliancePostureConfig mode */ + mode?: (google.cloud.gkehub.v1.CompliancePostureConfig.Mode|keyof typeof google.cloud.gkehub.v1.CompliancePostureConfig.Mode|null); + + /** CompliancePostureConfig complianceStandards */ + complianceStandards?: (google.cloud.gkehub.v1.CompliancePostureConfig.IComplianceStandard[]|null); + } + + /** Represents a CompliancePostureConfig. */ + class CompliancePostureConfig implements ICompliancePostureConfig { /** - * Constructs a new ResourceManifest. + * Constructs a new CompliancePostureConfig. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IResourceManifest); + constructor(properties?: google.cloud.gkehub.v1.ICompliancePostureConfig); - /** ResourceManifest manifest. */ - public manifest: string; + /** CompliancePostureConfig mode. */ + public mode: (google.cloud.gkehub.v1.CompliancePostureConfig.Mode|keyof typeof google.cloud.gkehub.v1.CompliancePostureConfig.Mode); - /** ResourceManifest clusterScoped. */ - public clusterScoped: boolean; + /** CompliancePostureConfig complianceStandards. */ + public complianceStandards: google.cloud.gkehub.v1.CompliancePostureConfig.IComplianceStandard[]; /** - * Creates a new ResourceManifest instance using the specified properties. + * Creates a new CompliancePostureConfig instance using the specified properties. * @param [properties] Properties to set - * @returns ResourceManifest instance + * @returns CompliancePostureConfig instance */ - public static create(properties?: google.cloud.gkehub.v1.IResourceManifest): google.cloud.gkehub.v1.ResourceManifest; + public static create(properties?: google.cloud.gkehub.v1.ICompliancePostureConfig): google.cloud.gkehub.v1.CompliancePostureConfig; /** - * Encodes the specified ResourceManifest message. Does not implicitly {@link google.cloud.gkehub.v1.ResourceManifest.verify|verify} messages. - * @param message ResourceManifest message or plain object to encode + * Encodes the specified CompliancePostureConfig message. Does not implicitly {@link google.cloud.gkehub.v1.CompliancePostureConfig.verify|verify} messages. + * @param message CompliancePostureConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IResourceManifest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.ICompliancePostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResourceManifest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ResourceManifest.verify|verify} messages. - * @param message ResourceManifest message or plain object to encode + * Encodes the specified CompliancePostureConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CompliancePostureConfig.verify|verify} messages. + * @param message CompliancePostureConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IResourceManifest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.ICompliancePostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResourceManifest message from the specified reader or buffer. + * Decodes a CompliancePostureConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResourceManifest + * @returns CompliancePostureConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ResourceManifest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.CompliancePostureConfig; /** - * Decodes a ResourceManifest message from the specified reader or buffer, length delimited. + * Decodes a CompliancePostureConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResourceManifest + * @returns CompliancePostureConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ResourceManifest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.CompliancePostureConfig; /** - * Verifies a ResourceManifest message. + * Verifies a CompliancePostureConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResourceManifest message from a plain object. Also converts values to their respective internal types. + * Creates a CompliancePostureConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResourceManifest + * @returns CompliancePostureConfig */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ResourceManifest; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.CompliancePostureConfig; /** - * Creates a plain object from a ResourceManifest message. Also converts values to other types if specified. - * @param message ResourceManifest + * Creates a plain object from a CompliancePostureConfig message. Also converts values to other types if specified. + * @param message CompliancePostureConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.ResourceManifest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.CompliancePostureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResourceManifest to JSON. + * Converts this CompliancePostureConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResourceManifest + * Gets the default type url for CompliancePostureConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GkeCluster. */ - interface IGkeCluster { - - /** GkeCluster resourceLink */ - resourceLink?: (string|null); + namespace CompliancePostureConfig { - /** GkeCluster clusterMissing */ - clusterMissing?: (boolean|null); - } + /** Properties of a ComplianceStandard. */ + interface IComplianceStandard { - /** Represents a GkeCluster. */ - class GkeCluster implements IGkeCluster { + /** ComplianceStandard standard */ + standard?: (string|null); + } - /** - * Constructs a new GkeCluster. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.gkehub.v1.IGkeCluster); + /** Represents a ComplianceStandard. */ + class ComplianceStandard implements IComplianceStandard { - /** GkeCluster resourceLink. */ - public resourceLink: string; + /** + * Constructs a new ComplianceStandard. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.CompliancePostureConfig.IComplianceStandard); - /** GkeCluster clusterMissing. */ - public clusterMissing: boolean; + /** ComplianceStandard standard. */ + public standard: string; - /** - * Creates a new GkeCluster instance using the specified properties. - * @param [properties] Properties to set - * @returns GkeCluster instance - */ - public static create(properties?: google.cloud.gkehub.v1.IGkeCluster): google.cloud.gkehub.v1.GkeCluster; + /** + * Creates a new ComplianceStandard instance using the specified properties. + * @param [properties] Properties to set + * @returns ComplianceStandard instance + */ + public static create(properties?: google.cloud.gkehub.v1.CompliancePostureConfig.IComplianceStandard): google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard; + + /** + * Encodes the specified ComplianceStandard message. Does not implicitly {@link google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @param message ComplianceStandard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.CompliancePostureConfig.IComplianceStandard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComplianceStandard message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @param message ComplianceStandard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.CompliancePostureConfig.IComplianceStandard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard; + + /** + * Verifies a ComplianceStandard message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComplianceStandard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComplianceStandard + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard; + + /** + * Creates a plain object from a ComplianceStandard message. Also converts values to other types if specified. + * @param message ComplianceStandard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComplianceStandard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComplianceStandard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + DISABLED = 1, + ENABLED = 2 + } + } + + /** Properties of a FleetLifecycleState. */ + interface IFleetLifecycleState { + + /** FleetLifecycleState code */ + code?: (google.cloud.gkehub.v1.FleetLifecycleState.Code|keyof typeof google.cloud.gkehub.v1.FleetLifecycleState.Code|null); + } + + /** Represents a FleetLifecycleState. */ + class FleetLifecycleState implements IFleetLifecycleState { /** - * Encodes the specified GkeCluster message. Does not implicitly {@link google.cloud.gkehub.v1.GkeCluster.verify|verify} messages. - * @param message GkeCluster message or plain object to encode + * Constructs a new FleetLifecycleState. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IFleetLifecycleState); + + /** FleetLifecycleState code. */ + public code: (google.cloud.gkehub.v1.FleetLifecycleState.Code|keyof typeof google.cloud.gkehub.v1.FleetLifecycleState.Code); + + /** + * Creates a new FleetLifecycleState instance using the specified properties. + * @param [properties] Properties to set + * @returns FleetLifecycleState instance + */ + public static create(properties?: google.cloud.gkehub.v1.IFleetLifecycleState): google.cloud.gkehub.v1.FleetLifecycleState; + + /** + * Encodes the specified FleetLifecycleState message. Does not implicitly {@link google.cloud.gkehub.v1.FleetLifecycleState.verify|verify} messages. + * @param message FleetLifecycleState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IGkeCluster, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IFleetLifecycleState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GkeCluster message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GkeCluster.verify|verify} messages. - * @param message GkeCluster message or plain object to encode + * Encodes the specified FleetLifecycleState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.FleetLifecycleState.verify|verify} messages. + * @param message FleetLifecycleState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IGkeCluster, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IFleetLifecycleState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GkeCluster message from the specified reader or buffer. + * Decodes a FleetLifecycleState message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GkeCluster + * @returns FleetLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GkeCluster; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.FleetLifecycleState; /** - * Decodes a GkeCluster message from the specified reader or buffer, length delimited. + * Decodes a FleetLifecycleState message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GkeCluster + * @returns FleetLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GkeCluster; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.FleetLifecycleState; /** - * Verifies a GkeCluster message. + * Verifies a FleetLifecycleState message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GkeCluster message from a plain object. Also converts values to their respective internal types. + * Creates a FleetLifecycleState message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GkeCluster + * @returns FleetLifecycleState */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GkeCluster; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.FleetLifecycleState; /** - * Creates a plain object from a GkeCluster message. Also converts values to other types if specified. - * @param message GkeCluster + * Creates a plain object from a FleetLifecycleState message. Also converts values to other types if specified. + * @param message FleetLifecycleState * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.GkeCluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.FleetLifecycleState, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GkeCluster to JSON. + * Converts this FleetLifecycleState to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GkeCluster + * Gets the default type url for FleetLifecycleState * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a KubernetesMetadata. */ - interface IKubernetesMetadata { + namespace FleetLifecycleState { - /** KubernetesMetadata kubernetesApiServerVersion */ - kubernetesApiServerVersion?: (string|null); + /** Code enum. */ + enum Code { + CODE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + DELETING = 3, + UPDATING = 4 + } + } - /** KubernetesMetadata nodeProviderId */ - nodeProviderId?: (string|null); + /** Properties of a Namespace. */ + interface INamespace { - /** KubernetesMetadata nodeCount */ - nodeCount?: (number|null); + /** Namespace name */ + name?: (string|null); - /** KubernetesMetadata vcpuCount */ - vcpuCount?: (number|null); + /** Namespace uid */ + uid?: (string|null); - /** KubernetesMetadata memoryMb */ - memoryMb?: (number|null); + /** Namespace createTime */ + createTime?: (google.protobuf.ITimestamp|null); - /** KubernetesMetadata updateTime */ + /** Namespace updateTime */ updateTime?: (google.protobuf.ITimestamp|null); + + /** Namespace deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** Namespace state */ + state?: (google.cloud.gkehub.v1.INamespaceLifecycleState|null); + + /** Namespace scope */ + scope?: (string|null); + + /** Namespace namespaceLabels */ + namespaceLabels?: ({ [k: string]: string }|null); + + /** Namespace labels */ + labels?: ({ [k: string]: string }|null); } - /** Represents a KubernetesMetadata. */ - class KubernetesMetadata implements IKubernetesMetadata { + /** Represents a Namespace. */ + class Namespace implements INamespace { /** - * Constructs a new KubernetesMetadata. + * Constructs a new Namespace. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IKubernetesMetadata); + constructor(properties?: google.cloud.gkehub.v1.INamespace); - /** KubernetesMetadata kubernetesApiServerVersion. */ - public kubernetesApiServerVersion: string; + /** Namespace name. */ + public name: string; - /** KubernetesMetadata nodeProviderId. */ - public nodeProviderId: string; + /** Namespace uid. */ + public uid: string; - /** KubernetesMetadata nodeCount. */ - public nodeCount: number; + /** Namespace createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** KubernetesMetadata vcpuCount. */ - public vcpuCount: number; + /** Namespace updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); - /** KubernetesMetadata memoryMb. */ - public memoryMb: number; + /** Namespace deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); - /** KubernetesMetadata updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** Namespace state. */ + public state?: (google.cloud.gkehub.v1.INamespaceLifecycleState|null); + + /** Namespace scope. */ + public scope: string; + + /** Namespace namespaceLabels. */ + public namespaceLabels: { [k: string]: string }; + + /** Namespace labels. */ + public labels: { [k: string]: string }; /** - * Creates a new KubernetesMetadata instance using the specified properties. + * Creates a new Namespace instance using the specified properties. * @param [properties] Properties to set - * @returns KubernetesMetadata instance + * @returns Namespace instance */ - public static create(properties?: google.cloud.gkehub.v1.IKubernetesMetadata): google.cloud.gkehub.v1.KubernetesMetadata; + public static create(properties?: google.cloud.gkehub.v1.INamespace): google.cloud.gkehub.v1.Namespace; /** - * Encodes the specified KubernetesMetadata message. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesMetadata.verify|verify} messages. - * @param message KubernetesMetadata message or plain object to encode + * Encodes the specified Namespace message. Does not implicitly {@link google.cloud.gkehub.v1.Namespace.verify|verify} messages. + * @param message Namespace message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IKubernetesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.INamespace, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified KubernetesMetadata message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesMetadata.verify|verify} messages. - * @param message KubernetesMetadata message or plain object to encode + * Encodes the specified Namespace message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Namespace.verify|verify} messages. + * @param message Namespace message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IKubernetesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.INamespace, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a KubernetesMetadata message from the specified reader or buffer. + * Decodes a Namespace message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns KubernetesMetadata + * @returns Namespace * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.KubernetesMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.Namespace; /** - * Decodes a KubernetesMetadata message from the specified reader or buffer, length delimited. + * Decodes a Namespace message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns KubernetesMetadata + * @returns Namespace * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.KubernetesMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.Namespace; /** - * Verifies a KubernetesMetadata message. + * Verifies a Namespace message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a KubernetesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a Namespace message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns KubernetesMetadata + * @returns Namespace */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.KubernetesMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.Namespace; /** - * Creates a plain object from a KubernetesMetadata message. Also converts values to other types if specified. - * @param message KubernetesMetadata + * Creates a plain object from a Namespace message. Also converts values to other types if specified. + * @param message Namespace * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.KubernetesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.Namespace, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this KubernetesMetadata to JSON. + * Converts this Namespace to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for KubernetesMetadata + * Gets the default type url for Namespace * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MonitoringConfig. */ - interface IMonitoringConfig { - - /** MonitoringConfig projectId */ - projectId?: (string|null); - - /** MonitoringConfig location */ - location?: (string|null); - - /** MonitoringConfig cluster */ - cluster?: (string|null); - - /** MonitoringConfig kubernetesMetricsPrefix */ - kubernetesMetricsPrefix?: (string|null); + /** Properties of a NamespaceLifecycleState. */ + interface INamespaceLifecycleState { - /** MonitoringConfig clusterHash */ - clusterHash?: (string|null); + /** NamespaceLifecycleState code */ + code?: (google.cloud.gkehub.v1.NamespaceLifecycleState.Code|keyof typeof google.cloud.gkehub.v1.NamespaceLifecycleState.Code|null); } - /** Represents a MonitoringConfig. */ - class MonitoringConfig implements IMonitoringConfig { + /** Represents a NamespaceLifecycleState. */ + class NamespaceLifecycleState implements INamespaceLifecycleState { /** - * Constructs a new MonitoringConfig. + * Constructs a new NamespaceLifecycleState. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IMonitoringConfig); - - /** MonitoringConfig projectId. */ - public projectId: string; - - /** MonitoringConfig location. */ - public location: string; - - /** MonitoringConfig cluster. */ - public cluster: string; - - /** MonitoringConfig kubernetesMetricsPrefix. */ - public kubernetesMetricsPrefix: string; + constructor(properties?: google.cloud.gkehub.v1.INamespaceLifecycleState); - /** MonitoringConfig clusterHash. */ - public clusterHash: string; + /** NamespaceLifecycleState code. */ + public code: (google.cloud.gkehub.v1.NamespaceLifecycleState.Code|keyof typeof google.cloud.gkehub.v1.NamespaceLifecycleState.Code); /** - * Creates a new MonitoringConfig instance using the specified properties. + * Creates a new NamespaceLifecycleState instance using the specified properties. * @param [properties] Properties to set - * @returns MonitoringConfig instance + * @returns NamespaceLifecycleState instance */ - public static create(properties?: google.cloud.gkehub.v1.IMonitoringConfig): google.cloud.gkehub.v1.MonitoringConfig; + public static create(properties?: google.cloud.gkehub.v1.INamespaceLifecycleState): google.cloud.gkehub.v1.NamespaceLifecycleState; /** - * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.cloud.gkehub.v1.MonitoringConfig.verify|verify} messages. - * @param message MonitoringConfig message or plain object to encode + * Encodes the specified NamespaceLifecycleState message. Does not implicitly {@link google.cloud.gkehub.v1.NamespaceLifecycleState.verify|verify} messages. + * @param message NamespaceLifecycleState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.INamespaceLifecycleState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MonitoringConfig.verify|verify} messages. - * @param message MonitoringConfig message or plain object to encode + * Encodes the specified NamespaceLifecycleState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.NamespaceLifecycleState.verify|verify} messages. + * @param message NamespaceLifecycleState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.INamespaceLifecycleState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MonitoringConfig message from the specified reader or buffer. + * Decodes a NamespaceLifecycleState message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MonitoringConfig + * @returns NamespaceLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.MonitoringConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.NamespaceLifecycleState; /** - * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. + * Decodes a NamespaceLifecycleState message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MonitoringConfig + * @returns NamespaceLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.MonitoringConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.NamespaceLifecycleState; /** - * Verifies a MonitoringConfig message. + * Verifies a NamespaceLifecycleState message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MonitoringConfig message from a plain object. Also converts values to their respective internal types. + * Creates a NamespaceLifecycleState message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MonitoringConfig + * @returns NamespaceLifecycleState */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.MonitoringConfig; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.NamespaceLifecycleState; /** - * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. - * @param message MonitoringConfig + * Creates a plain object from a NamespaceLifecycleState message. Also converts values to other types if specified. + * @param message NamespaceLifecycleState * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.MonitoringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.NamespaceLifecycleState, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MonitoringConfig to JSON. + * Converts this NamespaceLifecycleState to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MonitoringConfig + * Gets the default type url for NamespaceLifecycleState * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MembershipState. */ - interface IMembershipState { + namespace NamespaceLifecycleState { - /** MembershipState code */ - code?: (google.cloud.gkehub.v1.MembershipState.Code|keyof typeof google.cloud.gkehub.v1.MembershipState.Code|null); + /** Code enum. */ + enum Code { + CODE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + DELETING = 3, + UPDATING = 4 + } } - /** Represents a MembershipState. */ - class MembershipState implements IMembershipState { + /** Properties of a RBACRoleBinding. */ + interface IRBACRoleBinding { + + /** RBACRoleBinding user */ + user?: (string|null); + + /** RBACRoleBinding group */ + group?: (string|null); + + /** RBACRoleBinding name */ + name?: (string|null); + + /** RBACRoleBinding uid */ + uid?: (string|null); + + /** RBACRoleBinding createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** RBACRoleBinding updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** RBACRoleBinding deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** RBACRoleBinding state */ + state?: (google.cloud.gkehub.v1.IRBACRoleBindingLifecycleState|null); + + /** RBACRoleBinding role */ + role?: (google.cloud.gkehub.v1.RBACRoleBinding.IRole|null); + + /** RBACRoleBinding labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a RBACRoleBinding. */ + class RBACRoleBinding implements IRBACRoleBinding { /** - * Constructs a new MembershipState. + * Constructs a new RBACRoleBinding. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IMembershipState); + constructor(properties?: google.cloud.gkehub.v1.IRBACRoleBinding); - /** MembershipState code. */ - public code: (google.cloud.gkehub.v1.MembershipState.Code|keyof typeof google.cloud.gkehub.v1.MembershipState.Code); + /** RBACRoleBinding user. */ + public user?: (string|null); + + /** RBACRoleBinding group. */ + public group?: (string|null); + + /** RBACRoleBinding name. */ + public name: string; + + /** RBACRoleBinding uid. */ + public uid: string; + + /** RBACRoleBinding createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** RBACRoleBinding updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** RBACRoleBinding deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** RBACRoleBinding state. */ + public state?: (google.cloud.gkehub.v1.IRBACRoleBindingLifecycleState|null); + + /** RBACRoleBinding role. */ + public role?: (google.cloud.gkehub.v1.RBACRoleBinding.IRole|null); + + /** RBACRoleBinding labels. */ + public labels: { [k: string]: string }; + + /** RBACRoleBinding principal. */ + public principal?: ("user"|"group"); /** - * Creates a new MembershipState instance using the specified properties. + * Creates a new RBACRoleBinding instance using the specified properties. * @param [properties] Properties to set - * @returns MembershipState instance + * @returns RBACRoleBinding instance */ - public static create(properties?: google.cloud.gkehub.v1.IMembershipState): google.cloud.gkehub.v1.MembershipState; + public static create(properties?: google.cloud.gkehub.v1.IRBACRoleBinding): google.cloud.gkehub.v1.RBACRoleBinding; /** - * Encodes the specified MembershipState message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipState.verify|verify} messages. - * @param message MembershipState message or plain object to encode + * Encodes the specified RBACRoleBinding message. Does not implicitly {@link google.cloud.gkehub.v1.RBACRoleBinding.verify|verify} messages. + * @param message RBACRoleBinding message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IMembershipState, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IRBACRoleBinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MembershipState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipState.verify|verify} messages. - * @param message MembershipState message or plain object to encode + * Encodes the specified RBACRoleBinding message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.RBACRoleBinding.verify|verify} messages. + * @param message RBACRoleBinding message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IMembershipState, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IRBACRoleBinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MembershipState message from the specified reader or buffer. + * Decodes a RBACRoleBinding message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MembershipState + * @returns RBACRoleBinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.MembershipState; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.RBACRoleBinding; /** - * Decodes a MembershipState message from the specified reader or buffer, length delimited. + * Decodes a RBACRoleBinding message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MembershipState + * @returns RBACRoleBinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.MembershipState; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.RBACRoleBinding; /** - * Verifies a MembershipState message. + * Verifies a RBACRoleBinding message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MembershipState message from a plain object. Also converts values to their respective internal types. + * Creates a RBACRoleBinding message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MembershipState + * @returns RBACRoleBinding */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.MembershipState; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.RBACRoleBinding; /** - * Creates a plain object from a MembershipState message. Also converts values to other types if specified. - * @param message MembershipState + * Creates a plain object from a RBACRoleBinding message. Also converts values to other types if specified. + * @param message RBACRoleBinding * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.MembershipState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.RBACRoleBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MembershipState to JSON. + * Converts this RBACRoleBinding to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MembershipState + * Gets the default type url for RBACRoleBinding * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace MembershipState { + namespace RBACRoleBinding { - /** Code enum. */ - enum Code { - CODE_UNSPECIFIED = 0, - CREATING = 1, - READY = 2, - DELETING = 3, - UPDATING = 4, - SERVICE_UPDATING = 5 + /** Properties of a Role. */ + interface IRole { + + /** Role predefinedRole */ + predefinedRole?: (google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles|keyof typeof google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles|null); + + /** Role customRole */ + customRole?: (string|null); } - } - /** Properties of an Authority. */ - interface IAuthority { + /** Represents a Role. */ + class Role implements IRole { - /** Authority issuer */ - issuer?: (string|null); + /** + * Constructs a new Role. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.RBACRoleBinding.IRole); - /** Authority workloadIdentityPool */ - workloadIdentityPool?: (string|null); + /** Role predefinedRole. */ + public predefinedRole: (google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles|keyof typeof google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles); - /** Authority identityProvider */ - identityProvider?: (string|null); + /** Role customRole. */ + public customRole: string; - /** Authority oidcJwks */ - oidcJwks?: (Uint8Array|Buffer|string|null); + /** + * Creates a new Role instance using the specified properties. + * @param [properties] Properties to set + * @returns Role instance + */ + public static create(properties?: google.cloud.gkehub.v1.RBACRoleBinding.IRole): google.cloud.gkehub.v1.RBACRoleBinding.Role; + + /** + * Encodes the specified Role message. Does not implicitly {@link google.cloud.gkehub.v1.RBACRoleBinding.Role.verify|verify} messages. + * @param message Role message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.RBACRoleBinding.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Role message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.RBACRoleBinding.Role.verify|verify} messages. + * @param message Role message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.RBACRoleBinding.IRole, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Role message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Role + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.RBACRoleBinding.Role; + + /** + * Decodes a Role message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Role + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.RBACRoleBinding.Role; + + /** + * Verifies a Role message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Role message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Role + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.RBACRoleBinding.Role; + + /** + * Creates a plain object from a Role message. Also converts values to other types if specified. + * @param message Role + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.RBACRoleBinding.Role, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Role to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Role + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Role { + + /** PredefinedRoles enum. */ + enum PredefinedRoles { + UNKNOWN = 0, + ADMIN = 1, + EDIT = 2, + VIEW = 3, + ANTHOS_SUPPORT = 4 + } + } } - /** Represents an Authority. */ - class Authority implements IAuthority { + /** Properties of a RBACRoleBindingLifecycleState. */ + interface IRBACRoleBindingLifecycleState { + + /** RBACRoleBindingLifecycleState code */ + code?: (google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code|keyof typeof google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code|null); + } + + /** Represents a RBACRoleBindingLifecycleState. */ + class RBACRoleBindingLifecycleState implements IRBACRoleBindingLifecycleState { /** - * Constructs a new Authority. + * Constructs a new RBACRoleBindingLifecycleState. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IAuthority); - - /** Authority issuer. */ - public issuer: string; - - /** Authority workloadIdentityPool. */ - public workloadIdentityPool: string; - - /** Authority identityProvider. */ - public identityProvider: string; + constructor(properties?: google.cloud.gkehub.v1.IRBACRoleBindingLifecycleState); - /** Authority oidcJwks. */ - public oidcJwks: (Uint8Array|Buffer|string); + /** RBACRoleBindingLifecycleState code. */ + public code: (google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code|keyof typeof google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code); /** - * Creates a new Authority instance using the specified properties. + * Creates a new RBACRoleBindingLifecycleState instance using the specified properties. * @param [properties] Properties to set - * @returns Authority instance + * @returns RBACRoleBindingLifecycleState instance */ - public static create(properties?: google.cloud.gkehub.v1.IAuthority): google.cloud.gkehub.v1.Authority; + public static create(properties?: google.cloud.gkehub.v1.IRBACRoleBindingLifecycleState): google.cloud.gkehub.v1.RBACRoleBindingLifecycleState; /** - * Encodes the specified Authority message. Does not implicitly {@link google.cloud.gkehub.v1.Authority.verify|verify} messages. - * @param message Authority message or plain object to encode + * Encodes the specified RBACRoleBindingLifecycleState message. Does not implicitly {@link google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.verify|verify} messages. + * @param message RBACRoleBindingLifecycleState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IAuthority, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IRBACRoleBindingLifecycleState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Authority message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Authority.verify|verify} messages. - * @param message Authority message or plain object to encode + * Encodes the specified RBACRoleBindingLifecycleState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.verify|verify} messages. + * @param message RBACRoleBindingLifecycleState message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IAuthority, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IRBACRoleBindingLifecycleState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an Authority message from the specified reader or buffer. + * Decodes a RBACRoleBindingLifecycleState message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Authority + * @returns RBACRoleBindingLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.Authority; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.RBACRoleBindingLifecycleState; /** - * Decodes an Authority message from the specified reader or buffer, length delimited. + * Decodes a RBACRoleBindingLifecycleState message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Authority + * @returns RBACRoleBindingLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.Authority; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.RBACRoleBindingLifecycleState; /** - * Verifies an Authority message. + * Verifies a RBACRoleBindingLifecycleState message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an Authority message from a plain object. Also converts values to their respective internal types. + * Creates a RBACRoleBindingLifecycleState message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Authority + * @returns RBACRoleBindingLifecycleState */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.Authority; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.RBACRoleBindingLifecycleState; /** - * Creates a plain object from an Authority message. Also converts values to other types if specified. - * @param message Authority + * Creates a plain object from a RBACRoleBindingLifecycleState message. Also converts values to other types if specified. + * @param message RBACRoleBindingLifecycleState * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.Authority, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.RBACRoleBindingLifecycleState, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Authority to JSON. + * Converts this RBACRoleBindingLifecycleState to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Authority + * Gets the default type url for RBACRoleBindingLifecycleState * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a GkeHub */ - class GkeHub extends $protobuf.rpc.Service { + namespace RBACRoleBindingLifecycleState { + + /** Code enum. */ + enum Code { + CODE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + DELETING = 3, + UPDATING = 4 + } + } + + /** Properties of a Scope. */ + interface IScope { + + /** Scope name */ + name?: (string|null); + + /** Scope uid */ + uid?: (string|null); + + /** Scope createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Scope updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Scope deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** Scope state */ + state?: (google.cloud.gkehub.v1.IScopeLifecycleState|null); + + /** Scope namespaceLabels */ + namespaceLabels?: ({ [k: string]: string }|null); + + /** Scope labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a Scope. */ + class Scope implements IScope { /** - * Constructs a new GkeHub service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new Scope. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.cloud.gkehub.v1.IScope); + + /** Scope name. */ + public name: string; + + /** Scope uid. */ + public uid: string; + + /** Scope createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Scope updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Scope deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** Scope state. */ + public state?: (google.cloud.gkehub.v1.IScopeLifecycleState|null); + + /** Scope namespaceLabels. */ + public namespaceLabels: { [k: string]: string }; + + /** Scope labels. */ + public labels: { [k: string]: string }; /** - * Creates new GkeHub service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Creates a new Scope instance using the specified properties. + * @param [properties] Properties to set + * @returns Scope instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): GkeHub; + public static create(properties?: google.cloud.gkehub.v1.IScope): google.cloud.gkehub.v1.Scope; /** - * Calls ListMemberships. - * @param request ListMembershipsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMembershipsResponse + * Encodes the specified Scope message. Does not implicitly {@link google.cloud.gkehub.v1.Scope.verify|verify} messages. + * @param message Scope message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listMemberships(request: google.cloud.gkehub.v1.IListMembershipsRequest, callback: google.cloud.gkehub.v1.GkeHub.ListMembershipsCallback): void; + public static encode(message: google.cloud.gkehub.v1.IScope, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListMemberships. - * @param request ListMembershipsRequest message or plain object - * @returns Promise + * Encodes the specified Scope message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Scope.verify|verify} messages. + * @param message Scope message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public listMemberships(request: google.cloud.gkehub.v1.IListMembershipsRequest): Promise; + public static encodeDelimited(message: google.cloud.gkehub.v1.IScope, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls ListFeatures. - * @param request ListFeaturesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListFeaturesResponse + * Decodes a Scope message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Scope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listFeatures(request: google.cloud.gkehub.v1.IListFeaturesRequest, callback: google.cloud.gkehub.v1.GkeHub.ListFeaturesCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.Scope; /** - * Calls ListFeatures. - * @param request ListFeaturesRequest message or plain object - * @returns Promise + * Decodes a Scope message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Scope + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public listFeatures(request: google.cloud.gkehub.v1.IListFeaturesRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.Scope; /** - * Calls GetMembership. - * @param request GetMembershipRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Membership + * Verifies a Scope message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public getMembership(request: google.cloud.gkehub.v1.IGetMembershipRequest, callback: google.cloud.gkehub.v1.GkeHub.GetMembershipCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls GetMembership. - * @param request GetMembershipRequest message or plain object - * @returns Promise + * Creates a Scope message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Scope */ - public getMembership(request: google.cloud.gkehub.v1.IGetMembershipRequest): Promise; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.Scope; /** - * Calls GetFeature. - * @param request GetFeatureRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Feature + * Creates a plain object from a Scope message. Also converts values to other types if specified. + * @param message Scope + * @param [options] Conversion options + * @returns Plain object */ - public getFeature(request: google.cloud.gkehub.v1.IGetFeatureRequest, callback: google.cloud.gkehub.v1.GkeHub.GetFeatureCallback): void; + public static toObject(message: google.cloud.gkehub.v1.Scope, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls GetFeature. - * @param request GetFeatureRequest message or plain object - * @returns Promise + * Converts this Scope to JSON. + * @returns JSON object */ - public getFeature(request: google.cloud.gkehub.v1.IGetFeatureRequest): Promise; + public toJSON(): { [k: string]: any }; /** - * Calls CreateMembership. - * @param request CreateMembershipRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Gets the default type url for Scope + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public createMembership(request: google.cloud.gkehub.v1.ICreateMembershipRequest, callback: google.cloud.gkehub.v1.GkeHub.CreateMembershipCallback): void; + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Calls CreateMembership. - * @param request CreateMembershipRequest message or plain object - * @returns Promise - */ - public createMembership(request: google.cloud.gkehub.v1.ICreateMembershipRequest): Promise; + /** Properties of a ScopeLifecycleState. */ + interface IScopeLifecycleState { - /** - * Calls CreateFeature. - * @param request CreateFeatureRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createFeature(request: google.cloud.gkehub.v1.ICreateFeatureRequest, callback: google.cloud.gkehub.v1.GkeHub.CreateFeatureCallback): void; + /** ScopeLifecycleState code */ + code?: (google.cloud.gkehub.v1.ScopeLifecycleState.Code|keyof typeof google.cloud.gkehub.v1.ScopeLifecycleState.Code|null); + } + + /** Represents a ScopeLifecycleState. */ + class ScopeLifecycleState implements IScopeLifecycleState { /** - * Calls CreateFeature. - * @param request CreateFeatureRequest message or plain object - * @returns Promise + * Constructs a new ScopeLifecycleState. + * @param [properties] Properties to set */ - public createFeature(request: google.cloud.gkehub.v1.ICreateFeatureRequest): Promise; + constructor(properties?: google.cloud.gkehub.v1.IScopeLifecycleState); + + /** ScopeLifecycleState code. */ + public code: (google.cloud.gkehub.v1.ScopeLifecycleState.Code|keyof typeof google.cloud.gkehub.v1.ScopeLifecycleState.Code); /** - * Calls DeleteMembership. - * @param request DeleteMembershipRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a new ScopeLifecycleState instance using the specified properties. + * @param [properties] Properties to set + * @returns ScopeLifecycleState instance */ - public deleteMembership(request: google.cloud.gkehub.v1.IDeleteMembershipRequest, callback: google.cloud.gkehub.v1.GkeHub.DeleteMembershipCallback): void; + public static create(properties?: google.cloud.gkehub.v1.IScopeLifecycleState): google.cloud.gkehub.v1.ScopeLifecycleState; /** - * Calls DeleteMembership. - * @param request DeleteMembershipRequest message or plain object - * @returns Promise + * Encodes the specified ScopeLifecycleState message. Does not implicitly {@link google.cloud.gkehub.v1.ScopeLifecycleState.verify|verify} messages. + * @param message ScopeLifecycleState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteMembership(request: google.cloud.gkehub.v1.IDeleteMembershipRequest): Promise; + public static encode(message: google.cloud.gkehub.v1.IScopeLifecycleState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteFeature. - * @param request DeleteFeatureRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified ScopeLifecycleState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ScopeLifecycleState.verify|verify} messages. + * @param message ScopeLifecycleState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public deleteFeature(request: google.cloud.gkehub.v1.IDeleteFeatureRequest, callback: google.cloud.gkehub.v1.GkeHub.DeleteFeatureCallback): void; + public static encodeDelimited(message: google.cloud.gkehub.v1.IScopeLifecycleState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls DeleteFeature. - * @param request DeleteFeatureRequest message or plain object - * @returns Promise + * Decodes a ScopeLifecycleState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScopeLifecycleState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public deleteFeature(request: google.cloud.gkehub.v1.IDeleteFeatureRequest): Promise; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ScopeLifecycleState; /** - * Calls UpdateMembership. - * @param request UpdateMembershipRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Decodes a ScopeLifecycleState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScopeLifecycleState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public updateMembership(request: google.cloud.gkehub.v1.IUpdateMembershipRequest, callback: google.cloud.gkehub.v1.GkeHub.UpdateMembershipCallback): void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ScopeLifecycleState; /** - * Calls UpdateMembership. - * @param request UpdateMembershipRequest message or plain object - * @returns Promise + * Verifies a ScopeLifecycleState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public updateMembership(request: google.cloud.gkehub.v1.IUpdateMembershipRequest): Promise; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls UpdateFeature. - * @param request UpdateFeatureRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Creates a ScopeLifecycleState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScopeLifecycleState */ - public updateFeature(request: google.cloud.gkehub.v1.IUpdateFeatureRequest, callback: google.cloud.gkehub.v1.GkeHub.UpdateFeatureCallback): void; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ScopeLifecycleState; /** - * Calls UpdateFeature. - * @param request UpdateFeatureRequest message or plain object - * @returns Promise + * Creates a plain object from a ScopeLifecycleState message. Also converts values to other types if specified. + * @param message ScopeLifecycleState + * @param [options] Conversion options + * @returns Plain object */ - public updateFeature(request: google.cloud.gkehub.v1.IUpdateFeatureRequest): Promise; + public static toObject(message: google.cloud.gkehub.v1.ScopeLifecycleState, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Calls GenerateConnectManifest. - * @param request GenerateConnectManifestRequest message or plain object - * @param callback Node-style callback called with the error, if any, and GenerateConnectManifestResponse + * Converts this ScopeLifecycleState to JSON. + * @returns JSON object */ - public generateConnectManifest(request: google.cloud.gkehub.v1.IGenerateConnectManifestRequest, callback: google.cloud.gkehub.v1.GkeHub.GenerateConnectManifestCallback): void; + public toJSON(): { [k: string]: any }; /** - * Calls GenerateConnectManifest. - * @param request GenerateConnectManifestRequest message or plain object - * @returns Promise + * Gets the default type url for ScopeLifecycleState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - public generateConnectManifest(request: google.cloud.gkehub.v1.IGenerateConnectManifestRequest): Promise; + public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace GkeHub { + namespace ScopeLifecycleState { + + /** Code enum. */ + enum Code { + CODE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + DELETING = 3, + UPDATING = 4 + } + } + + /** Properties of a MembershipBinding. */ + interface IMembershipBinding { + + /** MembershipBinding scope */ + scope?: (string|null); + + /** MembershipBinding name */ + name?: (string|null); + + /** MembershipBinding uid */ + uid?: (string|null); + + /** MembershipBinding createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MembershipBinding updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** MembershipBinding deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** MembershipBinding state */ + state?: (google.cloud.gkehub.v1.IMembershipBindingLifecycleState|null); + + /** MembershipBinding labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a MembershipBinding. */ + class MembershipBinding implements IMembershipBinding { /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listMemberships}. - * @param error Error, if any - * @param [response] ListMembershipsResponse + * Constructs a new MembershipBinding. + * @param [properties] Properties to set */ - type ListMembershipsCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.ListMembershipsResponse) => void; + constructor(properties?: google.cloud.gkehub.v1.IMembershipBinding); + + /** MembershipBinding scope. */ + public scope?: (string|null); + + /** MembershipBinding name. */ + public name: string; + + /** MembershipBinding uid. */ + public uid: string; + + /** MembershipBinding createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MembershipBinding updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** MembershipBinding deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** MembershipBinding state. */ + public state?: (google.cloud.gkehub.v1.IMembershipBindingLifecycleState|null); + + /** MembershipBinding labels. */ + public labels: { [k: string]: string }; + + /** MembershipBinding target. */ + public target?: "scope"; /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listFeatures}. - * @param error Error, if any - * @param [response] ListFeaturesResponse + * Creates a new MembershipBinding instance using the specified properties. + * @param [properties] Properties to set + * @returns MembershipBinding instance */ - type ListFeaturesCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.ListFeaturesResponse) => void; + public static create(properties?: google.cloud.gkehub.v1.IMembershipBinding): google.cloud.gkehub.v1.MembershipBinding; /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getMembership}. - * @param error Error, if any - * @param [response] Membership + * Encodes the specified MembershipBinding message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipBinding.verify|verify} messages. + * @param message MembershipBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetMembershipCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.Membership) => void; + public static encode(message: google.cloud.gkehub.v1.IMembershipBinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getFeature}. - * @param error Error, if any - * @param [response] Feature + * Encodes the specified MembershipBinding message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipBinding.verify|verify} messages. + * @param message MembershipBinding message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - type GetFeatureCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.Feature) => void; + public static encodeDelimited(message: google.cloud.gkehub.v1.IMembershipBinding, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createMembership}. - * @param error Error, if any - * @param [response] Operation + * Decodes a MembershipBinding message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MembershipBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateMembershipCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.MembershipBinding; /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createFeature}. - * @param error Error, if any - * @param [response] Operation + * Decodes a MembershipBinding message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MembershipBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - type CreateFeatureCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.MembershipBinding; /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteMembership}. - * @param error Error, if any - * @param [response] Operation + * Verifies a MembershipBinding message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - type DeleteMembershipCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteFeature}. - * @param error Error, if any - * @param [response] Operation + * Creates a MembershipBinding message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MembershipBinding */ - type DeleteFeatureCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.MembershipBinding; /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateMembership}. - * @param error Error, if any - * @param [response] Operation + * Creates a plain object from a MembershipBinding message. Also converts values to other types if specified. + * @param message MembershipBinding + * @param [options] Conversion options + * @returns Plain object */ - type UpdateMembershipCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static toObject(message: google.cloud.gkehub.v1.MembershipBinding, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateFeature}. - * @param error Error, if any - * @param [response] Operation + * Converts this MembershipBinding to JSON. + * @returns JSON object */ - type UpdateFeatureCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|generateConnectManifest}. - * @param error Error, if any - * @param [response] GenerateConnectManifestResponse + * Gets the default type url for MembershipBinding + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type GenerateConnectManifestCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.GenerateConnectManifestResponse) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListMembershipsRequest. */ - interface IListMembershipsRequest { - - /** ListMembershipsRequest parent */ - parent?: (string|null); - - /** ListMembershipsRequest pageSize */ - pageSize?: (number|null); - - /** ListMembershipsRequest pageToken */ - pageToken?: (string|null); - - /** ListMembershipsRequest filter */ - filter?: (string|null); + /** Properties of a MembershipBindingLifecycleState. */ + interface IMembershipBindingLifecycleState { - /** ListMembershipsRequest orderBy */ - orderBy?: (string|null); + /** MembershipBindingLifecycleState code */ + code?: (google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code|keyof typeof google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code|null); } - /** Represents a ListMembershipsRequest. */ - class ListMembershipsRequest implements IListMembershipsRequest { + /** Represents a MembershipBindingLifecycleState. */ + class MembershipBindingLifecycleState implements IMembershipBindingLifecycleState { /** - * Constructs a new ListMembershipsRequest. + * Constructs a new MembershipBindingLifecycleState. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IListMembershipsRequest); - - /** ListMembershipsRequest parent. */ - public parent: string; - - /** ListMembershipsRequest pageSize. */ - public pageSize: number; + constructor(properties?: google.cloud.gkehub.v1.IMembershipBindingLifecycleState); - /** ListMembershipsRequest pageToken. */ - public pageToken: string; + /** MembershipBindingLifecycleState code. */ + public code: (google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code|keyof typeof google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code); - /** ListMembershipsRequest filter. */ - public filter: string; + /** + * Creates a new MembershipBindingLifecycleState instance using the specified properties. + * @param [properties] Properties to set + * @returns MembershipBindingLifecycleState instance + */ + public static create(properties?: google.cloud.gkehub.v1.IMembershipBindingLifecycleState): google.cloud.gkehub.v1.MembershipBindingLifecycleState; - /** ListMembershipsRequest orderBy. */ - public orderBy: string; + /** + * Encodes the specified MembershipBindingLifecycleState message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipBindingLifecycleState.verify|verify} messages. + * @param message MembershipBindingLifecycleState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IMembershipBindingLifecycleState, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Creates a new ListMembershipsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMembershipsRequest instance + * Encodes the specified MembershipBindingLifecycleState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipBindingLifecycleState.verify|verify} messages. + * @param message MembershipBindingLifecycleState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public static create(properties?: google.cloud.gkehub.v1.IListMembershipsRequest): google.cloud.gkehub.v1.ListMembershipsRequest; + public static encodeDelimited(message: google.cloud.gkehub.v1.IMembershipBindingLifecycleState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MembershipBindingLifecycleState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MembershipBindingLifecycleState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.MembershipBindingLifecycleState; + + /** + * Decodes a MembershipBindingLifecycleState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MembershipBindingLifecycleState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.MembershipBindingLifecycleState; + + /** + * Verifies a MembershipBindingLifecycleState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MembershipBindingLifecycleState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MembershipBindingLifecycleState + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.MembershipBindingLifecycleState; + + /** + * Creates a plain object from a MembershipBindingLifecycleState message. Also converts values to other types if specified. + * @param message MembershipBindingLifecycleState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.MembershipBindingLifecycleState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MembershipBindingLifecycleState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MembershipBindingLifecycleState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MembershipBindingLifecycleState { + + /** Code enum. */ + enum Code { + CODE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + DELETING = 3, + UPDATING = 4 + } + } + + /** Properties of a Membership. */ + interface IMembership { + + /** Membership endpoint */ + endpoint?: (google.cloud.gkehub.v1.IMembershipEndpoint|null); + + /** Membership name */ + name?: (string|null); + + /** Membership labels */ + labels?: ({ [k: string]: string }|null); + + /** Membership description */ + description?: (string|null); + + /** Membership state */ + state?: (google.cloud.gkehub.v1.IMembershipState|null); + + /** Membership createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Membership updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Membership deleteTime */ + deleteTime?: (google.protobuf.ITimestamp|null); + + /** Membership externalId */ + externalId?: (string|null); + + /** Membership lastConnectionTime */ + lastConnectionTime?: (google.protobuf.ITimestamp|null); + + /** Membership uniqueId */ + uniqueId?: (string|null); + + /** Membership authority */ + authority?: (google.cloud.gkehub.v1.IAuthority|null); + + /** Membership monitoringConfig */ + monitoringConfig?: (google.cloud.gkehub.v1.IMonitoringConfig|null); + } + + /** Represents a Membership. */ + class Membership implements IMembership { + + /** + * Constructs a new Membership. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IMembership); + + /** Membership endpoint. */ + public endpoint?: (google.cloud.gkehub.v1.IMembershipEndpoint|null); + + /** Membership name. */ + public name: string; + + /** Membership labels. */ + public labels: { [k: string]: string }; + + /** Membership description. */ + public description: string; + + /** Membership state. */ + public state?: (google.cloud.gkehub.v1.IMembershipState|null); + + /** Membership createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Membership updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Membership deleteTime. */ + public deleteTime?: (google.protobuf.ITimestamp|null); + + /** Membership externalId. */ + public externalId: string; + + /** Membership lastConnectionTime. */ + public lastConnectionTime?: (google.protobuf.ITimestamp|null); + + /** Membership uniqueId. */ + public uniqueId: string; + + /** Membership authority. */ + public authority?: (google.cloud.gkehub.v1.IAuthority|null); + + /** Membership monitoringConfig. */ + public monitoringConfig?: (google.cloud.gkehub.v1.IMonitoringConfig|null); + + /** Membership type. */ + public type?: "endpoint"; + + /** + * Creates a new Membership instance using the specified properties. + * @param [properties] Properties to set + * @returns Membership instance + */ + public static create(properties?: google.cloud.gkehub.v1.IMembership): google.cloud.gkehub.v1.Membership; + + /** + * Encodes the specified Membership message. Does not implicitly {@link google.cloud.gkehub.v1.Membership.verify|verify} messages. + * @param message Membership message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IMembership, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Membership message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Membership.verify|verify} messages. + * @param message Membership message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IMembership, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Membership message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Membership + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.Membership; + + /** + * Decodes a Membership message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Membership + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.Membership; + + /** + * Verifies a Membership message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Membership message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Membership + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.Membership; + + /** + * Creates a plain object from a Membership message. Also converts values to other types if specified. + * @param message Membership + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.Membership, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Membership to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Membership + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MembershipEndpoint. */ + interface IMembershipEndpoint { + + /** MembershipEndpoint gkeCluster */ + gkeCluster?: (google.cloud.gkehub.v1.IGkeCluster|null); + + /** MembershipEndpoint kubernetesMetadata */ + kubernetesMetadata?: (google.cloud.gkehub.v1.IKubernetesMetadata|null); + + /** MembershipEndpoint kubernetesResource */ + kubernetesResource?: (google.cloud.gkehub.v1.IKubernetesResource|null); + + /** MembershipEndpoint googleManaged */ + googleManaged?: (boolean|null); + } + + /** Represents a MembershipEndpoint. */ + class MembershipEndpoint implements IMembershipEndpoint { + + /** + * Constructs a new MembershipEndpoint. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IMembershipEndpoint); + + /** MembershipEndpoint gkeCluster. */ + public gkeCluster?: (google.cloud.gkehub.v1.IGkeCluster|null); + + /** MembershipEndpoint kubernetesMetadata. */ + public kubernetesMetadata?: (google.cloud.gkehub.v1.IKubernetesMetadata|null); + + /** MembershipEndpoint kubernetesResource. */ + public kubernetesResource?: (google.cloud.gkehub.v1.IKubernetesResource|null); + + /** MembershipEndpoint googleManaged. */ + public googleManaged: boolean; + + /** + * Creates a new MembershipEndpoint instance using the specified properties. + * @param [properties] Properties to set + * @returns MembershipEndpoint instance + */ + public static create(properties?: google.cloud.gkehub.v1.IMembershipEndpoint): google.cloud.gkehub.v1.MembershipEndpoint; + + /** + * Encodes the specified MembershipEndpoint message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipEndpoint.verify|verify} messages. + * @param message MembershipEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IMembershipEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MembershipEndpoint message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipEndpoint.verify|verify} messages. + * @param message MembershipEndpoint message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IMembershipEndpoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MembershipEndpoint message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MembershipEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.MembershipEndpoint; + + /** + * Decodes a MembershipEndpoint message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MembershipEndpoint + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.MembershipEndpoint; + + /** + * Verifies a MembershipEndpoint message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MembershipEndpoint message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MembershipEndpoint + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.MembershipEndpoint; + + /** + * Creates a plain object from a MembershipEndpoint message. Also converts values to other types if specified. + * @param message MembershipEndpoint + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.MembershipEndpoint, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MembershipEndpoint to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MembershipEndpoint + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KubernetesResource. */ + interface IKubernetesResource { + + /** KubernetesResource membershipCrManifest */ + membershipCrManifest?: (string|null); + + /** KubernetesResource membershipResources */ + membershipResources?: (google.cloud.gkehub.v1.IResourceManifest[]|null); + + /** KubernetesResource connectResources */ + connectResources?: (google.cloud.gkehub.v1.IResourceManifest[]|null); + + /** KubernetesResource resourceOptions */ + resourceOptions?: (google.cloud.gkehub.v1.IResourceOptions|null); + } + + /** Represents a KubernetesResource. */ + class KubernetesResource implements IKubernetesResource { + + /** + * Constructs a new KubernetesResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IKubernetesResource); + + /** KubernetesResource membershipCrManifest. */ + public membershipCrManifest: string; + + /** KubernetesResource membershipResources. */ + public membershipResources: google.cloud.gkehub.v1.IResourceManifest[]; + + /** KubernetesResource connectResources. */ + public connectResources: google.cloud.gkehub.v1.IResourceManifest[]; + + /** KubernetesResource resourceOptions. */ + public resourceOptions?: (google.cloud.gkehub.v1.IResourceOptions|null); + + /** + * Creates a new KubernetesResource instance using the specified properties. + * @param [properties] Properties to set + * @returns KubernetesResource instance + */ + public static create(properties?: google.cloud.gkehub.v1.IKubernetesResource): google.cloud.gkehub.v1.KubernetesResource; + + /** + * Encodes the specified KubernetesResource message. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesResource.verify|verify} messages. + * @param message KubernetesResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IKubernetesResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KubernetesResource message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesResource.verify|verify} messages. + * @param message KubernetesResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IKubernetesResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KubernetesResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KubernetesResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.KubernetesResource; + + /** + * Decodes a KubernetesResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KubernetesResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.KubernetesResource; + + /** + * Verifies a KubernetesResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KubernetesResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KubernetesResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.KubernetesResource; + + /** + * Creates a plain object from a KubernetesResource message. Also converts values to other types if specified. + * @param message KubernetesResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.KubernetesResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KubernetesResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KubernetesResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceOptions. */ + interface IResourceOptions { + + /** ResourceOptions connectVersion */ + connectVersion?: (string|null); + + /** ResourceOptions v1beta1Crd */ + v1beta1Crd?: (boolean|null); + + /** ResourceOptions k8sVersion */ + k8sVersion?: (string|null); + + /** ResourceOptions k8sGitVersion */ + k8sGitVersion?: (string|null); + } + + /** Represents a ResourceOptions. */ + class ResourceOptions implements IResourceOptions { + + /** + * Constructs a new ResourceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IResourceOptions); + + /** ResourceOptions connectVersion. */ + public connectVersion: string; + + /** ResourceOptions v1beta1Crd. */ + public v1beta1Crd: boolean; + + /** ResourceOptions k8sVersion. */ + public k8sVersion: string; + + /** ResourceOptions k8sGitVersion. */ + public k8sGitVersion: string; + + /** + * Creates a new ResourceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceOptions instance + */ + public static create(properties?: google.cloud.gkehub.v1.IResourceOptions): google.cloud.gkehub.v1.ResourceOptions; + + /** + * Encodes the specified ResourceOptions message. Does not implicitly {@link google.cloud.gkehub.v1.ResourceOptions.verify|verify} messages. + * @param message ResourceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IResourceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceOptions message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ResourceOptions.verify|verify} messages. + * @param message ResourceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IResourceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ResourceOptions; + + /** + * Decodes a ResourceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ResourceOptions; + + /** + * Verifies a ResourceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ResourceOptions; + + /** + * Creates a plain object from a ResourceOptions message. Also converts values to other types if specified. + * @param message ResourceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ResourceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceManifest. */ + interface IResourceManifest { + + /** ResourceManifest manifest */ + manifest?: (string|null); + + /** ResourceManifest clusterScoped */ + clusterScoped?: (boolean|null); + } + + /** Represents a ResourceManifest. */ + class ResourceManifest implements IResourceManifest { + + /** + * Constructs a new ResourceManifest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IResourceManifest); + + /** ResourceManifest manifest. */ + public manifest: string; + + /** ResourceManifest clusterScoped. */ + public clusterScoped: boolean; + + /** + * Creates a new ResourceManifest instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceManifest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IResourceManifest): google.cloud.gkehub.v1.ResourceManifest; + + /** + * Encodes the specified ResourceManifest message. Does not implicitly {@link google.cloud.gkehub.v1.ResourceManifest.verify|verify} messages. + * @param message ResourceManifest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IResourceManifest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceManifest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ResourceManifest.verify|verify} messages. + * @param message ResourceManifest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IResourceManifest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceManifest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceManifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ResourceManifest; + + /** + * Decodes a ResourceManifest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceManifest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ResourceManifest; + + /** + * Verifies a ResourceManifest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceManifest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceManifest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ResourceManifest; + + /** + * Creates a plain object from a ResourceManifest message. Also converts values to other types if specified. + * @param message ResourceManifest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ResourceManifest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceManifest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceManifest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GkeCluster. */ + interface IGkeCluster { + + /** GkeCluster resourceLink */ + resourceLink?: (string|null); + + /** GkeCluster clusterMissing */ + clusterMissing?: (boolean|null); + } + + /** Represents a GkeCluster. */ + class GkeCluster implements IGkeCluster { + + /** + * Constructs a new GkeCluster. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IGkeCluster); + + /** GkeCluster resourceLink. */ + public resourceLink: string; + + /** GkeCluster clusterMissing. */ + public clusterMissing: boolean; + + /** + * Creates a new GkeCluster instance using the specified properties. + * @param [properties] Properties to set + * @returns GkeCluster instance + */ + public static create(properties?: google.cloud.gkehub.v1.IGkeCluster): google.cloud.gkehub.v1.GkeCluster; + + /** + * Encodes the specified GkeCluster message. Does not implicitly {@link google.cloud.gkehub.v1.GkeCluster.verify|verify} messages. + * @param message GkeCluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IGkeCluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GkeCluster message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GkeCluster.verify|verify} messages. + * @param message GkeCluster message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IGkeCluster, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GkeCluster message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GkeCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GkeCluster; + + /** + * Decodes a GkeCluster message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GkeCluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GkeCluster; + + /** + * Verifies a GkeCluster message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GkeCluster message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GkeCluster + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GkeCluster; + + /** + * Creates a plain object from a GkeCluster message. Also converts values to other types if specified. + * @param message GkeCluster + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.GkeCluster, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GkeCluster to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GkeCluster + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a KubernetesMetadata. */ + interface IKubernetesMetadata { + + /** KubernetesMetadata kubernetesApiServerVersion */ + kubernetesApiServerVersion?: (string|null); + + /** KubernetesMetadata nodeProviderId */ + nodeProviderId?: (string|null); + + /** KubernetesMetadata nodeCount */ + nodeCount?: (number|null); + + /** KubernetesMetadata vcpuCount */ + vcpuCount?: (number|null); + + /** KubernetesMetadata memoryMb */ + memoryMb?: (number|null); + + /** KubernetesMetadata updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a KubernetesMetadata. */ + class KubernetesMetadata implements IKubernetesMetadata { + + /** + * Constructs a new KubernetesMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IKubernetesMetadata); + + /** KubernetesMetadata kubernetesApiServerVersion. */ + public kubernetesApiServerVersion: string; + + /** KubernetesMetadata nodeProviderId. */ + public nodeProviderId: string; + + /** KubernetesMetadata nodeCount. */ + public nodeCount: number; + + /** KubernetesMetadata vcpuCount. */ + public vcpuCount: number; + + /** KubernetesMetadata memoryMb. */ + public memoryMb: number; + + /** KubernetesMetadata updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new KubernetesMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns KubernetesMetadata instance + */ + public static create(properties?: google.cloud.gkehub.v1.IKubernetesMetadata): google.cloud.gkehub.v1.KubernetesMetadata; + + /** + * Encodes the specified KubernetesMetadata message. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesMetadata.verify|verify} messages. + * @param message KubernetesMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IKubernetesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified KubernetesMetadata message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesMetadata.verify|verify} messages. + * @param message KubernetesMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IKubernetesMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a KubernetesMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns KubernetesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.KubernetesMetadata; + + /** + * Decodes a KubernetesMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns KubernetesMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.KubernetesMetadata; + + /** + * Verifies a KubernetesMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a KubernetesMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns KubernetesMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.KubernetesMetadata; + + /** + * Creates a plain object from a KubernetesMetadata message. Also converts values to other types if specified. + * @param message KubernetesMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.KubernetesMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this KubernetesMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for KubernetesMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MonitoringConfig. */ + interface IMonitoringConfig { + + /** MonitoringConfig projectId */ + projectId?: (string|null); + + /** MonitoringConfig location */ + location?: (string|null); + + /** MonitoringConfig cluster */ + cluster?: (string|null); + + /** MonitoringConfig kubernetesMetricsPrefix */ + kubernetesMetricsPrefix?: (string|null); + + /** MonitoringConfig clusterHash */ + clusterHash?: (string|null); + } + + /** Represents a MonitoringConfig. */ + class MonitoringConfig implements IMonitoringConfig { + + /** + * Constructs a new MonitoringConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IMonitoringConfig); + + /** MonitoringConfig projectId. */ + public projectId: string; + + /** MonitoringConfig location. */ + public location: string; + + /** MonitoringConfig cluster. */ + public cluster: string; + + /** MonitoringConfig kubernetesMetricsPrefix. */ + public kubernetesMetricsPrefix: string; + + /** MonitoringConfig clusterHash. */ + public clusterHash: string; + + /** + * Creates a new MonitoringConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MonitoringConfig instance + */ + public static create(properties?: google.cloud.gkehub.v1.IMonitoringConfig): google.cloud.gkehub.v1.MonitoringConfig; + + /** + * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.cloud.gkehub.v1.MonitoringConfig.verify|verify} messages. + * @param message MonitoringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MonitoringConfig.verify|verify} messages. + * @param message MonitoringConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IMonitoringConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.MonitoringConfig; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MonitoringConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.MonitoringConfig; + + /** + * Verifies a MonitoringConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MonitoringConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MonitoringConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.MonitoringConfig; + + /** + * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. + * @param message MonitoringConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.MonitoringConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MonitoringConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MonitoringConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MembershipState. */ + interface IMembershipState { + + /** MembershipState code */ + code?: (google.cloud.gkehub.v1.MembershipState.Code|keyof typeof google.cloud.gkehub.v1.MembershipState.Code|null); + } + + /** Represents a MembershipState. */ + class MembershipState implements IMembershipState { + + /** + * Constructs a new MembershipState. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IMembershipState); + + /** MembershipState code. */ + public code: (google.cloud.gkehub.v1.MembershipState.Code|keyof typeof google.cloud.gkehub.v1.MembershipState.Code); + + /** + * Creates a new MembershipState instance using the specified properties. + * @param [properties] Properties to set + * @returns MembershipState instance + */ + public static create(properties?: google.cloud.gkehub.v1.IMembershipState): google.cloud.gkehub.v1.MembershipState; + + /** + * Encodes the specified MembershipState message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipState.verify|verify} messages. + * @param message MembershipState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IMembershipState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MembershipState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipState.verify|verify} messages. + * @param message MembershipState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IMembershipState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MembershipState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MembershipState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.MembershipState; + + /** + * Decodes a MembershipState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MembershipState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.MembershipState; + + /** + * Verifies a MembershipState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MembershipState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MembershipState + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.MembershipState; + + /** + * Creates a plain object from a MembershipState message. Also converts values to other types if specified. + * @param message MembershipState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.MembershipState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MembershipState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MembershipState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MembershipState { + + /** Code enum. */ + enum Code { + CODE_UNSPECIFIED = 0, + CREATING = 1, + READY = 2, + DELETING = 3, + UPDATING = 4, + SERVICE_UPDATING = 5 + } + } + + /** Properties of an Authority. */ + interface IAuthority { + + /** Authority issuer */ + issuer?: (string|null); + + /** Authority workloadIdentityPool */ + workloadIdentityPool?: (string|null); + + /** Authority identityProvider */ + identityProvider?: (string|null); + + /** Authority oidcJwks */ + oidcJwks?: (Uint8Array|Buffer|string|null); + } + + /** Represents an Authority. */ + class Authority implements IAuthority { + + /** + * Constructs a new Authority. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IAuthority); + + /** Authority issuer. */ + public issuer: string; + + /** Authority workloadIdentityPool. */ + public workloadIdentityPool: string; + + /** Authority identityProvider. */ + public identityProvider: string; + + /** Authority oidcJwks. */ + public oidcJwks: (Uint8Array|Buffer|string); + + /** + * Creates a new Authority instance using the specified properties. + * @param [properties] Properties to set + * @returns Authority instance + */ + public static create(properties?: google.cloud.gkehub.v1.IAuthority): google.cloud.gkehub.v1.Authority; + + /** + * Encodes the specified Authority message. Does not implicitly {@link google.cloud.gkehub.v1.Authority.verify|verify} messages. + * @param message Authority message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IAuthority, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Authority message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Authority.verify|verify} messages. + * @param message Authority message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IAuthority, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Authority message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Authority + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.Authority; + + /** + * Decodes an Authority message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Authority + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.Authority; + + /** + * Verifies an Authority message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Authority message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Authority + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.Authority; + + /** + * Creates a plain object from an Authority message. Also converts values to other types if specified. + * @param message Authority + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.Authority, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Authority to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Authority + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a GkeHub */ + class GkeHub extends $protobuf.rpc.Service { + + /** + * Constructs a new GkeHub service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new GkeHub service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): GkeHub; + + /** + * Calls ListMemberships. + * @param request ListMembershipsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMembershipsResponse + */ + public listMemberships(request: google.cloud.gkehub.v1.IListMembershipsRequest, callback: google.cloud.gkehub.v1.GkeHub.ListMembershipsCallback): void; + + /** + * Calls ListMemberships. + * @param request ListMembershipsRequest message or plain object + * @returns Promise + */ + public listMemberships(request: google.cloud.gkehub.v1.IListMembershipsRequest): Promise; + + /** + * Calls ListBoundMemberships. + * @param request ListBoundMembershipsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListBoundMembershipsResponse + */ + public listBoundMemberships(request: google.cloud.gkehub.v1.IListBoundMembershipsRequest, callback: google.cloud.gkehub.v1.GkeHub.ListBoundMembershipsCallback): void; + + /** + * Calls ListBoundMemberships. + * @param request ListBoundMembershipsRequest message or plain object + * @returns Promise + */ + public listBoundMemberships(request: google.cloud.gkehub.v1.IListBoundMembershipsRequest): Promise; + + /** + * Calls ListFeatures. + * @param request ListFeaturesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFeaturesResponse + */ + public listFeatures(request: google.cloud.gkehub.v1.IListFeaturesRequest, callback: google.cloud.gkehub.v1.GkeHub.ListFeaturesCallback): void; + + /** + * Calls ListFeatures. + * @param request ListFeaturesRequest message or plain object + * @returns Promise + */ + public listFeatures(request: google.cloud.gkehub.v1.IListFeaturesRequest): Promise; + + /** + * Calls GetMembership. + * @param request GetMembershipRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Membership + */ + public getMembership(request: google.cloud.gkehub.v1.IGetMembershipRequest, callback: google.cloud.gkehub.v1.GkeHub.GetMembershipCallback): void; + + /** + * Calls GetMembership. + * @param request GetMembershipRequest message or plain object + * @returns Promise + */ + public getMembership(request: google.cloud.gkehub.v1.IGetMembershipRequest): Promise; + + /** + * Calls GetFeature. + * @param request GetFeatureRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Feature + */ + public getFeature(request: google.cloud.gkehub.v1.IGetFeatureRequest, callback: google.cloud.gkehub.v1.GkeHub.GetFeatureCallback): void; + + /** + * Calls GetFeature. + * @param request GetFeatureRequest message or plain object + * @returns Promise + */ + public getFeature(request: google.cloud.gkehub.v1.IGetFeatureRequest): Promise; + + /** + * Calls CreateMembership. + * @param request CreateMembershipRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createMembership(request: google.cloud.gkehub.v1.ICreateMembershipRequest, callback: google.cloud.gkehub.v1.GkeHub.CreateMembershipCallback): void; + + /** + * Calls CreateMembership. + * @param request CreateMembershipRequest message or plain object + * @returns Promise + */ + public createMembership(request: google.cloud.gkehub.v1.ICreateMembershipRequest): Promise; + + /** + * Calls CreateFeature. + * @param request CreateFeatureRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createFeature(request: google.cloud.gkehub.v1.ICreateFeatureRequest, callback: google.cloud.gkehub.v1.GkeHub.CreateFeatureCallback): void; + + /** + * Calls CreateFeature. + * @param request CreateFeatureRequest message or plain object + * @returns Promise + */ + public createFeature(request: google.cloud.gkehub.v1.ICreateFeatureRequest): Promise; + + /** + * Calls DeleteMembership. + * @param request DeleteMembershipRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteMembership(request: google.cloud.gkehub.v1.IDeleteMembershipRequest, callback: google.cloud.gkehub.v1.GkeHub.DeleteMembershipCallback): void; + + /** + * Calls DeleteMembership. + * @param request DeleteMembershipRequest message or plain object + * @returns Promise + */ + public deleteMembership(request: google.cloud.gkehub.v1.IDeleteMembershipRequest): Promise; + + /** + * Calls DeleteFeature. + * @param request DeleteFeatureRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteFeature(request: google.cloud.gkehub.v1.IDeleteFeatureRequest, callback: google.cloud.gkehub.v1.GkeHub.DeleteFeatureCallback): void; + + /** + * Calls DeleteFeature. + * @param request DeleteFeatureRequest message or plain object + * @returns Promise + */ + public deleteFeature(request: google.cloud.gkehub.v1.IDeleteFeatureRequest): Promise; + + /** + * Calls UpdateMembership. + * @param request UpdateMembershipRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateMembership(request: google.cloud.gkehub.v1.IUpdateMembershipRequest, callback: google.cloud.gkehub.v1.GkeHub.UpdateMembershipCallback): void; + + /** + * Calls UpdateMembership. + * @param request UpdateMembershipRequest message or plain object + * @returns Promise + */ + public updateMembership(request: google.cloud.gkehub.v1.IUpdateMembershipRequest): Promise; + + /** + * Calls UpdateFeature. + * @param request UpdateFeatureRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateFeature(request: google.cloud.gkehub.v1.IUpdateFeatureRequest, callback: google.cloud.gkehub.v1.GkeHub.UpdateFeatureCallback): void; + + /** + * Calls UpdateFeature. + * @param request UpdateFeatureRequest message or plain object + * @returns Promise + */ + public updateFeature(request: google.cloud.gkehub.v1.IUpdateFeatureRequest): Promise; + + /** + * Calls GenerateConnectManifest. + * @param request GenerateConnectManifestRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateConnectManifestResponse + */ + public generateConnectManifest(request: google.cloud.gkehub.v1.IGenerateConnectManifestRequest, callback: google.cloud.gkehub.v1.GkeHub.GenerateConnectManifestCallback): void; + + /** + * Calls GenerateConnectManifest. + * @param request GenerateConnectManifestRequest message or plain object + * @returns Promise + */ + public generateConnectManifest(request: google.cloud.gkehub.v1.IGenerateConnectManifestRequest): Promise; + + /** + * Calls CreateFleet. + * @param request CreateFleetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createFleet(request: google.cloud.gkehub.v1.ICreateFleetRequest, callback: google.cloud.gkehub.v1.GkeHub.CreateFleetCallback): void; + + /** + * Calls CreateFleet. + * @param request CreateFleetRequest message or plain object + * @returns Promise + */ + public createFleet(request: google.cloud.gkehub.v1.ICreateFleetRequest): Promise; + + /** + * Calls GetFleet. + * @param request GetFleetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Fleet + */ + public getFleet(request: google.cloud.gkehub.v1.IGetFleetRequest, callback: google.cloud.gkehub.v1.GkeHub.GetFleetCallback): void; + + /** + * Calls GetFleet. + * @param request GetFleetRequest message or plain object + * @returns Promise + */ + public getFleet(request: google.cloud.gkehub.v1.IGetFleetRequest): Promise; + + /** + * Calls UpdateFleet. + * @param request UpdateFleetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateFleet(request: google.cloud.gkehub.v1.IUpdateFleetRequest, callback: google.cloud.gkehub.v1.GkeHub.UpdateFleetCallback): void; + + /** + * Calls UpdateFleet. + * @param request UpdateFleetRequest message or plain object + * @returns Promise + */ + public updateFleet(request: google.cloud.gkehub.v1.IUpdateFleetRequest): Promise; + + /** + * Calls DeleteFleet. + * @param request DeleteFleetRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteFleet(request: google.cloud.gkehub.v1.IDeleteFleetRequest, callback: google.cloud.gkehub.v1.GkeHub.DeleteFleetCallback): void; + + /** + * Calls DeleteFleet. + * @param request DeleteFleetRequest message or plain object + * @returns Promise + */ + public deleteFleet(request: google.cloud.gkehub.v1.IDeleteFleetRequest): Promise; + + /** + * Calls ListFleets. + * @param request ListFleetsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListFleetsResponse + */ + public listFleets(request: google.cloud.gkehub.v1.IListFleetsRequest, callback: google.cloud.gkehub.v1.GkeHub.ListFleetsCallback): void; + + /** + * Calls ListFleets. + * @param request ListFleetsRequest message or plain object + * @returns Promise + */ + public listFleets(request: google.cloud.gkehub.v1.IListFleetsRequest): Promise; + + /** + * Calls GetScopeNamespace. + * @param request GetScopeNamespaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Namespace + */ + public getScopeNamespace(request: google.cloud.gkehub.v1.IGetScopeNamespaceRequest, callback: google.cloud.gkehub.v1.GkeHub.GetScopeNamespaceCallback): void; + + /** + * Calls GetScopeNamespace. + * @param request GetScopeNamespaceRequest message or plain object + * @returns Promise + */ + public getScopeNamespace(request: google.cloud.gkehub.v1.IGetScopeNamespaceRequest): Promise; + + /** + * Calls CreateScopeNamespace. + * @param request CreateScopeNamespaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createScopeNamespace(request: google.cloud.gkehub.v1.ICreateScopeNamespaceRequest, callback: google.cloud.gkehub.v1.GkeHub.CreateScopeNamespaceCallback): void; + + /** + * Calls CreateScopeNamespace. + * @param request CreateScopeNamespaceRequest message or plain object + * @returns Promise + */ + public createScopeNamespace(request: google.cloud.gkehub.v1.ICreateScopeNamespaceRequest): Promise; + + /** + * Calls UpdateScopeNamespace. + * @param request UpdateScopeNamespaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateScopeNamespace(request: google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest, callback: google.cloud.gkehub.v1.GkeHub.UpdateScopeNamespaceCallback): void; + + /** + * Calls UpdateScopeNamespace. + * @param request UpdateScopeNamespaceRequest message or plain object + * @returns Promise + */ + public updateScopeNamespace(request: google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest): Promise; + + /** + * Calls DeleteScopeNamespace. + * @param request DeleteScopeNamespaceRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteScopeNamespace(request: google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest, callback: google.cloud.gkehub.v1.GkeHub.DeleteScopeNamespaceCallback): void; + + /** + * Calls DeleteScopeNamespace. + * @param request DeleteScopeNamespaceRequest message or plain object + * @returns Promise + */ + public deleteScopeNamespace(request: google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest): Promise; + + /** + * Calls ListScopeNamespaces. + * @param request ListScopeNamespacesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListScopeNamespacesResponse + */ + public listScopeNamespaces(request: google.cloud.gkehub.v1.IListScopeNamespacesRequest, callback: google.cloud.gkehub.v1.GkeHub.ListScopeNamespacesCallback): void; + + /** + * Calls ListScopeNamespaces. + * @param request ListScopeNamespacesRequest message or plain object + * @returns Promise + */ + public listScopeNamespaces(request: google.cloud.gkehub.v1.IListScopeNamespacesRequest): Promise; + + /** + * Calls GetScopeRBACRoleBinding. + * @param request GetScopeRBACRoleBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RBACRoleBinding + */ + public getScopeRBACRoleBinding(request: google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest, callback: google.cloud.gkehub.v1.GkeHub.GetScopeRBACRoleBindingCallback): void; + + /** + * Calls GetScopeRBACRoleBinding. + * @param request GetScopeRBACRoleBindingRequest message or plain object + * @returns Promise + */ + public getScopeRBACRoleBinding(request: google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest): Promise; + + /** + * Calls CreateScopeRBACRoleBinding. + * @param request CreateScopeRBACRoleBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createScopeRBACRoleBinding(request: google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest, callback: google.cloud.gkehub.v1.GkeHub.CreateScopeRBACRoleBindingCallback): void; + + /** + * Calls CreateScopeRBACRoleBinding. + * @param request CreateScopeRBACRoleBindingRequest message or plain object + * @returns Promise + */ + public createScopeRBACRoleBinding(request: google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest): Promise; + + /** + * Calls UpdateScopeRBACRoleBinding. + * @param request UpdateScopeRBACRoleBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateScopeRBACRoleBinding(request: google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest, callback: google.cloud.gkehub.v1.GkeHub.UpdateScopeRBACRoleBindingCallback): void; + + /** + * Calls UpdateScopeRBACRoleBinding. + * @param request UpdateScopeRBACRoleBindingRequest message or plain object + * @returns Promise + */ + public updateScopeRBACRoleBinding(request: google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest): Promise; + + /** + * Calls DeleteScopeRBACRoleBinding. + * @param request DeleteScopeRBACRoleBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteScopeRBACRoleBinding(request: google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest, callback: google.cloud.gkehub.v1.GkeHub.DeleteScopeRBACRoleBindingCallback): void; + + /** + * Calls DeleteScopeRBACRoleBinding. + * @param request DeleteScopeRBACRoleBindingRequest message or plain object + * @returns Promise + */ + public deleteScopeRBACRoleBinding(request: google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest): Promise; + + /** + * Calls ListScopeRBACRoleBindings. + * @param request ListScopeRBACRoleBindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListScopeRBACRoleBindingsResponse + */ + public listScopeRBACRoleBindings(request: google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, callback: google.cloud.gkehub.v1.GkeHub.ListScopeRBACRoleBindingsCallback): void; + + /** + * Calls ListScopeRBACRoleBindings. + * @param request ListScopeRBACRoleBindingsRequest message or plain object + * @returns Promise + */ + public listScopeRBACRoleBindings(request: google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest): Promise; + + /** + * Calls GetScope. + * @param request GetScopeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Scope + */ + public getScope(request: google.cloud.gkehub.v1.IGetScopeRequest, callback: google.cloud.gkehub.v1.GkeHub.GetScopeCallback): void; + + /** + * Calls GetScope. + * @param request GetScopeRequest message or plain object + * @returns Promise + */ + public getScope(request: google.cloud.gkehub.v1.IGetScopeRequest): Promise; + + /** + * Calls CreateScope. + * @param request CreateScopeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createScope(request: google.cloud.gkehub.v1.ICreateScopeRequest, callback: google.cloud.gkehub.v1.GkeHub.CreateScopeCallback): void; + + /** + * Calls CreateScope. + * @param request CreateScopeRequest message or plain object + * @returns Promise + */ + public createScope(request: google.cloud.gkehub.v1.ICreateScopeRequest): Promise; + + /** + * Calls UpdateScope. + * @param request UpdateScopeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateScope(request: google.cloud.gkehub.v1.IUpdateScopeRequest, callback: google.cloud.gkehub.v1.GkeHub.UpdateScopeCallback): void; + + /** + * Calls UpdateScope. + * @param request UpdateScopeRequest message or plain object + * @returns Promise + */ + public updateScope(request: google.cloud.gkehub.v1.IUpdateScopeRequest): Promise; + + /** + * Calls DeleteScope. + * @param request DeleteScopeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteScope(request: google.cloud.gkehub.v1.IDeleteScopeRequest, callback: google.cloud.gkehub.v1.GkeHub.DeleteScopeCallback): void; + + /** + * Calls DeleteScope. + * @param request DeleteScopeRequest message or plain object + * @returns Promise + */ + public deleteScope(request: google.cloud.gkehub.v1.IDeleteScopeRequest): Promise; + + /** + * Calls ListScopes. + * @param request ListScopesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListScopesResponse + */ + public listScopes(request: google.cloud.gkehub.v1.IListScopesRequest, callback: google.cloud.gkehub.v1.GkeHub.ListScopesCallback): void; + + /** + * Calls ListScopes. + * @param request ListScopesRequest message or plain object + * @returns Promise + */ + public listScopes(request: google.cloud.gkehub.v1.IListScopesRequest): Promise; + + /** + * Calls ListPermittedScopes. + * @param request ListPermittedScopesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListPermittedScopesResponse + */ + public listPermittedScopes(request: google.cloud.gkehub.v1.IListPermittedScopesRequest, callback: google.cloud.gkehub.v1.GkeHub.ListPermittedScopesCallback): void; + + /** + * Calls ListPermittedScopes. + * @param request ListPermittedScopesRequest message or plain object + * @returns Promise + */ + public listPermittedScopes(request: google.cloud.gkehub.v1.IListPermittedScopesRequest): Promise; + + /** + * Calls GetMembershipBinding. + * @param request GetMembershipBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MembershipBinding + */ + public getMembershipBinding(request: google.cloud.gkehub.v1.IGetMembershipBindingRequest, callback: google.cloud.gkehub.v1.GkeHub.GetMembershipBindingCallback): void; + + /** + * Calls GetMembershipBinding. + * @param request GetMembershipBindingRequest message or plain object + * @returns Promise + */ + public getMembershipBinding(request: google.cloud.gkehub.v1.IGetMembershipBindingRequest): Promise; + + /** + * Calls CreateMembershipBinding. + * @param request CreateMembershipBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createMembershipBinding(request: google.cloud.gkehub.v1.ICreateMembershipBindingRequest, callback: google.cloud.gkehub.v1.GkeHub.CreateMembershipBindingCallback): void; + + /** + * Calls CreateMembershipBinding. + * @param request CreateMembershipBindingRequest message or plain object + * @returns Promise + */ + public createMembershipBinding(request: google.cloud.gkehub.v1.ICreateMembershipBindingRequest): Promise; + + /** + * Calls UpdateMembershipBinding. + * @param request UpdateMembershipBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateMembershipBinding(request: google.cloud.gkehub.v1.IUpdateMembershipBindingRequest, callback: google.cloud.gkehub.v1.GkeHub.UpdateMembershipBindingCallback): void; + + /** + * Calls UpdateMembershipBinding. + * @param request UpdateMembershipBindingRequest message or plain object + * @returns Promise + */ + public updateMembershipBinding(request: google.cloud.gkehub.v1.IUpdateMembershipBindingRequest): Promise; + + /** + * Calls DeleteMembershipBinding. + * @param request DeleteMembershipBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteMembershipBinding(request: google.cloud.gkehub.v1.IDeleteMembershipBindingRequest, callback: google.cloud.gkehub.v1.GkeHub.DeleteMembershipBindingCallback): void; + + /** + * Calls DeleteMembershipBinding. + * @param request DeleteMembershipBindingRequest message or plain object + * @returns Promise + */ + public deleteMembershipBinding(request: google.cloud.gkehub.v1.IDeleteMembershipBindingRequest): Promise; + + /** + * Calls ListMembershipBindings. + * @param request ListMembershipBindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMembershipBindingsResponse + */ + public listMembershipBindings(request: google.cloud.gkehub.v1.IListMembershipBindingsRequest, callback: google.cloud.gkehub.v1.GkeHub.ListMembershipBindingsCallback): void; + + /** + * Calls ListMembershipBindings. + * @param request ListMembershipBindingsRequest message or plain object + * @returns Promise + */ + public listMembershipBindings(request: google.cloud.gkehub.v1.IListMembershipBindingsRequest): Promise; + + /** + * Calls GetMembershipRBACRoleBinding. + * @param request GetMembershipRBACRoleBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and RBACRoleBinding + */ + public getMembershipRBACRoleBinding(request: google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest, callback: google.cloud.gkehub.v1.GkeHub.GetMembershipRBACRoleBindingCallback): void; + + /** + * Calls GetMembershipRBACRoleBinding. + * @param request GetMembershipRBACRoleBindingRequest message or plain object + * @returns Promise + */ + public getMembershipRBACRoleBinding(request: google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest): Promise; + + /** + * Calls CreateMembershipRBACRoleBinding. + * @param request CreateMembershipRBACRoleBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createMembershipRBACRoleBinding(request: google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest, callback: google.cloud.gkehub.v1.GkeHub.CreateMembershipRBACRoleBindingCallback): void; + + /** + * Calls CreateMembershipRBACRoleBinding. + * @param request CreateMembershipRBACRoleBindingRequest message or plain object + * @returns Promise + */ + public createMembershipRBACRoleBinding(request: google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest): Promise; + + /** + * Calls UpdateMembershipRBACRoleBinding. + * @param request UpdateMembershipRBACRoleBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateMembershipRBACRoleBinding(request: google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest, callback: google.cloud.gkehub.v1.GkeHub.UpdateMembershipRBACRoleBindingCallback): void; + + /** + * Calls UpdateMembershipRBACRoleBinding. + * @param request UpdateMembershipRBACRoleBindingRequest message or plain object + * @returns Promise + */ + public updateMembershipRBACRoleBinding(request: google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest): Promise; + + /** + * Calls DeleteMembershipRBACRoleBinding. + * @param request DeleteMembershipRBACRoleBindingRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteMembershipRBACRoleBinding(request: google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest, callback: google.cloud.gkehub.v1.GkeHub.DeleteMembershipRBACRoleBindingCallback): void; + + /** + * Calls DeleteMembershipRBACRoleBinding. + * @param request DeleteMembershipRBACRoleBindingRequest message or plain object + * @returns Promise + */ + public deleteMembershipRBACRoleBinding(request: google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest): Promise; + + /** + * Calls ListMembershipRBACRoleBindings. + * @param request ListMembershipRBACRoleBindingsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMembershipRBACRoleBindingsResponse + */ + public listMembershipRBACRoleBindings(request: google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, callback: google.cloud.gkehub.v1.GkeHub.ListMembershipRBACRoleBindingsCallback): void; + + /** + * Calls ListMembershipRBACRoleBindings. + * @param request ListMembershipRBACRoleBindingsRequest message or plain object + * @returns Promise + */ + public listMembershipRBACRoleBindings(request: google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest): Promise; + + /** + * Calls GenerateMembershipRBACRoleBindingYAML. + * @param request GenerateMembershipRBACRoleBindingYAMLRequest message or plain object + * @param callback Node-style callback called with the error, if any, and GenerateMembershipRBACRoleBindingYAMLResponse + */ + public generateMembershipRBACRoleBindingYAML(request: google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest, callback: google.cloud.gkehub.v1.GkeHub.GenerateMembershipRBACRoleBindingYAMLCallback): void; + + /** + * Calls GenerateMembershipRBACRoleBindingYAML. + * @param request GenerateMembershipRBACRoleBindingYAMLRequest message or plain object + * @returns Promise + */ + public generateMembershipRBACRoleBindingYAML(request: google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest): Promise; + } + + namespace GkeHub { + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listMemberships}. + * @param error Error, if any + * @param [response] ListMembershipsResponse + */ + type ListMembershipsCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.ListMembershipsResponse) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listBoundMemberships}. + * @param error Error, if any + * @param [response] ListBoundMembershipsResponse + */ + type ListBoundMembershipsCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.ListBoundMembershipsResponse) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listFeatures}. + * @param error Error, if any + * @param [response] ListFeaturesResponse + */ + type ListFeaturesCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.ListFeaturesResponse) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getMembership}. + * @param error Error, if any + * @param [response] Membership + */ + type GetMembershipCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.Membership) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getFeature}. + * @param error Error, if any + * @param [response] Feature + */ + type GetFeatureCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.Feature) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createMembership}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateMembershipCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createFeature}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateFeatureCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteMembership}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteMembershipCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteFeature}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteFeatureCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateMembership}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateMembershipCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateFeature}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateFeatureCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|generateConnectManifest}. + * @param error Error, if any + * @param [response] GenerateConnectManifestResponse + */ + type GenerateConnectManifestCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.GenerateConnectManifestResponse) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createFleet}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateFleetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getFleet}. + * @param error Error, if any + * @param [response] Fleet + */ + type GetFleetCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.Fleet) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateFleet}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateFleetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteFleet}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteFleetCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listFleets}. + * @param error Error, if any + * @param [response] ListFleetsResponse + */ + type ListFleetsCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.ListFleetsResponse) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getScopeNamespace}. + * @param error Error, if any + * @param [response] Namespace + */ + type GetScopeNamespaceCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.Namespace) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createScopeNamespace}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateScopeNamespaceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateScopeNamespace}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateScopeNamespaceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteScopeNamespace}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteScopeNamespaceCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listScopeNamespaces}. + * @param error Error, if any + * @param [response] ListScopeNamespacesResponse + */ + type ListScopeNamespacesCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.ListScopeNamespacesResponse) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getScopeRBACRoleBinding}. + * @param error Error, if any + * @param [response] RBACRoleBinding + */ + type GetScopeRBACRoleBindingCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.RBACRoleBinding) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createScopeRBACRoleBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateScopeRBACRoleBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateScopeRBACRoleBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateScopeRBACRoleBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteScopeRBACRoleBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteScopeRBACRoleBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listScopeRBACRoleBindings}. + * @param error Error, if any + * @param [response] ListScopeRBACRoleBindingsResponse + */ + type ListScopeRBACRoleBindingsCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getScope}. + * @param error Error, if any + * @param [response] Scope + */ + type GetScopeCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.Scope) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createScope}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateScopeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateScope}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateScopeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteScope}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteScopeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listScopes}. + * @param error Error, if any + * @param [response] ListScopesResponse + */ + type ListScopesCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.ListScopesResponse) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listPermittedScopes}. + * @param error Error, if any + * @param [response] ListPermittedScopesResponse + */ + type ListPermittedScopesCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.ListPermittedScopesResponse) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getMembershipBinding}. + * @param error Error, if any + * @param [response] MembershipBinding + */ + type GetMembershipBindingCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.MembershipBinding) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createMembershipBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateMembershipBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateMembershipBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateMembershipBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteMembershipBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteMembershipBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listMembershipBindings}. + * @param error Error, if any + * @param [response] ListMembershipBindingsResponse + */ + type ListMembershipBindingsCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.ListMembershipBindingsResponse) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getMembershipRBACRoleBinding}. + * @param error Error, if any + * @param [response] RBACRoleBinding + */ + type GetMembershipRBACRoleBindingCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.RBACRoleBinding) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createMembershipRBACRoleBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateMembershipRBACRoleBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateMembershipRBACRoleBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateMembershipRBACRoleBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteMembershipRBACRoleBinding}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteMembershipRBACRoleBindingCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listMembershipRBACRoleBindings}. + * @param error Error, if any + * @param [response] ListMembershipRBACRoleBindingsResponse + */ + type ListMembershipRBACRoleBindingsCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse) => void; + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|generateMembershipRBACRoleBindingYAML}. + * @param error Error, if any + * @param [response] GenerateMembershipRBACRoleBindingYAMLResponse + */ + type GenerateMembershipRBACRoleBindingYAMLCallback = (error: (Error|null), response?: google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse) => void; + } + + /** Properties of a GetScopeNamespaceRequest. */ + interface IGetScopeNamespaceRequest { + + /** GetScopeNamespaceRequest name */ + name?: (string|null); + } + + /** Represents a GetScopeNamespaceRequest. */ + class GetScopeNamespaceRequest implements IGetScopeNamespaceRequest { + + /** + * Constructs a new GetScopeNamespaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IGetScopeNamespaceRequest); + + /** GetScopeNamespaceRequest name. */ + public name: string; + + /** + * Creates a new GetScopeNamespaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetScopeNamespaceRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IGetScopeNamespaceRequest): google.cloud.gkehub.v1.GetScopeNamespaceRequest; + + /** + * Encodes the specified GetScopeNamespaceRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetScopeNamespaceRequest.verify|verify} messages. + * @param message GetScopeNamespaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IGetScopeNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetScopeNamespaceRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetScopeNamespaceRequest.verify|verify} messages. + * @param message GetScopeNamespaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IGetScopeNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetScopeNamespaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GetScopeNamespaceRequest; + + /** + * Decodes a GetScopeNamespaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GetScopeNamespaceRequest; + + /** + * Verifies a GetScopeNamespaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetScopeNamespaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetScopeNamespaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GetScopeNamespaceRequest; + + /** + * Creates a plain object from a GetScopeNamespaceRequest message. Also converts values to other types if specified. + * @param message GetScopeNamespaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.GetScopeNamespaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetScopeNamespaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetScopeNamespaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateScopeNamespaceRequest. */ + interface ICreateScopeNamespaceRequest { + + /** CreateScopeNamespaceRequest parent */ + parent?: (string|null); + + /** CreateScopeNamespaceRequest scopeNamespaceId */ + scopeNamespaceId?: (string|null); + + /** CreateScopeNamespaceRequest scopeNamespace */ + scopeNamespace?: (google.cloud.gkehub.v1.INamespace|null); + } + + /** Represents a CreateScopeNamespaceRequest. */ + class CreateScopeNamespaceRequest implements ICreateScopeNamespaceRequest { + + /** + * Constructs a new CreateScopeNamespaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.ICreateScopeNamespaceRequest); + + /** CreateScopeNamespaceRequest parent. */ + public parent: string; + + /** CreateScopeNamespaceRequest scopeNamespaceId. */ + public scopeNamespaceId: string; + + /** CreateScopeNamespaceRequest scopeNamespace. */ + public scopeNamespace?: (google.cloud.gkehub.v1.INamespace|null); + + /** + * Creates a new CreateScopeNamespaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateScopeNamespaceRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.ICreateScopeNamespaceRequest): google.cloud.gkehub.v1.CreateScopeNamespaceRequest; + + /** + * Encodes the specified CreateScopeNamespaceRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateScopeNamespaceRequest.verify|verify} messages. + * @param message CreateScopeNamespaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.ICreateScopeNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateScopeNamespaceRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateScopeNamespaceRequest.verify|verify} messages. + * @param message CreateScopeNamespaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.ICreateScopeNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateScopeNamespaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.CreateScopeNamespaceRequest; + + /** + * Decodes a CreateScopeNamespaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.CreateScopeNamespaceRequest; + + /** + * Verifies a CreateScopeNamespaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateScopeNamespaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateScopeNamespaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.CreateScopeNamespaceRequest; + + /** + * Creates a plain object from a CreateScopeNamespaceRequest message. Also converts values to other types if specified. + * @param message CreateScopeNamespaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.CreateScopeNamespaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateScopeNamespaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateScopeNamespaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateScopeNamespaceRequest. */ + interface IUpdateScopeNamespaceRequest { + + /** UpdateScopeNamespaceRequest scopeNamespace */ + scopeNamespace?: (google.cloud.gkehub.v1.INamespace|null); + + /** UpdateScopeNamespaceRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateScopeNamespaceRequest. */ + class UpdateScopeNamespaceRequest implements IUpdateScopeNamespaceRequest { + + /** + * Constructs a new UpdateScopeNamespaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest); + + /** UpdateScopeNamespaceRequest scopeNamespace. */ + public scopeNamespace?: (google.cloud.gkehub.v1.INamespace|null); + + /** UpdateScopeNamespaceRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateScopeNamespaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateScopeNamespaceRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest): google.cloud.gkehub.v1.UpdateScopeNamespaceRequest; + + /** + * Encodes the specified UpdateScopeNamespaceRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateScopeNamespaceRequest.verify|verify} messages. + * @param message UpdateScopeNamespaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateScopeNamespaceRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateScopeNamespaceRequest.verify|verify} messages. + * @param message UpdateScopeNamespaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateScopeNamespaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.UpdateScopeNamespaceRequest; + + /** + * Decodes an UpdateScopeNamespaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.UpdateScopeNamespaceRequest; + + /** + * Verifies an UpdateScopeNamespaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateScopeNamespaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateScopeNamespaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.UpdateScopeNamespaceRequest; + + /** + * Creates a plain object from an UpdateScopeNamespaceRequest message. Also converts values to other types if specified. + * @param message UpdateScopeNamespaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.UpdateScopeNamespaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateScopeNamespaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateScopeNamespaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteScopeNamespaceRequest. */ + interface IDeleteScopeNamespaceRequest { + + /** DeleteScopeNamespaceRequest name */ + name?: (string|null); + } + + /** Represents a DeleteScopeNamespaceRequest. */ + class DeleteScopeNamespaceRequest implements IDeleteScopeNamespaceRequest { + + /** + * Constructs a new DeleteScopeNamespaceRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest); + + /** DeleteScopeNamespaceRequest name. */ + public name: string; + + /** + * Creates a new DeleteScopeNamespaceRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteScopeNamespaceRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest): google.cloud.gkehub.v1.DeleteScopeNamespaceRequest; + + /** + * Encodes the specified DeleteScopeNamespaceRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteScopeNamespaceRequest.verify|verify} messages. + * @param message DeleteScopeNamespaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteScopeNamespaceRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteScopeNamespaceRequest.verify|verify} messages. + * @param message DeleteScopeNamespaceRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteScopeNamespaceRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.DeleteScopeNamespaceRequest; + + /** + * Decodes a DeleteScopeNamespaceRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.DeleteScopeNamespaceRequest; + + /** + * Verifies a DeleteScopeNamespaceRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteScopeNamespaceRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteScopeNamespaceRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.DeleteScopeNamespaceRequest; + + /** + * Creates a plain object from a DeleteScopeNamespaceRequest message. Also converts values to other types if specified. + * @param message DeleteScopeNamespaceRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.DeleteScopeNamespaceRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteScopeNamespaceRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteScopeNamespaceRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListScopeNamespacesRequest. */ + interface IListScopeNamespacesRequest { + + /** ListScopeNamespacesRequest parent */ + parent?: (string|null); + + /** ListScopeNamespacesRequest pageSize */ + pageSize?: (number|null); + + /** ListScopeNamespacesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListScopeNamespacesRequest. */ + class ListScopeNamespacesRequest implements IListScopeNamespacesRequest { + + /** + * Constructs a new ListScopeNamespacesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListScopeNamespacesRequest); + + /** ListScopeNamespacesRequest parent. */ + public parent: string; + + /** ListScopeNamespacesRequest pageSize. */ + public pageSize: number; + + /** ListScopeNamespacesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListScopeNamespacesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListScopeNamespacesRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListScopeNamespacesRequest): google.cloud.gkehub.v1.ListScopeNamespacesRequest; + + /** + * Encodes the specified ListScopeNamespacesRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeNamespacesRequest.verify|verify} messages. + * @param message ListScopeNamespacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListScopeNamespacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListScopeNamespacesRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeNamespacesRequest.verify|verify} messages. + * @param message ListScopeNamespacesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListScopeNamespacesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListScopeNamespacesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListScopeNamespacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListScopeNamespacesRequest; + + /** + * Decodes a ListScopeNamespacesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListScopeNamespacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListScopeNamespacesRequest; + + /** + * Verifies a ListScopeNamespacesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListScopeNamespacesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListScopeNamespacesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListScopeNamespacesRequest; + + /** + * Creates a plain object from a ListScopeNamespacesRequest message. Also converts values to other types if specified. + * @param message ListScopeNamespacesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListScopeNamespacesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListScopeNamespacesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListScopeNamespacesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListScopeNamespacesResponse. */ + interface IListScopeNamespacesResponse { + + /** ListScopeNamespacesResponse scopeNamespaces */ + scopeNamespaces?: (google.cloud.gkehub.v1.INamespace[]|null); + + /** ListScopeNamespacesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListScopeNamespacesResponse. */ + class ListScopeNamespacesResponse implements IListScopeNamespacesResponse { + + /** + * Constructs a new ListScopeNamespacesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListScopeNamespacesResponse); + + /** ListScopeNamespacesResponse scopeNamespaces. */ + public scopeNamespaces: google.cloud.gkehub.v1.INamespace[]; + + /** ListScopeNamespacesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListScopeNamespacesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListScopeNamespacesResponse instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListScopeNamespacesResponse): google.cloud.gkehub.v1.ListScopeNamespacesResponse; + + /** + * Encodes the specified ListScopeNamespacesResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeNamespacesResponse.verify|verify} messages. + * @param message ListScopeNamespacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListScopeNamespacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListScopeNamespacesResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeNamespacesResponse.verify|verify} messages. + * @param message ListScopeNamespacesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListScopeNamespacesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListScopeNamespacesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListScopeNamespacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListScopeNamespacesResponse; + + /** + * Decodes a ListScopeNamespacesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListScopeNamespacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListScopeNamespacesResponse; + + /** + * Verifies a ListScopeNamespacesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListScopeNamespacesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListScopeNamespacesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListScopeNamespacesResponse; + + /** + * Creates a plain object from a ListScopeNamespacesResponse message. Also converts values to other types if specified. + * @param message ListScopeNamespacesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListScopeNamespacesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListScopeNamespacesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListScopeNamespacesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetScopeRBACRoleBindingRequest. */ + interface IGetScopeRBACRoleBindingRequest { + + /** GetScopeRBACRoleBindingRequest name */ + name?: (string|null); + } + + /** Represents a GetScopeRBACRoleBindingRequest. */ + class GetScopeRBACRoleBindingRequest implements IGetScopeRBACRoleBindingRequest { + + /** + * Constructs a new GetScopeRBACRoleBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest); + + /** GetScopeRBACRoleBindingRequest name. */ + public name: string; + + /** + * Creates a new GetScopeRBACRoleBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetScopeRBACRoleBindingRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest): google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest; + + /** + * Encodes the specified GetScopeRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest.verify|verify} messages. + * @param message GetScopeRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetScopeRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest.verify|verify} messages. + * @param message GetScopeRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetScopeRBACRoleBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest; + + /** + * Decodes a GetScopeRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest; + + /** + * Verifies a GetScopeRBACRoleBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetScopeRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetScopeRBACRoleBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest; + + /** + * Creates a plain object from a GetScopeRBACRoleBindingRequest message. Also converts values to other types if specified. + * @param message GetScopeRBACRoleBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetScopeRBACRoleBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetScopeRBACRoleBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateScopeRBACRoleBindingRequest. */ + interface ICreateScopeRBACRoleBindingRequest { + + /** CreateScopeRBACRoleBindingRequest parent */ + parent?: (string|null); + + /** CreateScopeRBACRoleBindingRequest rbacrolebindingId */ + rbacrolebindingId?: (string|null); + + /** CreateScopeRBACRoleBindingRequest rbacrolebinding */ + rbacrolebinding?: (google.cloud.gkehub.v1.IRBACRoleBinding|null); + } + + /** Represents a CreateScopeRBACRoleBindingRequest. */ + class CreateScopeRBACRoleBindingRequest implements ICreateScopeRBACRoleBindingRequest { + + /** + * Constructs a new CreateScopeRBACRoleBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest); + + /** CreateScopeRBACRoleBindingRequest parent. */ + public parent: string; + + /** CreateScopeRBACRoleBindingRequest rbacrolebindingId. */ + public rbacrolebindingId: string; + + /** CreateScopeRBACRoleBindingRequest rbacrolebinding. */ + public rbacrolebinding?: (google.cloud.gkehub.v1.IRBACRoleBinding|null); + + /** + * Creates a new CreateScopeRBACRoleBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateScopeRBACRoleBindingRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest): google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest; + + /** + * Encodes the specified CreateScopeRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest.verify|verify} messages. + * @param message CreateScopeRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateScopeRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest.verify|verify} messages. + * @param message CreateScopeRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateScopeRBACRoleBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest; + + /** + * Decodes a CreateScopeRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest; + + /** + * Verifies a CreateScopeRBACRoleBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateScopeRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateScopeRBACRoleBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest; + + /** + * Creates a plain object from a CreateScopeRBACRoleBindingRequest message. Also converts values to other types if specified. + * @param message CreateScopeRBACRoleBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateScopeRBACRoleBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateScopeRBACRoleBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateScopeRBACRoleBindingRequest. */ + interface IUpdateScopeRBACRoleBindingRequest { + + /** UpdateScopeRBACRoleBindingRequest rbacrolebinding */ + rbacrolebinding?: (google.cloud.gkehub.v1.IRBACRoleBinding|null); + + /** UpdateScopeRBACRoleBindingRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateScopeRBACRoleBindingRequest. */ + class UpdateScopeRBACRoleBindingRequest implements IUpdateScopeRBACRoleBindingRequest { + + /** + * Constructs a new UpdateScopeRBACRoleBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest); + + /** UpdateScopeRBACRoleBindingRequest rbacrolebinding. */ + public rbacrolebinding?: (google.cloud.gkehub.v1.IRBACRoleBinding|null); + + /** UpdateScopeRBACRoleBindingRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateScopeRBACRoleBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateScopeRBACRoleBindingRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest): google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest; + + /** + * Encodes the specified UpdateScopeRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest.verify|verify} messages. + * @param message UpdateScopeRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateScopeRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest.verify|verify} messages. + * @param message UpdateScopeRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateScopeRBACRoleBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest; + + /** + * Decodes an UpdateScopeRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest; + + /** + * Verifies an UpdateScopeRBACRoleBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateScopeRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateScopeRBACRoleBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest; + + /** + * Creates a plain object from an UpdateScopeRBACRoleBindingRequest message. Also converts values to other types if specified. + * @param message UpdateScopeRBACRoleBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateScopeRBACRoleBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateScopeRBACRoleBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteScopeRBACRoleBindingRequest. */ + interface IDeleteScopeRBACRoleBindingRequest { + + /** DeleteScopeRBACRoleBindingRequest name */ + name?: (string|null); + } + + /** Represents a DeleteScopeRBACRoleBindingRequest. */ + class DeleteScopeRBACRoleBindingRequest implements IDeleteScopeRBACRoleBindingRequest { + + /** + * Constructs a new DeleteScopeRBACRoleBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest); + + /** DeleteScopeRBACRoleBindingRequest name. */ + public name: string; + + /** + * Creates a new DeleteScopeRBACRoleBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteScopeRBACRoleBindingRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest): google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest; + + /** + * Encodes the specified DeleteScopeRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest.verify|verify} messages. + * @param message DeleteScopeRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteScopeRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest.verify|verify} messages. + * @param message DeleteScopeRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteScopeRBACRoleBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest; + + /** + * Decodes a DeleteScopeRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest; + + /** + * Verifies a DeleteScopeRBACRoleBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteScopeRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteScopeRBACRoleBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest; + + /** + * Creates a plain object from a DeleteScopeRBACRoleBindingRequest message. Also converts values to other types if specified. + * @param message DeleteScopeRBACRoleBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteScopeRBACRoleBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteScopeRBACRoleBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListScopeRBACRoleBindingsRequest. */ + interface IListScopeRBACRoleBindingsRequest { + + /** ListScopeRBACRoleBindingsRequest parent */ + parent?: (string|null); + + /** ListScopeRBACRoleBindingsRequest pageSize */ + pageSize?: (number|null); + + /** ListScopeRBACRoleBindingsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListScopeRBACRoleBindingsRequest. */ + class ListScopeRBACRoleBindingsRequest implements IListScopeRBACRoleBindingsRequest { + + /** + * Constructs a new ListScopeRBACRoleBindingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest); + + /** ListScopeRBACRoleBindingsRequest parent. */ + public parent: string; + + /** ListScopeRBACRoleBindingsRequest pageSize. */ + public pageSize: number; + + /** ListScopeRBACRoleBindingsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListScopeRBACRoleBindingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListScopeRBACRoleBindingsRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest): google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest; + + /** + * Encodes the specified ListScopeRBACRoleBindingsRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest.verify|verify} messages. + * @param message ListScopeRBACRoleBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListScopeRBACRoleBindingsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest.verify|verify} messages. + * @param message ListScopeRBACRoleBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListScopeRBACRoleBindingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListScopeRBACRoleBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest; + + /** + * Decodes a ListScopeRBACRoleBindingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListScopeRBACRoleBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest; + + /** + * Verifies a ListScopeRBACRoleBindingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListScopeRBACRoleBindingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListScopeRBACRoleBindingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest; + + /** + * Creates a plain object from a ListScopeRBACRoleBindingsRequest message. Also converts values to other types if specified. + * @param message ListScopeRBACRoleBindingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListScopeRBACRoleBindingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListScopeRBACRoleBindingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListScopeRBACRoleBindingsResponse. */ + interface IListScopeRBACRoleBindingsResponse { + + /** ListScopeRBACRoleBindingsResponse rbacrolebindings */ + rbacrolebindings?: (google.cloud.gkehub.v1.IRBACRoleBinding[]|null); + + /** ListScopeRBACRoleBindingsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListScopeRBACRoleBindingsResponse. */ + class ListScopeRBACRoleBindingsResponse implements IListScopeRBACRoleBindingsResponse { + + /** + * Constructs a new ListScopeRBACRoleBindingsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse); + + /** ListScopeRBACRoleBindingsResponse rbacrolebindings. */ + public rbacrolebindings: google.cloud.gkehub.v1.IRBACRoleBinding[]; + + /** ListScopeRBACRoleBindingsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListScopeRBACRoleBindingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListScopeRBACRoleBindingsResponse instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse): google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse; + + /** + * Encodes the specified ListScopeRBACRoleBindingsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse.verify|verify} messages. + * @param message ListScopeRBACRoleBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListScopeRBACRoleBindingsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse.verify|verify} messages. + * @param message ListScopeRBACRoleBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListScopeRBACRoleBindingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListScopeRBACRoleBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse; + + /** + * Decodes a ListScopeRBACRoleBindingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListScopeRBACRoleBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse; + + /** + * Verifies a ListScopeRBACRoleBindingsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListScopeRBACRoleBindingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListScopeRBACRoleBindingsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse; + + /** + * Creates a plain object from a ListScopeRBACRoleBindingsResponse message. Also converts values to other types if specified. + * @param message ListScopeRBACRoleBindingsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListScopeRBACRoleBindingsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListScopeRBACRoleBindingsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetScopeRequest. */ + interface IGetScopeRequest { + + /** GetScopeRequest name */ + name?: (string|null); + } + + /** Represents a GetScopeRequest. */ + class GetScopeRequest implements IGetScopeRequest { + + /** + * Constructs a new GetScopeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IGetScopeRequest); + + /** GetScopeRequest name. */ + public name: string; + + /** + * Creates a new GetScopeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetScopeRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IGetScopeRequest): google.cloud.gkehub.v1.GetScopeRequest; + + /** + * Encodes the specified GetScopeRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetScopeRequest.verify|verify} messages. + * @param message GetScopeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IGetScopeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetScopeRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetScopeRequest.verify|verify} messages. + * @param message GetScopeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IGetScopeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetScopeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GetScopeRequest; + + /** + * Decodes a GetScopeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GetScopeRequest; + + /** + * Verifies a GetScopeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetScopeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetScopeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GetScopeRequest; + + /** + * Creates a plain object from a GetScopeRequest message. Also converts values to other types if specified. + * @param message GetScopeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.GetScopeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetScopeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetScopeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateScopeRequest. */ + interface ICreateScopeRequest { + + /** CreateScopeRequest parent */ + parent?: (string|null); + + /** CreateScopeRequest scopeId */ + scopeId?: (string|null); + + /** CreateScopeRequest scope */ + scope?: (google.cloud.gkehub.v1.IScope|null); + } + + /** Represents a CreateScopeRequest. */ + class CreateScopeRequest implements ICreateScopeRequest { + + /** + * Constructs a new CreateScopeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.ICreateScopeRequest); + + /** CreateScopeRequest parent. */ + public parent: string; + + /** CreateScopeRequest scopeId. */ + public scopeId: string; + + /** CreateScopeRequest scope. */ + public scope?: (google.cloud.gkehub.v1.IScope|null); + + /** + * Creates a new CreateScopeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateScopeRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.ICreateScopeRequest): google.cloud.gkehub.v1.CreateScopeRequest; + + /** + * Encodes the specified CreateScopeRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateScopeRequest.verify|verify} messages. + * @param message CreateScopeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.ICreateScopeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateScopeRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateScopeRequest.verify|verify} messages. + * @param message CreateScopeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.ICreateScopeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateScopeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.CreateScopeRequest; + + /** + * Decodes a CreateScopeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.CreateScopeRequest; + + /** + * Verifies a CreateScopeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateScopeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateScopeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.CreateScopeRequest; + + /** + * Creates a plain object from a CreateScopeRequest message. Also converts values to other types if specified. + * @param message CreateScopeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.CreateScopeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateScopeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateScopeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateScopeRequest. */ + interface IUpdateScopeRequest { + + /** UpdateScopeRequest scope */ + scope?: (google.cloud.gkehub.v1.IScope|null); + + /** UpdateScopeRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateScopeRequest. */ + class UpdateScopeRequest implements IUpdateScopeRequest { + + /** + * Constructs a new UpdateScopeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IUpdateScopeRequest); + + /** UpdateScopeRequest scope. */ + public scope?: (google.cloud.gkehub.v1.IScope|null); + + /** UpdateScopeRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateScopeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateScopeRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IUpdateScopeRequest): google.cloud.gkehub.v1.UpdateScopeRequest; + + /** + * Encodes the specified UpdateScopeRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateScopeRequest.verify|verify} messages. + * @param message UpdateScopeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IUpdateScopeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateScopeRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateScopeRequest.verify|verify} messages. + * @param message UpdateScopeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IUpdateScopeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateScopeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.UpdateScopeRequest; + + /** + * Decodes an UpdateScopeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.UpdateScopeRequest; + + /** + * Verifies an UpdateScopeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateScopeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateScopeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.UpdateScopeRequest; + + /** + * Creates a plain object from an UpdateScopeRequest message. Also converts values to other types if specified. + * @param message UpdateScopeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.UpdateScopeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateScopeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateScopeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteScopeRequest. */ + interface IDeleteScopeRequest { + + /** DeleteScopeRequest name */ + name?: (string|null); + } + + /** Represents a DeleteScopeRequest. */ + class DeleteScopeRequest implements IDeleteScopeRequest { + + /** + * Constructs a new DeleteScopeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IDeleteScopeRequest); + + /** DeleteScopeRequest name. */ + public name: string; + + /** + * Creates a new DeleteScopeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteScopeRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IDeleteScopeRequest): google.cloud.gkehub.v1.DeleteScopeRequest; + + /** + * Encodes the specified DeleteScopeRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteScopeRequest.verify|verify} messages. + * @param message DeleteScopeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IDeleteScopeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteScopeRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteScopeRequest.verify|verify} messages. + * @param message DeleteScopeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IDeleteScopeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteScopeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.DeleteScopeRequest; + + /** + * Decodes a DeleteScopeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.DeleteScopeRequest; + + /** + * Verifies a DeleteScopeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteScopeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteScopeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.DeleteScopeRequest; + + /** + * Creates a plain object from a DeleteScopeRequest message. Also converts values to other types if specified. + * @param message DeleteScopeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.DeleteScopeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteScopeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteScopeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListScopesRequest. */ + interface IListScopesRequest { + + /** ListScopesRequest parent */ + parent?: (string|null); + + /** ListScopesRequest pageSize */ + pageSize?: (number|null); + + /** ListScopesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListScopesRequest. */ + class ListScopesRequest implements IListScopesRequest { + + /** + * Constructs a new ListScopesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListScopesRequest); + + /** ListScopesRequest parent. */ + public parent: string; + + /** ListScopesRequest pageSize. */ + public pageSize: number; + + /** ListScopesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListScopesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListScopesRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListScopesRequest): google.cloud.gkehub.v1.ListScopesRequest; + + /** + * Encodes the specified ListScopesRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListScopesRequest.verify|verify} messages. + * @param message ListScopesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListScopesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListScopesRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListScopesRequest.verify|verify} messages. + * @param message ListScopesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListScopesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListScopesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListScopesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListScopesRequest; + + /** + * Decodes a ListScopesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListScopesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListScopesRequest; + + /** + * Verifies a ListScopesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListScopesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListScopesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListScopesRequest; + + /** + * Creates a plain object from a ListScopesRequest message. Also converts values to other types if specified. + * @param message ListScopesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListScopesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListScopesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListScopesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListScopesResponse. */ + interface IListScopesResponse { + + /** ListScopesResponse scopes */ + scopes?: (google.cloud.gkehub.v1.IScope[]|null); + + /** ListScopesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListScopesResponse. */ + class ListScopesResponse implements IListScopesResponse { + + /** + * Constructs a new ListScopesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListScopesResponse); + + /** ListScopesResponse scopes. */ + public scopes: google.cloud.gkehub.v1.IScope[]; + + /** ListScopesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListScopesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListScopesResponse instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListScopesResponse): google.cloud.gkehub.v1.ListScopesResponse; + + /** + * Encodes the specified ListScopesResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListScopesResponse.verify|verify} messages. + * @param message ListScopesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListScopesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListScopesResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListScopesResponse.verify|verify} messages. + * @param message ListScopesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListScopesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListScopesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListScopesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListScopesResponse; + + /** + * Decodes a ListScopesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListScopesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListScopesResponse; + + /** + * Verifies a ListScopesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListScopesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListScopesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListScopesResponse; + + /** + * Creates a plain object from a ListScopesResponse message. Also converts values to other types if specified. + * @param message ListScopesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListScopesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListScopesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListScopesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPermittedScopesRequest. */ + interface IListPermittedScopesRequest { + + /** ListPermittedScopesRequest parent */ + parent?: (string|null); + + /** ListPermittedScopesRequest pageSize */ + pageSize?: (number|null); + + /** ListPermittedScopesRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListPermittedScopesRequest. */ + class ListPermittedScopesRequest implements IListPermittedScopesRequest { + + /** + * Constructs a new ListPermittedScopesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListPermittedScopesRequest); + + /** ListPermittedScopesRequest parent. */ + public parent: string; + + /** ListPermittedScopesRequest pageSize. */ + public pageSize: number; + + /** ListPermittedScopesRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListPermittedScopesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPermittedScopesRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListPermittedScopesRequest): google.cloud.gkehub.v1.ListPermittedScopesRequest; + + /** + * Encodes the specified ListPermittedScopesRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListPermittedScopesRequest.verify|verify} messages. + * @param message ListPermittedScopesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListPermittedScopesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPermittedScopesRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListPermittedScopesRequest.verify|verify} messages. + * @param message ListPermittedScopesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListPermittedScopesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPermittedScopesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPermittedScopesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListPermittedScopesRequest; + + /** + * Decodes a ListPermittedScopesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPermittedScopesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListPermittedScopesRequest; + + /** + * Verifies a ListPermittedScopesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPermittedScopesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPermittedScopesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListPermittedScopesRequest; + + /** + * Creates a plain object from a ListPermittedScopesRequest message. Also converts values to other types if specified. + * @param message ListPermittedScopesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListPermittedScopesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPermittedScopesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPermittedScopesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPermittedScopesResponse. */ + interface IListPermittedScopesResponse { + + /** ListPermittedScopesResponse scopes */ + scopes?: (google.cloud.gkehub.v1.IScope[]|null); + + /** ListPermittedScopesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPermittedScopesResponse. */ + class ListPermittedScopesResponse implements IListPermittedScopesResponse { + + /** + * Constructs a new ListPermittedScopesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListPermittedScopesResponse); + + /** ListPermittedScopesResponse scopes. */ + public scopes: google.cloud.gkehub.v1.IScope[]; + + /** ListPermittedScopesResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPermittedScopesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPermittedScopesResponse instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListPermittedScopesResponse): google.cloud.gkehub.v1.ListPermittedScopesResponse; + + /** + * Encodes the specified ListPermittedScopesResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListPermittedScopesResponse.verify|verify} messages. + * @param message ListPermittedScopesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListPermittedScopesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPermittedScopesResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListPermittedScopesResponse.verify|verify} messages. + * @param message ListPermittedScopesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListPermittedScopesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPermittedScopesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPermittedScopesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListPermittedScopesResponse; + + /** + * Decodes a ListPermittedScopesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPermittedScopesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListPermittedScopesResponse; + + /** + * Verifies a ListPermittedScopesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPermittedScopesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPermittedScopesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListPermittedScopesResponse; + + /** + * Creates a plain object from a ListPermittedScopesResponse message. Also converts values to other types if specified. + * @param message ListPermittedScopesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListPermittedScopesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPermittedScopesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPermittedScopesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMembershipBindingRequest. */ + interface IGetMembershipBindingRequest { + + /** GetMembershipBindingRequest name */ + name?: (string|null); + } + + /** Represents a GetMembershipBindingRequest. */ + class GetMembershipBindingRequest implements IGetMembershipBindingRequest { + + /** + * Constructs a new GetMembershipBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IGetMembershipBindingRequest); + + /** GetMembershipBindingRequest name. */ + public name: string; + + /** + * Creates a new GetMembershipBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMembershipBindingRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IGetMembershipBindingRequest): google.cloud.gkehub.v1.GetMembershipBindingRequest; + + /** + * Encodes the specified GetMembershipBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipBindingRequest.verify|verify} messages. + * @param message GetMembershipBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IGetMembershipBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMembershipBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipBindingRequest.verify|verify} messages. + * @param message GetMembershipBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IGetMembershipBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMembershipBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GetMembershipBindingRequest; + + /** + * Decodes a GetMembershipBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GetMembershipBindingRequest; + + /** + * Verifies a GetMembershipBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetMembershipBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMembershipBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GetMembershipBindingRequest; + + /** + * Creates a plain object from a GetMembershipBindingRequest message. Also converts values to other types if specified. + * @param message GetMembershipBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.GetMembershipBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMembershipBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMembershipBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateMembershipBindingRequest. */ + interface ICreateMembershipBindingRequest { + + /** CreateMembershipBindingRequest parent */ + parent?: (string|null); + + /** CreateMembershipBindingRequest membershipBinding */ + membershipBinding?: (google.cloud.gkehub.v1.IMembershipBinding|null); + + /** CreateMembershipBindingRequest membershipBindingId */ + membershipBindingId?: (string|null); + } + + /** Represents a CreateMembershipBindingRequest. */ + class CreateMembershipBindingRequest implements ICreateMembershipBindingRequest { + + /** + * Constructs a new CreateMembershipBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.ICreateMembershipBindingRequest); + + /** CreateMembershipBindingRequest parent. */ + public parent: string; + + /** CreateMembershipBindingRequest membershipBinding. */ + public membershipBinding?: (google.cloud.gkehub.v1.IMembershipBinding|null); + + /** CreateMembershipBindingRequest membershipBindingId. */ + public membershipBindingId: string; + + /** + * Creates a new CreateMembershipBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMembershipBindingRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.ICreateMembershipBindingRequest): google.cloud.gkehub.v1.CreateMembershipBindingRequest; + + /** + * Encodes the specified CreateMembershipBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipBindingRequest.verify|verify} messages. + * @param message CreateMembershipBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.ICreateMembershipBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateMembershipBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipBindingRequest.verify|verify} messages. + * @param message CreateMembershipBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.ICreateMembershipBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateMembershipBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.CreateMembershipBindingRequest; + + /** + * Decodes a CreateMembershipBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.CreateMembershipBindingRequest; + + /** + * Verifies a CreateMembershipBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateMembershipBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMembershipBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.CreateMembershipBindingRequest; + + /** + * Creates a plain object from a CreateMembershipBindingRequest message. Also converts values to other types if specified. + * @param message CreateMembershipBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.CreateMembershipBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateMembershipBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateMembershipBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateMembershipBindingRequest. */ + interface IUpdateMembershipBindingRequest { + + /** UpdateMembershipBindingRequest membershipBinding */ + membershipBinding?: (google.cloud.gkehub.v1.IMembershipBinding|null); + + /** UpdateMembershipBindingRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateMembershipBindingRequest. */ + class UpdateMembershipBindingRequest implements IUpdateMembershipBindingRequest { + + /** + * Constructs a new UpdateMembershipBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IUpdateMembershipBindingRequest); + + /** UpdateMembershipBindingRequest membershipBinding. */ + public membershipBinding?: (google.cloud.gkehub.v1.IMembershipBinding|null); + + /** UpdateMembershipBindingRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateMembershipBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateMembershipBindingRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IUpdateMembershipBindingRequest): google.cloud.gkehub.v1.UpdateMembershipBindingRequest; + + /** + * Encodes the specified UpdateMembershipBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipBindingRequest.verify|verify} messages. + * @param message UpdateMembershipBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IUpdateMembershipBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateMembershipBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipBindingRequest.verify|verify} messages. + * @param message UpdateMembershipBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IUpdateMembershipBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateMembershipBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.UpdateMembershipBindingRequest; + + /** + * Decodes an UpdateMembershipBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.UpdateMembershipBindingRequest; + + /** + * Verifies an UpdateMembershipBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateMembershipBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateMembershipBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.UpdateMembershipBindingRequest; + + /** + * Creates a plain object from an UpdateMembershipBindingRequest message. Also converts values to other types if specified. + * @param message UpdateMembershipBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.UpdateMembershipBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateMembershipBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateMembershipBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteMembershipBindingRequest. */ + interface IDeleteMembershipBindingRequest { + + /** DeleteMembershipBindingRequest name */ + name?: (string|null); + } + + /** Represents a DeleteMembershipBindingRequest. */ + class DeleteMembershipBindingRequest implements IDeleteMembershipBindingRequest { + + /** + * Constructs a new DeleteMembershipBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IDeleteMembershipBindingRequest); + + /** DeleteMembershipBindingRequest name. */ + public name: string; + + /** + * Creates a new DeleteMembershipBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteMembershipBindingRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IDeleteMembershipBindingRequest): google.cloud.gkehub.v1.DeleteMembershipBindingRequest; + + /** + * Encodes the specified DeleteMembershipBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipBindingRequest.verify|verify} messages. + * @param message DeleteMembershipBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IDeleteMembershipBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteMembershipBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipBindingRequest.verify|verify} messages. + * @param message DeleteMembershipBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IDeleteMembershipBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteMembershipBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.DeleteMembershipBindingRequest; + + /** + * Decodes a DeleteMembershipBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.DeleteMembershipBindingRequest; + + /** + * Verifies a DeleteMembershipBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteMembershipBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteMembershipBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.DeleteMembershipBindingRequest; + + /** + * Creates a plain object from a DeleteMembershipBindingRequest message. Also converts values to other types if specified. + * @param message DeleteMembershipBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.DeleteMembershipBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteMembershipBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteMembershipBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMembershipBindingsRequest. */ + interface IListMembershipBindingsRequest { + + /** ListMembershipBindingsRequest parent */ + parent?: (string|null); + + /** ListMembershipBindingsRequest pageSize */ + pageSize?: (number|null); + + /** ListMembershipBindingsRequest pageToken */ + pageToken?: (string|null); + + /** ListMembershipBindingsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListMembershipBindingsRequest. */ + class ListMembershipBindingsRequest implements IListMembershipBindingsRequest { + + /** + * Constructs a new ListMembershipBindingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListMembershipBindingsRequest); + + /** ListMembershipBindingsRequest parent. */ + public parent: string; + + /** ListMembershipBindingsRequest pageSize. */ + public pageSize: number; + + /** ListMembershipBindingsRequest pageToken. */ + public pageToken: string; + + /** ListMembershipBindingsRequest filter. */ + public filter: string; + + /** + * Creates a new ListMembershipBindingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMembershipBindingsRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListMembershipBindingsRequest): google.cloud.gkehub.v1.ListMembershipBindingsRequest; + + /** + * Encodes the specified ListMembershipBindingsRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipBindingsRequest.verify|verify} messages. + * @param message ListMembershipBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListMembershipBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMembershipBindingsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipBindingsRequest.verify|verify} messages. + * @param message ListMembershipBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListMembershipBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMembershipBindingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMembershipBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListMembershipBindingsRequest; + + /** + * Decodes a ListMembershipBindingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMembershipBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListMembershipBindingsRequest; + + /** + * Verifies a ListMembershipBindingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMembershipBindingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMembershipBindingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListMembershipBindingsRequest; + + /** + * Creates a plain object from a ListMembershipBindingsRequest message. Also converts values to other types if specified. + * @param message ListMembershipBindingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListMembershipBindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMembershipBindingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMembershipBindingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMembershipBindingsResponse. */ + interface IListMembershipBindingsResponse { + + /** ListMembershipBindingsResponse membershipBindings */ + membershipBindings?: (google.cloud.gkehub.v1.IMembershipBinding[]|null); + + /** ListMembershipBindingsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListMembershipBindingsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListMembershipBindingsResponse. */ + class ListMembershipBindingsResponse implements IListMembershipBindingsResponse { + + /** + * Constructs a new ListMembershipBindingsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListMembershipBindingsResponse); + + /** ListMembershipBindingsResponse membershipBindings. */ + public membershipBindings: google.cloud.gkehub.v1.IMembershipBinding[]; + + /** ListMembershipBindingsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListMembershipBindingsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListMembershipBindingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMembershipBindingsResponse instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListMembershipBindingsResponse): google.cloud.gkehub.v1.ListMembershipBindingsResponse; + + /** + * Encodes the specified ListMembershipBindingsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipBindingsResponse.verify|verify} messages. + * @param message ListMembershipBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListMembershipBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMembershipBindingsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipBindingsResponse.verify|verify} messages. + * @param message ListMembershipBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListMembershipBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMembershipBindingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMembershipBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListMembershipBindingsResponse; + + /** + * Decodes a ListMembershipBindingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMembershipBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListMembershipBindingsResponse; + + /** + * Verifies a ListMembershipBindingsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMembershipBindingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMembershipBindingsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListMembershipBindingsResponse; + + /** + * Creates a plain object from a ListMembershipBindingsResponse message. Also converts values to other types if specified. + * @param message ListMembershipBindingsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListMembershipBindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMembershipBindingsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMembershipBindingsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMembershipsRequest. */ + interface IListMembershipsRequest { + + /** ListMembershipsRequest parent */ + parent?: (string|null); + + /** ListMembershipsRequest pageSize */ + pageSize?: (number|null); + + /** ListMembershipsRequest pageToken */ + pageToken?: (string|null); + + /** ListMembershipsRequest filter */ + filter?: (string|null); + + /** ListMembershipsRequest orderBy */ + orderBy?: (string|null); + } + + /** Represents a ListMembershipsRequest. */ + class ListMembershipsRequest implements IListMembershipsRequest { + + /** + * Constructs a new ListMembershipsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListMembershipsRequest); + + /** ListMembershipsRequest parent. */ + public parent: string; + + /** ListMembershipsRequest pageSize. */ + public pageSize: number; + + /** ListMembershipsRequest pageToken. */ + public pageToken: string; + + /** ListMembershipsRequest filter. */ + public filter: string; + + /** ListMembershipsRequest orderBy. */ + public orderBy: string; + + /** + * Creates a new ListMembershipsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMembershipsRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListMembershipsRequest): google.cloud.gkehub.v1.ListMembershipsRequest; /** * Encodes the specified ListMembershipsRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsRequest.verify|verify} messages. @@ -16009,1706 +21652,3384 @@ export namespace google { * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IListMembershipsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IListMembershipsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMembershipsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsRequest.verify|verify} messages. + * @param message ListMembershipsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListMembershipsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMembershipsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMembershipsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListMembershipsRequest; + + /** + * Decodes a ListMembershipsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMembershipsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListMembershipsRequest; + + /** + * Verifies a ListMembershipsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMembershipsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMembershipsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListMembershipsRequest; + + /** + * Creates a plain object from a ListMembershipsRequest message. Also converts values to other types if specified. + * @param message ListMembershipsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListMembershipsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMembershipsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMembershipsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMembershipRBACRoleBindingRequest. */ + interface IGetMembershipRBACRoleBindingRequest { + + /** GetMembershipRBACRoleBindingRequest name */ + name?: (string|null); + } + + /** Represents a GetMembershipRBACRoleBindingRequest. */ + class GetMembershipRBACRoleBindingRequest implements IGetMembershipRBACRoleBindingRequest { + + /** + * Constructs a new GetMembershipRBACRoleBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest); + + /** GetMembershipRBACRoleBindingRequest name. */ + public name: string; + + /** + * Creates a new GetMembershipRBACRoleBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMembershipRBACRoleBindingRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest): google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest; + + /** + * Encodes the specified GetMembershipRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest.verify|verify} messages. + * @param message GetMembershipRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMembershipRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest.verify|verify} messages. + * @param message GetMembershipRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMembershipRBACRoleBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest; + + /** + * Decodes a GetMembershipRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest; + + /** + * Verifies a GetMembershipRBACRoleBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetMembershipRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMembershipRBACRoleBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest; + + /** + * Creates a plain object from a GetMembershipRBACRoleBindingRequest message. Also converts values to other types if specified. + * @param message GetMembershipRBACRoleBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMembershipRBACRoleBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMembershipRBACRoleBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateMembershipRBACRoleBindingRequest. */ + interface ICreateMembershipRBACRoleBindingRequest { + + /** CreateMembershipRBACRoleBindingRequest parent */ + parent?: (string|null); + + /** CreateMembershipRBACRoleBindingRequest rbacrolebindingId */ + rbacrolebindingId?: (string|null); + + /** CreateMembershipRBACRoleBindingRequest rbacrolebinding */ + rbacrolebinding?: (google.cloud.gkehub.v1.IRBACRoleBinding|null); + } + + /** Represents a CreateMembershipRBACRoleBindingRequest. */ + class CreateMembershipRBACRoleBindingRequest implements ICreateMembershipRBACRoleBindingRequest { + + /** + * Constructs a new CreateMembershipRBACRoleBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest); + + /** CreateMembershipRBACRoleBindingRequest parent. */ + public parent: string; + + /** CreateMembershipRBACRoleBindingRequest rbacrolebindingId. */ + public rbacrolebindingId: string; + + /** CreateMembershipRBACRoleBindingRequest rbacrolebinding. */ + public rbacrolebinding?: (google.cloud.gkehub.v1.IRBACRoleBinding|null); + + /** + * Creates a new CreateMembershipRBACRoleBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMembershipRBACRoleBindingRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest): google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest; + + /** + * Encodes the specified CreateMembershipRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest.verify|verify} messages. + * @param message CreateMembershipRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateMembershipRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest.verify|verify} messages. + * @param message CreateMembershipRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateMembershipRBACRoleBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest; + + /** + * Decodes a CreateMembershipRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest; + + /** + * Verifies a CreateMembershipRBACRoleBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateMembershipRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMembershipRBACRoleBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest; + + /** + * Creates a plain object from a CreateMembershipRBACRoleBindingRequest message. Also converts values to other types if specified. + * @param message CreateMembershipRBACRoleBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateMembershipRBACRoleBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateMembershipRBACRoleBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateMembershipRBACRoleBindingRequest. */ + interface IUpdateMembershipRBACRoleBindingRequest { + + /** UpdateMembershipRBACRoleBindingRequest rbacrolebinding */ + rbacrolebinding?: (google.cloud.gkehub.v1.IRBACRoleBinding|null); + + /** UpdateMembershipRBACRoleBindingRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateMembershipRBACRoleBindingRequest. */ + class UpdateMembershipRBACRoleBindingRequest implements IUpdateMembershipRBACRoleBindingRequest { + + /** + * Constructs a new UpdateMembershipRBACRoleBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest); + + /** UpdateMembershipRBACRoleBindingRequest rbacrolebinding. */ + public rbacrolebinding?: (google.cloud.gkehub.v1.IRBACRoleBinding|null); + + /** UpdateMembershipRBACRoleBindingRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateMembershipRBACRoleBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateMembershipRBACRoleBindingRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest): google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest; + + /** + * Encodes the specified UpdateMembershipRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest.verify|verify} messages. + * @param message UpdateMembershipRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateMembershipRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest.verify|verify} messages. + * @param message UpdateMembershipRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateMembershipRBACRoleBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest; + + /** + * Decodes an UpdateMembershipRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest; + + /** + * Verifies an UpdateMembershipRBACRoleBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateMembershipRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateMembershipRBACRoleBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest; + + /** + * Creates a plain object from an UpdateMembershipRBACRoleBindingRequest message. Also converts values to other types if specified. + * @param message UpdateMembershipRBACRoleBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateMembershipRBACRoleBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateMembershipRBACRoleBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteMembershipRBACRoleBindingRequest. */ + interface IDeleteMembershipRBACRoleBindingRequest { + + /** DeleteMembershipRBACRoleBindingRequest name */ + name?: (string|null); + } + + /** Represents a DeleteMembershipRBACRoleBindingRequest. */ + class DeleteMembershipRBACRoleBindingRequest implements IDeleteMembershipRBACRoleBindingRequest { + + /** + * Constructs a new DeleteMembershipRBACRoleBindingRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest); + + /** DeleteMembershipRBACRoleBindingRequest name. */ + public name: string; + + /** + * Creates a new DeleteMembershipRBACRoleBindingRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteMembershipRBACRoleBindingRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest): google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest; + + /** + * Encodes the specified DeleteMembershipRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest.verify|verify} messages. + * @param message DeleteMembershipRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteMembershipRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest.verify|verify} messages. + * @param message DeleteMembershipRBACRoleBindingRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteMembershipRBACRoleBindingRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest; + + /** + * Decodes a DeleteMembershipRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest; + + /** + * Verifies a DeleteMembershipRBACRoleBindingRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteMembershipRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteMembershipRBACRoleBindingRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest; + + /** + * Creates a plain object from a DeleteMembershipRBACRoleBindingRequest message. Also converts values to other types if specified. + * @param message DeleteMembershipRBACRoleBindingRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteMembershipRBACRoleBindingRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteMembershipRBACRoleBindingRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMembershipRBACRoleBindingsRequest. */ + interface IListMembershipRBACRoleBindingsRequest { + + /** ListMembershipRBACRoleBindingsRequest parent */ + parent?: (string|null); + + /** ListMembershipRBACRoleBindingsRequest pageSize */ + pageSize?: (number|null); + + /** ListMembershipRBACRoleBindingsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListMembershipRBACRoleBindingsRequest. */ + class ListMembershipRBACRoleBindingsRequest implements IListMembershipRBACRoleBindingsRequest { + + /** + * Constructs a new ListMembershipRBACRoleBindingsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest); + + /** ListMembershipRBACRoleBindingsRequest parent. */ + public parent: string; + + /** ListMembershipRBACRoleBindingsRequest pageSize. */ + public pageSize: number; + + /** ListMembershipRBACRoleBindingsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListMembershipRBACRoleBindingsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMembershipRBACRoleBindingsRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest): google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest; + + /** + * Encodes the specified ListMembershipRBACRoleBindingsRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest.verify|verify} messages. + * @param message ListMembershipRBACRoleBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMembershipRBACRoleBindingsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest.verify|verify} messages. + * @param message ListMembershipRBACRoleBindingsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMembershipRBACRoleBindingsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMembershipRBACRoleBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest; + + /** + * Decodes a ListMembershipRBACRoleBindingsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMembershipRBACRoleBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest; + + /** + * Verifies a ListMembershipRBACRoleBindingsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMembershipRBACRoleBindingsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMembershipRBACRoleBindingsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest; + + /** + * Creates a plain object from a ListMembershipRBACRoleBindingsRequest message. Also converts values to other types if specified. + * @param message ListMembershipRBACRoleBindingsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMembershipRBACRoleBindingsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMembershipRBACRoleBindingsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMembershipRBACRoleBindingsResponse. */ + interface IListMembershipRBACRoleBindingsResponse { + + /** ListMembershipRBACRoleBindingsResponse rbacrolebindings */ + rbacrolebindings?: (google.cloud.gkehub.v1.IRBACRoleBinding[]|null); + + /** ListMembershipRBACRoleBindingsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListMembershipRBACRoleBindingsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListMembershipRBACRoleBindingsResponse. */ + class ListMembershipRBACRoleBindingsResponse implements IListMembershipRBACRoleBindingsResponse { + + /** + * Constructs a new ListMembershipRBACRoleBindingsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse); + + /** ListMembershipRBACRoleBindingsResponse rbacrolebindings. */ + public rbacrolebindings: google.cloud.gkehub.v1.IRBACRoleBinding[]; + + /** ListMembershipRBACRoleBindingsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListMembershipRBACRoleBindingsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListMembershipRBACRoleBindingsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMembershipRBACRoleBindingsResponse instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse): google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse; + + /** + * Encodes the specified ListMembershipRBACRoleBindingsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse.verify|verify} messages. + * @param message ListMembershipRBACRoleBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMembershipRBACRoleBindingsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse.verify|verify} messages. + * @param message ListMembershipRBACRoleBindingsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMembershipRBACRoleBindingsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMembershipRBACRoleBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse; + + /** + * Decodes a ListMembershipRBACRoleBindingsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMembershipRBACRoleBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse; + + /** + * Verifies a ListMembershipRBACRoleBindingsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMembershipRBACRoleBindingsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMembershipRBACRoleBindingsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse; + + /** + * Creates a plain object from a ListMembershipRBACRoleBindingsResponse message. Also converts values to other types if specified. + * @param message ListMembershipRBACRoleBindingsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMembershipRBACRoleBindingsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMembershipRBACRoleBindingsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GenerateMembershipRBACRoleBindingYAMLRequest. */ + interface IGenerateMembershipRBACRoleBindingYAMLRequest { + + /** GenerateMembershipRBACRoleBindingYAMLRequest parent */ + parent?: (string|null); + + /** GenerateMembershipRBACRoleBindingYAMLRequest rbacrolebindingId */ + rbacrolebindingId?: (string|null); + + /** GenerateMembershipRBACRoleBindingYAMLRequest rbacrolebinding */ + rbacrolebinding?: (google.cloud.gkehub.v1.IRBACRoleBinding|null); + } + + /** Represents a GenerateMembershipRBACRoleBindingYAMLRequest. */ + class GenerateMembershipRBACRoleBindingYAMLRequest implements IGenerateMembershipRBACRoleBindingYAMLRequest { + + /** + * Constructs a new GenerateMembershipRBACRoleBindingYAMLRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest); + + /** GenerateMembershipRBACRoleBindingYAMLRequest parent. */ + public parent: string; + + /** GenerateMembershipRBACRoleBindingYAMLRequest rbacrolebindingId. */ + public rbacrolebindingId: string; + + /** GenerateMembershipRBACRoleBindingYAMLRequest rbacrolebinding. */ + public rbacrolebinding?: (google.cloud.gkehub.v1.IRBACRoleBinding|null); + + /** + * Creates a new GenerateMembershipRBACRoleBindingYAMLRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateMembershipRBACRoleBindingYAMLRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest): google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest; + + /** + * Encodes the specified GenerateMembershipRBACRoleBindingYAMLRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest.verify|verify} messages. + * @param message GenerateMembershipRBACRoleBindingYAMLRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateMembershipRBACRoleBindingYAMLRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest.verify|verify} messages. + * @param message GenerateMembershipRBACRoleBindingYAMLRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateMembershipRBACRoleBindingYAMLRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateMembershipRBACRoleBindingYAMLRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest; + + /** + * Decodes a GenerateMembershipRBACRoleBindingYAMLRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateMembershipRBACRoleBindingYAMLRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest; + + /** + * Verifies a GenerateMembershipRBACRoleBindingYAMLRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateMembershipRBACRoleBindingYAMLRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateMembershipRBACRoleBindingYAMLRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest; + + /** + * Creates a plain object from a GenerateMembershipRBACRoleBindingYAMLRequest message. Also converts values to other types if specified. + * @param message GenerateMembershipRBACRoleBindingYAMLRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateMembershipRBACRoleBindingYAMLRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateMembershipRBACRoleBindingYAMLRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GenerateMembershipRBACRoleBindingYAMLResponse. */ + interface IGenerateMembershipRBACRoleBindingYAMLResponse { + + /** GenerateMembershipRBACRoleBindingYAMLResponse roleBindingsYaml */ + roleBindingsYaml?: (string|null); + } + + /** Represents a GenerateMembershipRBACRoleBindingYAMLResponse. */ + class GenerateMembershipRBACRoleBindingYAMLResponse implements IGenerateMembershipRBACRoleBindingYAMLResponse { + + /** + * Constructs a new GenerateMembershipRBACRoleBindingYAMLResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse); + + /** GenerateMembershipRBACRoleBindingYAMLResponse roleBindingsYaml. */ + public roleBindingsYaml: string; + + /** + * Creates a new GenerateMembershipRBACRoleBindingYAMLResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateMembershipRBACRoleBindingYAMLResponse instance + */ + public static create(properties?: google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse): google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse; + + /** + * Encodes the specified GenerateMembershipRBACRoleBindingYAMLResponse message. Does not implicitly {@link google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse.verify|verify} messages. + * @param message GenerateMembershipRBACRoleBindingYAMLResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GenerateMembershipRBACRoleBindingYAMLResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse.verify|verify} messages. + * @param message GenerateMembershipRBACRoleBindingYAMLResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GenerateMembershipRBACRoleBindingYAMLResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GenerateMembershipRBACRoleBindingYAMLResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse; + + /** + * Decodes a GenerateMembershipRBACRoleBindingYAMLResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GenerateMembershipRBACRoleBindingYAMLResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse; + + /** + * Verifies a GenerateMembershipRBACRoleBindingYAMLResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GenerateMembershipRBACRoleBindingYAMLResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GenerateMembershipRBACRoleBindingYAMLResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse; + + /** + * Creates a plain object from a GenerateMembershipRBACRoleBindingYAMLResponse message. Also converts values to other types if specified. + * @param message GenerateMembershipRBACRoleBindingYAMLResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GenerateMembershipRBACRoleBindingYAMLResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GenerateMembershipRBACRoleBindingYAMLResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMembershipsResponse. */ + interface IListMembershipsResponse { + + /** ListMembershipsResponse resources */ + resources?: (google.cloud.gkehub.v1.IMembership[]|null); + + /** ListMembershipsResponse nextPageToken */ + nextPageToken?: (string|null); + + /** ListMembershipsResponse unreachable */ + unreachable?: (string[]|null); + } + + /** Represents a ListMembershipsResponse. */ + class ListMembershipsResponse implements IListMembershipsResponse { + + /** + * Constructs a new ListMembershipsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListMembershipsResponse); + + /** ListMembershipsResponse resources. */ + public resources: google.cloud.gkehub.v1.IMembership[]; + + /** ListMembershipsResponse nextPageToken. */ + public nextPageToken: string; + + /** ListMembershipsResponse unreachable. */ + public unreachable: string[]; + + /** + * Creates a new ListMembershipsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMembershipsResponse instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListMembershipsResponse): google.cloud.gkehub.v1.ListMembershipsResponse; + + /** + * Encodes the specified ListMembershipsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsResponse.verify|verify} messages. + * @param message ListMembershipsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListMembershipsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMembershipsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsResponse.verify|verify} messages. + * @param message ListMembershipsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListMembershipsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMembershipsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMembershipsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListMembershipsResponse; + + /** + * Decodes a ListMembershipsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMembershipsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListMembershipsResponse; + + /** + * Verifies a ListMembershipsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListMembershipsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMembershipsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListMembershipsResponse; + + /** + * Creates a plain object from a ListMembershipsResponse message. Also converts values to other types if specified. + * @param message ListMembershipsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListMembershipsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMembershipsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMembershipsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMembershipRequest. */ + interface IGetMembershipRequest { + + /** GetMembershipRequest name */ + name?: (string|null); + } + + /** Represents a GetMembershipRequest. */ + class GetMembershipRequest implements IGetMembershipRequest { + + /** + * Constructs a new GetMembershipRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IGetMembershipRequest); + + /** GetMembershipRequest name. */ + public name: string; + + /** + * Creates a new GetMembershipRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMembershipRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IGetMembershipRequest): google.cloud.gkehub.v1.GetMembershipRequest; + + /** + * Encodes the specified GetMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipRequest.verify|verify} messages. + * @param message GetMembershipRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IGetMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipRequest.verify|verify} messages. + * @param message GetMembershipRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IGetMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMembershipRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GetMembershipRequest; + + /** + * Decodes a GetMembershipRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GetMembershipRequest; + + /** + * Verifies a GetMembershipRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetMembershipRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMembershipRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GetMembershipRequest; + + /** + * Creates a plain object from a GetMembershipRequest message. Also converts values to other types if specified. + * @param message GetMembershipRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.GetMembershipRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMembershipRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMembershipRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBoundMembershipsRequest. */ + interface IListBoundMembershipsRequest { + + /** ListBoundMembershipsRequest scopeName */ + scopeName?: (string|null); + + /** ListBoundMembershipsRequest filter */ + filter?: (string|null); + + /** ListBoundMembershipsRequest pageSize */ + pageSize?: (number|null); + + /** ListBoundMembershipsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListBoundMembershipsRequest. */ + class ListBoundMembershipsRequest implements IListBoundMembershipsRequest { + + /** + * Constructs a new ListBoundMembershipsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListBoundMembershipsRequest); + + /** ListBoundMembershipsRequest scopeName. */ + public scopeName: string; + + /** ListBoundMembershipsRequest filter. */ + public filter: string; + + /** ListBoundMembershipsRequest pageSize. */ + public pageSize: number; + + /** ListBoundMembershipsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListBoundMembershipsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBoundMembershipsRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListBoundMembershipsRequest): google.cloud.gkehub.v1.ListBoundMembershipsRequest; + + /** + * Encodes the specified ListBoundMembershipsRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListBoundMembershipsRequest.verify|verify} messages. + * @param message ListBoundMembershipsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListBoundMembershipsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBoundMembershipsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListBoundMembershipsRequest.verify|verify} messages. + * @param message ListBoundMembershipsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListBoundMembershipsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBoundMembershipsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBoundMembershipsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListBoundMembershipsRequest; + + /** + * Decodes a ListBoundMembershipsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBoundMembershipsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListBoundMembershipsRequest; + + /** + * Verifies a ListBoundMembershipsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBoundMembershipsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBoundMembershipsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListBoundMembershipsRequest; + + /** + * Creates a plain object from a ListBoundMembershipsRequest message. Also converts values to other types if specified. + * @param message ListBoundMembershipsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListBoundMembershipsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBoundMembershipsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBoundMembershipsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListBoundMembershipsResponse. */ + interface IListBoundMembershipsResponse { + + /** ListBoundMembershipsResponse memberships */ + memberships?: (google.cloud.gkehub.v1.IMembership[]|null); + + /** ListBoundMembershipsResponse unreachable */ + unreachable?: (string[]|null); + + /** ListBoundMembershipsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListBoundMembershipsResponse. */ + class ListBoundMembershipsResponse implements IListBoundMembershipsResponse { + + /** + * Constructs a new ListBoundMembershipsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IListBoundMembershipsResponse); + + /** ListBoundMembershipsResponse memberships. */ + public memberships: google.cloud.gkehub.v1.IMembership[]; + + /** ListBoundMembershipsResponse unreachable. */ + public unreachable: string[]; + + /** ListBoundMembershipsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListBoundMembershipsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListBoundMembershipsResponse instance + */ + public static create(properties?: google.cloud.gkehub.v1.IListBoundMembershipsResponse): google.cloud.gkehub.v1.ListBoundMembershipsResponse; + + /** + * Encodes the specified ListBoundMembershipsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListBoundMembershipsResponse.verify|verify} messages. + * @param message ListBoundMembershipsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IListBoundMembershipsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListBoundMembershipsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListBoundMembershipsResponse.verify|verify} messages. + * @param message ListBoundMembershipsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IListBoundMembershipsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListBoundMembershipsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListBoundMembershipsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListBoundMembershipsResponse; + + /** + * Decodes a ListBoundMembershipsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListBoundMembershipsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListBoundMembershipsResponse; + + /** + * Verifies a ListBoundMembershipsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListBoundMembershipsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListBoundMembershipsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListBoundMembershipsResponse; + + /** + * Creates a plain object from a ListBoundMembershipsResponse message. Also converts values to other types if specified. + * @param message ListBoundMembershipsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.ListBoundMembershipsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListBoundMembershipsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListBoundMembershipsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateMembershipRequest. */ + interface ICreateMembershipRequest { + + /** CreateMembershipRequest parent */ + parent?: (string|null); + + /** CreateMembershipRequest membershipId */ + membershipId?: (string|null); + + /** CreateMembershipRequest resource */ + resource?: (google.cloud.gkehub.v1.IMembership|null); + + /** CreateMembershipRequest requestId */ + requestId?: (string|null); + } + + /** Represents a CreateMembershipRequest. */ + class CreateMembershipRequest implements ICreateMembershipRequest { + + /** + * Constructs a new CreateMembershipRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.ICreateMembershipRequest); + + /** CreateMembershipRequest parent. */ + public parent: string; + + /** CreateMembershipRequest membershipId. */ + public membershipId: string; + + /** CreateMembershipRequest resource. */ + public resource?: (google.cloud.gkehub.v1.IMembership|null); + + /** CreateMembershipRequest requestId. */ + public requestId: string; + + /** + * Creates a new CreateMembershipRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMembershipRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.ICreateMembershipRequest): google.cloud.gkehub.v1.CreateMembershipRequest; + + /** + * Encodes the specified CreateMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipRequest.verify|verify} messages. + * @param message CreateMembershipRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.ICreateMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipRequest.verify|verify} messages. + * @param message CreateMembershipRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.ICreateMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateMembershipRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.CreateMembershipRequest; + + /** + * Decodes a CreateMembershipRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.CreateMembershipRequest; + + /** + * Verifies a CreateMembershipRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateMembershipRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMembershipRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.CreateMembershipRequest; + + /** + * Creates a plain object from a CreateMembershipRequest message. Also converts values to other types if specified. + * @param message CreateMembershipRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.CreateMembershipRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateMembershipRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateMembershipRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteMembershipRequest. */ + interface IDeleteMembershipRequest { + + /** DeleteMembershipRequest name */ + name?: (string|null); + + /** DeleteMembershipRequest requestId */ + requestId?: (string|null); + + /** DeleteMembershipRequest force */ + force?: (boolean|null); + } + + /** Represents a DeleteMembershipRequest. */ + class DeleteMembershipRequest implements IDeleteMembershipRequest { + + /** + * Constructs a new DeleteMembershipRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IDeleteMembershipRequest); + + /** DeleteMembershipRequest name. */ + public name: string; + + /** DeleteMembershipRequest requestId. */ + public requestId: string; + + /** DeleteMembershipRequest force. */ + public force: boolean; + + /** + * Creates a new DeleteMembershipRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteMembershipRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IDeleteMembershipRequest): google.cloud.gkehub.v1.DeleteMembershipRequest; + + /** + * Encodes the specified DeleteMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipRequest.verify|verify} messages. + * @param message DeleteMembershipRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IDeleteMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipRequest.verify|verify} messages. + * @param message DeleteMembershipRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IDeleteMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteMembershipRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.DeleteMembershipRequest; + + /** + * Decodes a DeleteMembershipRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.DeleteMembershipRequest; + + /** + * Verifies a DeleteMembershipRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteMembershipRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteMembershipRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.DeleteMembershipRequest; + + /** + * Creates a plain object from a DeleteMembershipRequest message. Also converts values to other types if specified. + * @param message DeleteMembershipRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.DeleteMembershipRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteMembershipRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteMembershipRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateMembershipRequest. */ + interface IUpdateMembershipRequest { + + /** UpdateMembershipRequest name */ + name?: (string|null); + + /** UpdateMembershipRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateMembershipRequest resource */ + resource?: (google.cloud.gkehub.v1.IMembership|null); + + /** UpdateMembershipRequest requestId */ + requestId?: (string|null); + } + + /** Represents an UpdateMembershipRequest. */ + class UpdateMembershipRequest implements IUpdateMembershipRequest { + + /** + * Constructs a new UpdateMembershipRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IUpdateMembershipRequest); + + /** UpdateMembershipRequest name. */ + public name: string; + + /** UpdateMembershipRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateMembershipRequest resource. */ + public resource?: (google.cloud.gkehub.v1.IMembership|null); + + /** UpdateMembershipRequest requestId. */ + public requestId: string; + + /** + * Creates a new UpdateMembershipRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateMembershipRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IUpdateMembershipRequest): google.cloud.gkehub.v1.UpdateMembershipRequest; + + /** + * Encodes the specified UpdateMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipRequest.verify|verify} messages. + * @param message UpdateMembershipRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IUpdateMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipRequest.verify|verify} messages. + * @param message UpdateMembershipRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.v1.IUpdateMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateMembershipRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.UpdateMembershipRequest; + + /** + * Decodes an UpdateMembershipRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.UpdateMembershipRequest; + + /** + * Verifies an UpdateMembershipRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdateMembershipRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateMembershipRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.UpdateMembershipRequest; + + /** + * Creates a plain object from an UpdateMembershipRequest message. Also converts values to other types if specified. + * @param message UpdateMembershipRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.v1.UpdateMembershipRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateMembershipRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateMembershipRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GenerateConnectManifestRequest. */ + interface IGenerateConnectManifestRequest { + + /** GenerateConnectManifestRequest name */ + name?: (string|null); + + /** GenerateConnectManifestRequest namespace */ + namespace?: (string|null); + + /** GenerateConnectManifestRequest proxy */ + proxy?: (Uint8Array|Buffer|string|null); + + /** GenerateConnectManifestRequest version */ + version?: (string|null); + + /** GenerateConnectManifestRequest isUpgrade */ + isUpgrade?: (boolean|null); + + /** GenerateConnectManifestRequest registry */ + registry?: (string|null); + + /** GenerateConnectManifestRequest imagePullSecretContent */ + imagePullSecretContent?: (Uint8Array|Buffer|string|null); + } + + /** Represents a GenerateConnectManifestRequest. */ + class GenerateConnectManifestRequest implements IGenerateConnectManifestRequest { + + /** + * Constructs a new GenerateConnectManifestRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.v1.IGenerateConnectManifestRequest); + + /** GenerateConnectManifestRequest name. */ + public name: string; + + /** GenerateConnectManifestRequest namespace. */ + public namespace: string; + + /** GenerateConnectManifestRequest proxy. */ + public proxy: (Uint8Array|Buffer|string); + + /** GenerateConnectManifestRequest version. */ + public version: string; + + /** GenerateConnectManifestRequest isUpgrade. */ + public isUpgrade: boolean; + + /** GenerateConnectManifestRequest registry. */ + public registry: string; + + /** GenerateConnectManifestRequest imagePullSecretContent. */ + public imagePullSecretContent: (Uint8Array|Buffer|string); + + /** + * Creates a new GenerateConnectManifestRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GenerateConnectManifestRequest instance + */ + public static create(properties?: google.cloud.gkehub.v1.IGenerateConnectManifestRequest): google.cloud.gkehub.v1.GenerateConnectManifestRequest; + + /** + * Encodes the specified GenerateConnectManifestRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestRequest.verify|verify} messages. + * @param message GenerateConnectManifestRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.v1.IGenerateConnectManifestRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMembershipsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsRequest.verify|verify} messages. - * @param message ListMembershipsRequest message or plain object to encode + * Encodes the specified GenerateConnectManifestRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestRequest.verify|verify} messages. + * @param message GenerateConnectManifestRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IListMembershipsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IGenerateConnectManifestRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMembershipsRequest message from the specified reader or buffer. + * Decodes a GenerateConnectManifestRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMembershipsRequest + * @returns GenerateConnectManifestRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListMembershipsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GenerateConnectManifestRequest; /** - * Decodes a ListMembershipsRequest message from the specified reader or buffer, length delimited. + * Decodes a GenerateConnectManifestRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMembershipsRequest + * @returns GenerateConnectManifestRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListMembershipsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GenerateConnectManifestRequest; /** - * Verifies a ListMembershipsRequest message. + * Verifies a GenerateConnectManifestRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMembershipsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GenerateConnectManifestRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMembershipsRequest + * @returns GenerateConnectManifestRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListMembershipsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GenerateConnectManifestRequest; /** - * Creates a plain object from a ListMembershipsRequest message. Also converts values to other types if specified. - * @param message ListMembershipsRequest + * Creates a plain object from a GenerateConnectManifestRequest message. Also converts values to other types if specified. + * @param message GenerateConnectManifestRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.ListMembershipsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.GenerateConnectManifestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMembershipsRequest to JSON. + * Converts this GenerateConnectManifestRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListMembershipsRequest + * Gets the default type url for GenerateConnectManifestRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListMembershipsResponse. */ - interface IListMembershipsResponse { - - /** ListMembershipsResponse resources */ - resources?: (google.cloud.gkehub.v1.IMembership[]|null); - - /** ListMembershipsResponse nextPageToken */ - nextPageToken?: (string|null); + /** Properties of a GenerateConnectManifestResponse. */ + interface IGenerateConnectManifestResponse { - /** ListMembershipsResponse unreachable */ - unreachable?: (string[]|null); + /** GenerateConnectManifestResponse manifest */ + manifest?: (google.cloud.gkehub.v1.IConnectAgentResource[]|null); } - /** Represents a ListMembershipsResponse. */ - class ListMembershipsResponse implements IListMembershipsResponse { + /** Represents a GenerateConnectManifestResponse. */ + class GenerateConnectManifestResponse implements IGenerateConnectManifestResponse { /** - * Constructs a new ListMembershipsResponse. + * Constructs a new GenerateConnectManifestResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IListMembershipsResponse); - - /** ListMembershipsResponse resources. */ - public resources: google.cloud.gkehub.v1.IMembership[]; - - /** ListMembershipsResponse nextPageToken. */ - public nextPageToken: string; + constructor(properties?: google.cloud.gkehub.v1.IGenerateConnectManifestResponse); - /** ListMembershipsResponse unreachable. */ - public unreachable: string[]; + /** GenerateConnectManifestResponse manifest. */ + public manifest: google.cloud.gkehub.v1.IConnectAgentResource[]; /** - * Creates a new ListMembershipsResponse instance using the specified properties. + * Creates a new GenerateConnectManifestResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListMembershipsResponse instance + * @returns GenerateConnectManifestResponse instance */ - public static create(properties?: google.cloud.gkehub.v1.IListMembershipsResponse): google.cloud.gkehub.v1.ListMembershipsResponse; + public static create(properties?: google.cloud.gkehub.v1.IGenerateConnectManifestResponse): google.cloud.gkehub.v1.GenerateConnectManifestResponse; /** - * Encodes the specified ListMembershipsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsResponse.verify|verify} messages. - * @param message ListMembershipsResponse message or plain object to encode + * Encodes the specified GenerateConnectManifestResponse message. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestResponse.verify|verify} messages. + * @param message GenerateConnectManifestResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IListMembershipsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IGenerateConnectManifestResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListMembershipsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsResponse.verify|verify} messages. - * @param message ListMembershipsResponse message or plain object to encode + * Encodes the specified GenerateConnectManifestResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestResponse.verify|verify} messages. + * @param message GenerateConnectManifestResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IListMembershipsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IGenerateConnectManifestResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListMembershipsResponse message from the specified reader or buffer. + * Decodes a GenerateConnectManifestResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListMembershipsResponse + * @returns GenerateConnectManifestResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListMembershipsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GenerateConnectManifestResponse; /** - * Decodes a ListMembershipsResponse message from the specified reader or buffer, length delimited. + * Decodes a GenerateConnectManifestResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListMembershipsResponse + * @returns GenerateConnectManifestResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListMembershipsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GenerateConnectManifestResponse; /** - * Verifies a ListMembershipsResponse message. + * Verifies a GenerateConnectManifestResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListMembershipsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GenerateConnectManifestResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListMembershipsResponse + * @returns GenerateConnectManifestResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListMembershipsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GenerateConnectManifestResponse; /** - * Creates a plain object from a ListMembershipsResponse message. Also converts values to other types if specified. - * @param message ListMembershipsResponse + * Creates a plain object from a GenerateConnectManifestResponse message. Also converts values to other types if specified. + * @param message GenerateConnectManifestResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.ListMembershipsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.GenerateConnectManifestResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListMembershipsResponse to JSON. + * Converts this GenerateConnectManifestResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListMembershipsResponse + * Gets the default type url for GenerateConnectManifestResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetMembershipRequest. */ - interface IGetMembershipRequest { + /** Properties of a ConnectAgentResource. */ + interface IConnectAgentResource { - /** GetMembershipRequest name */ - name?: (string|null); + /** ConnectAgentResource type */ + type?: (google.cloud.gkehub.v1.ITypeMeta|null); + + /** ConnectAgentResource manifest */ + manifest?: (string|null); } - /** Represents a GetMembershipRequest. */ - class GetMembershipRequest implements IGetMembershipRequest { + /** Represents a ConnectAgentResource. */ + class ConnectAgentResource implements IConnectAgentResource { /** - * Constructs a new GetMembershipRequest. + * Constructs a new ConnectAgentResource. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IGetMembershipRequest); + constructor(properties?: google.cloud.gkehub.v1.IConnectAgentResource); - /** GetMembershipRequest name. */ - public name: string; + /** ConnectAgentResource type. */ + public type?: (google.cloud.gkehub.v1.ITypeMeta|null); + + /** ConnectAgentResource manifest. */ + public manifest: string; /** - * Creates a new GetMembershipRequest instance using the specified properties. + * Creates a new ConnectAgentResource instance using the specified properties. * @param [properties] Properties to set - * @returns GetMembershipRequest instance + * @returns ConnectAgentResource instance */ - public static create(properties?: google.cloud.gkehub.v1.IGetMembershipRequest): google.cloud.gkehub.v1.GetMembershipRequest; + public static create(properties?: google.cloud.gkehub.v1.IConnectAgentResource): google.cloud.gkehub.v1.ConnectAgentResource; /** - * Encodes the specified GetMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipRequest.verify|verify} messages. - * @param message GetMembershipRequest message or plain object to encode + * Encodes the specified ConnectAgentResource message. Does not implicitly {@link google.cloud.gkehub.v1.ConnectAgentResource.verify|verify} messages. + * @param message ConnectAgentResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IGetMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IConnectAgentResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipRequest.verify|verify} messages. - * @param message GetMembershipRequest message or plain object to encode + * Encodes the specified ConnectAgentResource message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ConnectAgentResource.verify|verify} messages. + * @param message ConnectAgentResource message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IGetMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IConnectAgentResource, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetMembershipRequest message from the specified reader or buffer. + * Decodes a ConnectAgentResource message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetMembershipRequest + * @returns ConnectAgentResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GetMembershipRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ConnectAgentResource; /** - * Decodes a GetMembershipRequest message from the specified reader or buffer, length delimited. + * Decodes a ConnectAgentResource message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetMembershipRequest + * @returns ConnectAgentResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GetMembershipRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ConnectAgentResource; /** - * Verifies a GetMembershipRequest message. + * Verifies a ConnectAgentResource message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetMembershipRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ConnectAgentResource message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetMembershipRequest + * @returns ConnectAgentResource */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GetMembershipRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ConnectAgentResource; /** - * Creates a plain object from a GetMembershipRequest message. Also converts values to other types if specified. - * @param message GetMembershipRequest + * Creates a plain object from a ConnectAgentResource message. Also converts values to other types if specified. + * @param message ConnectAgentResource * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.GetMembershipRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.ConnectAgentResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetMembershipRequest to JSON. + * Converts this ConnectAgentResource to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetMembershipRequest + * Gets the default type url for ConnectAgentResource * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateMembershipRequest. */ - interface ICreateMembershipRequest { - - /** CreateMembershipRequest parent */ - parent?: (string|null); - - /** CreateMembershipRequest membershipId */ - membershipId?: (string|null); + /** Properties of a TypeMeta. */ + interface ITypeMeta { - /** CreateMembershipRequest resource */ - resource?: (google.cloud.gkehub.v1.IMembership|null); + /** TypeMeta kind */ + kind?: (string|null); - /** CreateMembershipRequest requestId */ - requestId?: (string|null); + /** TypeMeta apiVersion */ + apiVersion?: (string|null); } - /** Represents a CreateMembershipRequest. */ - class CreateMembershipRequest implements ICreateMembershipRequest { + /** Represents a TypeMeta. */ + class TypeMeta implements ITypeMeta { /** - * Constructs a new CreateMembershipRequest. + * Constructs a new TypeMeta. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.ICreateMembershipRequest); - - /** CreateMembershipRequest parent. */ - public parent: string; - - /** CreateMembershipRequest membershipId. */ - public membershipId: string; + constructor(properties?: google.cloud.gkehub.v1.ITypeMeta); - /** CreateMembershipRequest resource. */ - public resource?: (google.cloud.gkehub.v1.IMembership|null); + /** TypeMeta kind. */ + public kind: string; - /** CreateMembershipRequest requestId. */ - public requestId: string; + /** TypeMeta apiVersion. */ + public apiVersion: string; /** - * Creates a new CreateMembershipRequest instance using the specified properties. + * Creates a new TypeMeta instance using the specified properties. * @param [properties] Properties to set - * @returns CreateMembershipRequest instance + * @returns TypeMeta instance */ - public static create(properties?: google.cloud.gkehub.v1.ICreateMembershipRequest): google.cloud.gkehub.v1.CreateMembershipRequest; + public static create(properties?: google.cloud.gkehub.v1.ITypeMeta): google.cloud.gkehub.v1.TypeMeta; /** - * Encodes the specified CreateMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipRequest.verify|verify} messages. - * @param message CreateMembershipRequest message or plain object to encode + * Encodes the specified TypeMeta message. Does not implicitly {@link google.cloud.gkehub.v1.TypeMeta.verify|verify} messages. + * @param message TypeMeta message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.ICreateMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.ITypeMeta, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipRequest.verify|verify} messages. - * @param message CreateMembershipRequest message or plain object to encode + * Encodes the specified TypeMeta message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.TypeMeta.verify|verify} messages. + * @param message TypeMeta message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.ICreateMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.ITypeMeta, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateMembershipRequest message from the specified reader or buffer. + * Decodes a TypeMeta message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateMembershipRequest + * @returns TypeMeta * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.CreateMembershipRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.TypeMeta; /** - * Decodes a CreateMembershipRequest message from the specified reader or buffer, length delimited. + * Decodes a TypeMeta message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateMembershipRequest + * @returns TypeMeta * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.CreateMembershipRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.TypeMeta; /** - * Verifies a CreateMembershipRequest message. + * Verifies a TypeMeta message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateMembershipRequest message from a plain object. Also converts values to their respective internal types. + * Creates a TypeMeta message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateMembershipRequest + * @returns TypeMeta */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.CreateMembershipRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.TypeMeta; /** - * Creates a plain object from a CreateMembershipRequest message. Also converts values to other types if specified. - * @param message CreateMembershipRequest + * Creates a plain object from a TypeMeta message. Also converts values to other types if specified. + * @param message TypeMeta * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.CreateMembershipRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.TypeMeta, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateMembershipRequest to JSON. + * Converts this TypeMeta to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateMembershipRequest + * Gets the default type url for TypeMeta * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteMembershipRequest. */ - interface IDeleteMembershipRequest { + /** Properties of a ListFeaturesRequest. */ + interface IListFeaturesRequest { - /** DeleteMembershipRequest name */ - name?: (string|null); + /** ListFeaturesRequest parent */ + parent?: (string|null); - /** DeleteMembershipRequest requestId */ - requestId?: (string|null); + /** ListFeaturesRequest pageSize */ + pageSize?: (number|null); - /** DeleteMembershipRequest force */ - force?: (boolean|null); + /** ListFeaturesRequest pageToken */ + pageToken?: (string|null); + + /** ListFeaturesRequest filter */ + filter?: (string|null); + + /** ListFeaturesRequest orderBy */ + orderBy?: (string|null); + + /** ListFeaturesRequest returnPartialSuccess */ + returnPartialSuccess?: (boolean|null); } - /** Represents a DeleteMembershipRequest. */ - class DeleteMembershipRequest implements IDeleteMembershipRequest { + /** Represents a ListFeaturesRequest. */ + class ListFeaturesRequest implements IListFeaturesRequest { /** - * Constructs a new DeleteMembershipRequest. + * Constructs a new ListFeaturesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IDeleteMembershipRequest); + constructor(properties?: google.cloud.gkehub.v1.IListFeaturesRequest); - /** DeleteMembershipRequest name. */ - public name: string; + /** ListFeaturesRequest parent. */ + public parent: string; - /** DeleteMembershipRequest requestId. */ - public requestId: string; + /** ListFeaturesRequest pageSize. */ + public pageSize: number; - /** DeleteMembershipRequest force. */ - public force: boolean; + /** ListFeaturesRequest pageToken. */ + public pageToken: string; + + /** ListFeaturesRequest filter. */ + public filter: string; + + /** ListFeaturesRequest orderBy. */ + public orderBy: string; + + /** ListFeaturesRequest returnPartialSuccess. */ + public returnPartialSuccess: boolean; /** - * Creates a new DeleteMembershipRequest instance using the specified properties. + * Creates a new ListFeaturesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteMembershipRequest instance + * @returns ListFeaturesRequest instance */ - public static create(properties?: google.cloud.gkehub.v1.IDeleteMembershipRequest): google.cloud.gkehub.v1.DeleteMembershipRequest; + public static create(properties?: google.cloud.gkehub.v1.IListFeaturesRequest): google.cloud.gkehub.v1.ListFeaturesRequest; /** - * Encodes the specified DeleteMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipRequest.verify|verify} messages. - * @param message DeleteMembershipRequest message or plain object to encode + * Encodes the specified ListFeaturesRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesRequest.verify|verify} messages. + * @param message ListFeaturesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IDeleteMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IListFeaturesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipRequest.verify|verify} messages. - * @param message DeleteMembershipRequest message or plain object to encode + * Encodes the specified ListFeaturesRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesRequest.verify|verify} messages. + * @param message ListFeaturesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IDeleteMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IListFeaturesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteMembershipRequest message from the specified reader or buffer. + * Decodes a ListFeaturesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteMembershipRequest + * @returns ListFeaturesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.DeleteMembershipRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListFeaturesRequest; /** - * Decodes a DeleteMembershipRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFeaturesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteMembershipRequest + * @returns ListFeaturesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.DeleteMembershipRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListFeaturesRequest; /** - * Verifies a DeleteMembershipRequest message. + * Verifies a ListFeaturesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteMembershipRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFeaturesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteMembershipRequest + * @returns ListFeaturesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.DeleteMembershipRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListFeaturesRequest; /** - * Creates a plain object from a DeleteMembershipRequest message. Also converts values to other types if specified. - * @param message DeleteMembershipRequest + * Creates a plain object from a ListFeaturesRequest message. Also converts values to other types if specified. + * @param message ListFeaturesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.DeleteMembershipRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.ListFeaturesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteMembershipRequest to JSON. + * Converts this ListFeaturesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteMembershipRequest + * Gets the default type url for ListFeaturesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateMembershipRequest. */ - interface IUpdateMembershipRequest { - - /** UpdateMembershipRequest name */ - name?: (string|null); - - /** UpdateMembershipRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Properties of a ListFeaturesResponse. */ + interface IListFeaturesResponse { - /** UpdateMembershipRequest resource */ - resource?: (google.cloud.gkehub.v1.IMembership|null); + /** ListFeaturesResponse resources */ + resources?: (google.cloud.gkehub.v1.IFeature[]|null); - /** UpdateMembershipRequest requestId */ - requestId?: (string|null); + /** ListFeaturesResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an UpdateMembershipRequest. */ - class UpdateMembershipRequest implements IUpdateMembershipRequest { + /** Represents a ListFeaturesResponse. */ + class ListFeaturesResponse implements IListFeaturesResponse { /** - * Constructs a new UpdateMembershipRequest. + * Constructs a new ListFeaturesResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IUpdateMembershipRequest); - - /** UpdateMembershipRequest name. */ - public name: string; - - /** UpdateMembershipRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.cloud.gkehub.v1.IListFeaturesResponse); - /** UpdateMembershipRequest resource. */ - public resource?: (google.cloud.gkehub.v1.IMembership|null); + /** ListFeaturesResponse resources. */ + public resources: google.cloud.gkehub.v1.IFeature[]; - /** UpdateMembershipRequest requestId. */ - public requestId: string; + /** ListFeaturesResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new UpdateMembershipRequest instance using the specified properties. + * Creates a new ListFeaturesResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateMembershipRequest instance + * @returns ListFeaturesResponse instance */ - public static create(properties?: google.cloud.gkehub.v1.IUpdateMembershipRequest): google.cloud.gkehub.v1.UpdateMembershipRequest; + public static create(properties?: google.cloud.gkehub.v1.IListFeaturesResponse): google.cloud.gkehub.v1.ListFeaturesResponse; /** - * Encodes the specified UpdateMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipRequest.verify|verify} messages. - * @param message UpdateMembershipRequest message or plain object to encode + * Encodes the specified ListFeaturesResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesResponse.verify|verify} messages. + * @param message ListFeaturesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IUpdateMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IListFeaturesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipRequest.verify|verify} messages. - * @param message UpdateMembershipRequest message or plain object to encode + * Encodes the specified ListFeaturesResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesResponse.verify|verify} messages. + * @param message ListFeaturesResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IUpdateMembershipRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IListFeaturesResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateMembershipRequest message from the specified reader or buffer. + * Decodes a ListFeaturesResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateMembershipRequest + * @returns ListFeaturesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.UpdateMembershipRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListFeaturesResponse; /** - * Decodes an UpdateMembershipRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFeaturesResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateMembershipRequest + * @returns ListFeaturesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.UpdateMembershipRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListFeaturesResponse; /** - * Verifies an UpdateMembershipRequest message. + * Verifies a ListFeaturesResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateMembershipRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFeaturesResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateMembershipRequest + * @returns ListFeaturesResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.UpdateMembershipRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListFeaturesResponse; /** - * Creates a plain object from an UpdateMembershipRequest message. Also converts values to other types if specified. - * @param message UpdateMembershipRequest + * Creates a plain object from a ListFeaturesResponse message. Also converts values to other types if specified. + * @param message ListFeaturesResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.UpdateMembershipRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.ListFeaturesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateMembershipRequest to JSON. + * Converts this ListFeaturesResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateMembershipRequest + * Gets the default type url for ListFeaturesResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GenerateConnectManifestRequest. */ - interface IGenerateConnectManifestRequest { + /** Properties of a GetFeatureRequest. */ + interface IGetFeatureRequest { - /** GenerateConnectManifestRequest name */ + /** GetFeatureRequest name */ name?: (string|null); - /** GenerateConnectManifestRequest namespace */ - namespace?: (string|null); - - /** GenerateConnectManifestRequest proxy */ - proxy?: (Uint8Array|Buffer|string|null); - - /** GenerateConnectManifestRequest version */ - version?: (string|null); - - /** GenerateConnectManifestRequest isUpgrade */ - isUpgrade?: (boolean|null); - - /** GenerateConnectManifestRequest registry */ - registry?: (string|null); - - /** GenerateConnectManifestRequest imagePullSecretContent */ - imagePullSecretContent?: (Uint8Array|Buffer|string|null); + /** GetFeatureRequest returnPartialSuccess */ + returnPartialSuccess?: (boolean|null); } - /** Represents a GenerateConnectManifestRequest. */ - class GenerateConnectManifestRequest implements IGenerateConnectManifestRequest { + /** Represents a GetFeatureRequest. */ + class GetFeatureRequest implements IGetFeatureRequest { /** - * Constructs a new GenerateConnectManifestRequest. + * Constructs a new GetFeatureRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IGenerateConnectManifestRequest); - - /** GenerateConnectManifestRequest name. */ - public name: string; - - /** GenerateConnectManifestRequest namespace. */ - public namespace: string; - - /** GenerateConnectManifestRequest proxy. */ - public proxy: (Uint8Array|Buffer|string); - - /** GenerateConnectManifestRequest version. */ - public version: string; - - /** GenerateConnectManifestRequest isUpgrade. */ - public isUpgrade: boolean; + constructor(properties?: google.cloud.gkehub.v1.IGetFeatureRequest); - /** GenerateConnectManifestRequest registry. */ - public registry: string; + /** GetFeatureRequest name. */ + public name: string; - /** GenerateConnectManifestRequest imagePullSecretContent. */ - public imagePullSecretContent: (Uint8Array|Buffer|string); + /** GetFeatureRequest returnPartialSuccess. */ + public returnPartialSuccess: boolean; /** - * Creates a new GenerateConnectManifestRequest instance using the specified properties. + * Creates a new GetFeatureRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GenerateConnectManifestRequest instance + * @returns GetFeatureRequest instance */ - public static create(properties?: google.cloud.gkehub.v1.IGenerateConnectManifestRequest): google.cloud.gkehub.v1.GenerateConnectManifestRequest; + public static create(properties?: google.cloud.gkehub.v1.IGetFeatureRequest): google.cloud.gkehub.v1.GetFeatureRequest; /** - * Encodes the specified GenerateConnectManifestRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestRequest.verify|verify} messages. - * @param message GenerateConnectManifestRequest message or plain object to encode + * Encodes the specified GetFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetFeatureRequest.verify|verify} messages. + * @param message GetFeatureRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IGenerateConnectManifestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IGetFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GenerateConnectManifestRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestRequest.verify|verify} messages. - * @param message GenerateConnectManifestRequest message or plain object to encode + * Encodes the specified GetFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetFeatureRequest.verify|verify} messages. + * @param message GetFeatureRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IGenerateConnectManifestRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IGetFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GenerateConnectManifestRequest message from the specified reader or buffer. + * Decodes a GetFeatureRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GenerateConnectManifestRequest + * @returns GetFeatureRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GenerateConnectManifestRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GetFeatureRequest; /** - * Decodes a GenerateConnectManifestRequest message from the specified reader or buffer, length delimited. + * Decodes a GetFeatureRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GenerateConnectManifestRequest + * @returns GetFeatureRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GenerateConnectManifestRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GetFeatureRequest; /** - * Verifies a GenerateConnectManifestRequest message. + * Verifies a GetFeatureRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GenerateConnectManifestRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetFeatureRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GenerateConnectManifestRequest + * @returns GetFeatureRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GenerateConnectManifestRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GetFeatureRequest; /** - * Creates a plain object from a GenerateConnectManifestRequest message. Also converts values to other types if specified. - * @param message GenerateConnectManifestRequest + * Creates a plain object from a GetFeatureRequest message. Also converts values to other types if specified. + * @param message GetFeatureRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.GenerateConnectManifestRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.GetFeatureRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GenerateConnectManifestRequest to JSON. + * Converts this GetFeatureRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GenerateConnectManifestRequest + * Gets the default type url for GetFeatureRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GenerateConnectManifestResponse. */ - interface IGenerateConnectManifestResponse { + /** Properties of a CreateFeatureRequest. */ + interface ICreateFeatureRequest { - /** GenerateConnectManifestResponse manifest */ - manifest?: (google.cloud.gkehub.v1.IConnectAgentResource[]|null); + /** CreateFeatureRequest parent */ + parent?: (string|null); + + /** CreateFeatureRequest featureId */ + featureId?: (string|null); + + /** CreateFeatureRequest resource */ + resource?: (google.cloud.gkehub.v1.IFeature|null); + + /** CreateFeatureRequest requestId */ + requestId?: (string|null); } - /** Represents a GenerateConnectManifestResponse. */ - class GenerateConnectManifestResponse implements IGenerateConnectManifestResponse { + /** Represents a CreateFeatureRequest. */ + class CreateFeatureRequest implements ICreateFeatureRequest { /** - * Constructs a new GenerateConnectManifestResponse. + * Constructs a new CreateFeatureRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IGenerateConnectManifestResponse); + constructor(properties?: google.cloud.gkehub.v1.ICreateFeatureRequest); - /** GenerateConnectManifestResponse manifest. */ - public manifest: google.cloud.gkehub.v1.IConnectAgentResource[]; + /** CreateFeatureRequest parent. */ + public parent: string; + + /** CreateFeatureRequest featureId. */ + public featureId: string; + + /** CreateFeatureRequest resource. */ + public resource?: (google.cloud.gkehub.v1.IFeature|null); + + /** CreateFeatureRequest requestId. */ + public requestId: string; /** - * Creates a new GenerateConnectManifestResponse instance using the specified properties. + * Creates a new CreateFeatureRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GenerateConnectManifestResponse instance + * @returns CreateFeatureRequest instance */ - public static create(properties?: google.cloud.gkehub.v1.IGenerateConnectManifestResponse): google.cloud.gkehub.v1.GenerateConnectManifestResponse; + public static create(properties?: google.cloud.gkehub.v1.ICreateFeatureRequest): google.cloud.gkehub.v1.CreateFeatureRequest; /** - * Encodes the specified GenerateConnectManifestResponse message. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestResponse.verify|verify} messages. - * @param message GenerateConnectManifestResponse message or plain object to encode + * Encodes the specified CreateFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateFeatureRequest.verify|verify} messages. + * @param message CreateFeatureRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IGenerateConnectManifestResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.ICreateFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GenerateConnectManifestResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestResponse.verify|verify} messages. - * @param message GenerateConnectManifestResponse message or plain object to encode + * Encodes the specified CreateFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateFeatureRequest.verify|verify} messages. + * @param message CreateFeatureRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IGenerateConnectManifestResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.ICreateFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GenerateConnectManifestResponse message from the specified reader or buffer. + * Decodes a CreateFeatureRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GenerateConnectManifestResponse + * @returns CreateFeatureRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GenerateConnectManifestResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.CreateFeatureRequest; /** - * Decodes a GenerateConnectManifestResponse message from the specified reader or buffer, length delimited. + * Decodes a CreateFeatureRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GenerateConnectManifestResponse + * @returns CreateFeatureRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GenerateConnectManifestResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.CreateFeatureRequest; /** - * Verifies a GenerateConnectManifestResponse message. + * Verifies a CreateFeatureRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GenerateConnectManifestResponse message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFeatureRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GenerateConnectManifestResponse + * @returns CreateFeatureRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GenerateConnectManifestResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.CreateFeatureRequest; /** - * Creates a plain object from a GenerateConnectManifestResponse message. Also converts values to other types if specified. - * @param message GenerateConnectManifestResponse + * Creates a plain object from a CreateFeatureRequest message. Also converts values to other types if specified. + * @param message CreateFeatureRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.GenerateConnectManifestResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.CreateFeatureRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GenerateConnectManifestResponse to JSON. + * Converts this CreateFeatureRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GenerateConnectManifestResponse + * Gets the default type url for CreateFeatureRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ConnectAgentResource. */ - interface IConnectAgentResource { + /** Properties of a DeleteFeatureRequest. */ + interface IDeleteFeatureRequest { - /** ConnectAgentResource type */ - type?: (google.cloud.gkehub.v1.ITypeMeta|null); + /** DeleteFeatureRequest name */ + name?: (string|null); - /** ConnectAgentResource manifest */ - manifest?: (string|null); + /** DeleteFeatureRequest force */ + force?: (boolean|null); + + /** DeleteFeatureRequest requestId */ + requestId?: (string|null); } - /** Represents a ConnectAgentResource. */ - class ConnectAgentResource implements IConnectAgentResource { + /** Represents a DeleteFeatureRequest. */ + class DeleteFeatureRequest implements IDeleteFeatureRequest { /** - * Constructs a new ConnectAgentResource. + * Constructs a new DeleteFeatureRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IConnectAgentResource); + constructor(properties?: google.cloud.gkehub.v1.IDeleteFeatureRequest); - /** ConnectAgentResource type. */ - public type?: (google.cloud.gkehub.v1.ITypeMeta|null); + /** DeleteFeatureRequest name. */ + public name: string; - /** ConnectAgentResource manifest. */ - public manifest: string; + /** DeleteFeatureRequest force. */ + public force: boolean; + + /** DeleteFeatureRequest requestId. */ + public requestId: string; /** - * Creates a new ConnectAgentResource instance using the specified properties. + * Creates a new DeleteFeatureRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ConnectAgentResource instance + * @returns DeleteFeatureRequest instance */ - public static create(properties?: google.cloud.gkehub.v1.IConnectAgentResource): google.cloud.gkehub.v1.ConnectAgentResource; + public static create(properties?: google.cloud.gkehub.v1.IDeleteFeatureRequest): google.cloud.gkehub.v1.DeleteFeatureRequest; /** - * Encodes the specified ConnectAgentResource message. Does not implicitly {@link google.cloud.gkehub.v1.ConnectAgentResource.verify|verify} messages. - * @param message ConnectAgentResource message or plain object to encode + * Encodes the specified DeleteFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteFeatureRequest.verify|verify} messages. + * @param message DeleteFeatureRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IConnectAgentResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IDeleteFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ConnectAgentResource message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ConnectAgentResource.verify|verify} messages. - * @param message ConnectAgentResource message or plain object to encode + * Encodes the specified DeleteFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteFeatureRequest.verify|verify} messages. + * @param message DeleteFeatureRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IConnectAgentResource, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IDeleteFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ConnectAgentResource message from the specified reader or buffer. + * Decodes a DeleteFeatureRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ConnectAgentResource + * @returns DeleteFeatureRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ConnectAgentResource; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.DeleteFeatureRequest; /** - * Decodes a ConnectAgentResource message from the specified reader or buffer, length delimited. + * Decodes a DeleteFeatureRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ConnectAgentResource + * @returns DeleteFeatureRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ConnectAgentResource; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.DeleteFeatureRequest; /** - * Verifies a ConnectAgentResource message. + * Verifies a DeleteFeatureRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ConnectAgentResource message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFeatureRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ConnectAgentResource + * @returns DeleteFeatureRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ConnectAgentResource; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.DeleteFeatureRequest; /** - * Creates a plain object from a ConnectAgentResource message. Also converts values to other types if specified. - * @param message ConnectAgentResource + * Creates a plain object from a DeleteFeatureRequest message. Also converts values to other types if specified. + * @param message DeleteFeatureRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.ConnectAgentResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.DeleteFeatureRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ConnectAgentResource to JSON. + * Converts this DeleteFeatureRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ConnectAgentResource + * Gets the default type url for DeleteFeatureRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TypeMeta. */ - interface ITypeMeta { + /** Properties of an UpdateFeatureRequest. */ + interface IUpdateFeatureRequest { - /** TypeMeta kind */ - kind?: (string|null); + /** UpdateFeatureRequest name */ + name?: (string|null); - /** TypeMeta apiVersion */ - apiVersion?: (string|null); + /** UpdateFeatureRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateFeatureRequest resource */ + resource?: (google.cloud.gkehub.v1.IFeature|null); + + /** UpdateFeatureRequest requestId */ + requestId?: (string|null); } - /** Represents a TypeMeta. */ - class TypeMeta implements ITypeMeta { + /** Represents an UpdateFeatureRequest. */ + class UpdateFeatureRequest implements IUpdateFeatureRequest { /** - * Constructs a new TypeMeta. + * Constructs a new UpdateFeatureRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.ITypeMeta); + constructor(properties?: google.cloud.gkehub.v1.IUpdateFeatureRequest); - /** TypeMeta kind. */ - public kind: string; + /** UpdateFeatureRequest name. */ + public name: string; + + /** UpdateFeatureRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** UpdateFeatureRequest resource. */ + public resource?: (google.cloud.gkehub.v1.IFeature|null); - /** TypeMeta apiVersion. */ - public apiVersion: string; + /** UpdateFeatureRequest requestId. */ + public requestId: string; /** - * Creates a new TypeMeta instance using the specified properties. + * Creates a new UpdateFeatureRequest instance using the specified properties. * @param [properties] Properties to set - * @returns TypeMeta instance + * @returns UpdateFeatureRequest instance */ - public static create(properties?: google.cloud.gkehub.v1.ITypeMeta): google.cloud.gkehub.v1.TypeMeta; + public static create(properties?: google.cloud.gkehub.v1.IUpdateFeatureRequest): google.cloud.gkehub.v1.UpdateFeatureRequest; /** - * Encodes the specified TypeMeta message. Does not implicitly {@link google.cloud.gkehub.v1.TypeMeta.verify|verify} messages. - * @param message TypeMeta message or plain object to encode + * Encodes the specified UpdateFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateFeatureRequest.verify|verify} messages. + * @param message UpdateFeatureRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.ITypeMeta, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IUpdateFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TypeMeta message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.TypeMeta.verify|verify} messages. - * @param message TypeMeta message or plain object to encode + * Encodes the specified UpdateFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateFeatureRequest.verify|verify} messages. + * @param message UpdateFeatureRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.ITypeMeta, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IUpdateFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TypeMeta message from the specified reader or buffer. + * Decodes an UpdateFeatureRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TypeMeta + * @returns UpdateFeatureRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.TypeMeta; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.UpdateFeatureRequest; /** - * Decodes a TypeMeta message from the specified reader or buffer, length delimited. + * Decodes an UpdateFeatureRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TypeMeta + * @returns UpdateFeatureRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.TypeMeta; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.UpdateFeatureRequest; /** - * Verifies a TypeMeta message. + * Verifies an UpdateFeatureRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TypeMeta message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFeatureRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TypeMeta + * @returns UpdateFeatureRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.TypeMeta; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.UpdateFeatureRequest; /** - * Creates a plain object from a TypeMeta message. Also converts values to other types if specified. - * @param message TypeMeta + * Creates a plain object from an UpdateFeatureRequest message. Also converts values to other types if specified. + * @param message UpdateFeatureRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.TypeMeta, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.UpdateFeatureRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TypeMeta to JSON. + * Converts this UpdateFeatureRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TypeMeta + * Gets the default type url for UpdateFeatureRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListFeaturesRequest. */ - interface IListFeaturesRequest { + /** Properties of a CreateFleetRequest. */ + interface ICreateFleetRequest { - /** ListFeaturesRequest parent */ + /** CreateFleetRequest parent */ parent?: (string|null); - /** ListFeaturesRequest pageSize */ - pageSize?: (number|null); - - /** ListFeaturesRequest pageToken */ - pageToken?: (string|null); - - /** ListFeaturesRequest filter */ - filter?: (string|null); - - /** ListFeaturesRequest orderBy */ - orderBy?: (string|null); + /** CreateFleetRequest fleet */ + fleet?: (google.cloud.gkehub.v1.IFleet|null); } - /** Represents a ListFeaturesRequest. */ - class ListFeaturesRequest implements IListFeaturesRequest { + /** Represents a CreateFleetRequest. */ + class CreateFleetRequest implements ICreateFleetRequest { /** - * Constructs a new ListFeaturesRequest. + * Constructs a new CreateFleetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IListFeaturesRequest); + constructor(properties?: google.cloud.gkehub.v1.ICreateFleetRequest); - /** ListFeaturesRequest parent. */ + /** CreateFleetRequest parent. */ public parent: string; - /** ListFeaturesRequest pageSize. */ - public pageSize: number; - - /** ListFeaturesRequest pageToken. */ - public pageToken: string; - - /** ListFeaturesRequest filter. */ - public filter: string; - - /** ListFeaturesRequest orderBy. */ - public orderBy: string; + /** CreateFleetRequest fleet. */ + public fleet?: (google.cloud.gkehub.v1.IFleet|null); /** - * Creates a new ListFeaturesRequest instance using the specified properties. + * Creates a new CreateFleetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListFeaturesRequest instance + * @returns CreateFleetRequest instance */ - public static create(properties?: google.cloud.gkehub.v1.IListFeaturesRequest): google.cloud.gkehub.v1.ListFeaturesRequest; + public static create(properties?: google.cloud.gkehub.v1.ICreateFleetRequest): google.cloud.gkehub.v1.CreateFleetRequest; /** - * Encodes the specified ListFeaturesRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesRequest.verify|verify} messages. - * @param message ListFeaturesRequest message or plain object to encode + * Encodes the specified CreateFleetRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateFleetRequest.verify|verify} messages. + * @param message CreateFleetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IListFeaturesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.ICreateFleetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFeaturesRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesRequest.verify|verify} messages. - * @param message ListFeaturesRequest message or plain object to encode + * Encodes the specified CreateFleetRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateFleetRequest.verify|verify} messages. + * @param message CreateFleetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IListFeaturesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.ICreateFleetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFeaturesRequest message from the specified reader or buffer. + * Decodes a CreateFleetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFeaturesRequest + * @returns CreateFleetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListFeaturesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.CreateFleetRequest; /** - * Decodes a ListFeaturesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateFleetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFeaturesRequest + * @returns CreateFleetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListFeaturesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.CreateFleetRequest; /** - * Verifies a ListFeaturesRequest message. + * Verifies a CreateFleetRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListFeaturesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateFleetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFeaturesRequest + * @returns CreateFleetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListFeaturesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.CreateFleetRequest; /** - * Creates a plain object from a ListFeaturesRequest message. Also converts values to other types if specified. - * @param message ListFeaturesRequest + * Creates a plain object from a CreateFleetRequest message. Also converts values to other types if specified. + * @param message CreateFleetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.ListFeaturesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.CreateFleetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFeaturesRequest to JSON. + * Converts this CreateFleetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListFeaturesRequest + * Gets the default type url for CreateFleetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListFeaturesResponse. */ - interface IListFeaturesResponse { - - /** ListFeaturesResponse resources */ - resources?: (google.cloud.gkehub.v1.IFeature[]|null); + /** Properties of a GetFleetRequest. */ + interface IGetFleetRequest { - /** ListFeaturesResponse nextPageToken */ - nextPageToken?: (string|null); + /** GetFleetRequest name */ + name?: (string|null); } - /** Represents a ListFeaturesResponse. */ - class ListFeaturesResponse implements IListFeaturesResponse { + /** Represents a GetFleetRequest. */ + class GetFleetRequest implements IGetFleetRequest { /** - * Constructs a new ListFeaturesResponse. + * Constructs a new GetFleetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IListFeaturesResponse); + constructor(properties?: google.cloud.gkehub.v1.IGetFleetRequest); - /** ListFeaturesResponse resources. */ - public resources: google.cloud.gkehub.v1.IFeature[]; - - /** ListFeaturesResponse nextPageToken. */ - public nextPageToken: string; + /** GetFleetRequest name. */ + public name: string; /** - * Creates a new ListFeaturesResponse instance using the specified properties. + * Creates a new GetFleetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListFeaturesResponse instance + * @returns GetFleetRequest instance */ - public static create(properties?: google.cloud.gkehub.v1.IListFeaturesResponse): google.cloud.gkehub.v1.ListFeaturesResponse; + public static create(properties?: google.cloud.gkehub.v1.IGetFleetRequest): google.cloud.gkehub.v1.GetFleetRequest; /** - * Encodes the specified ListFeaturesResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesResponse.verify|verify} messages. - * @param message ListFeaturesResponse message or plain object to encode + * Encodes the specified GetFleetRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetFleetRequest.verify|verify} messages. + * @param message GetFleetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IListFeaturesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IGetFleetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListFeaturesResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesResponse.verify|verify} messages. - * @param message ListFeaturesResponse message or plain object to encode + * Encodes the specified GetFleetRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetFleetRequest.verify|verify} messages. + * @param message GetFleetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IListFeaturesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IGetFleetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListFeaturesResponse message from the specified reader or buffer. + * Decodes a GetFleetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListFeaturesResponse + * @returns GetFleetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListFeaturesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GetFleetRequest; /** - * Decodes a ListFeaturesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetFleetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListFeaturesResponse + * @returns GetFleetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListFeaturesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GetFleetRequest; /** - * Verifies a ListFeaturesResponse message. + * Verifies a GetFleetRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListFeaturesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetFleetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListFeaturesResponse + * @returns GetFleetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListFeaturesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GetFleetRequest; /** - * Creates a plain object from a ListFeaturesResponse message. Also converts values to other types if specified. - * @param message ListFeaturesResponse + * Creates a plain object from a GetFleetRequest message. Also converts values to other types if specified. + * @param message GetFleetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.ListFeaturesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.GetFleetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListFeaturesResponse to JSON. + * Converts this GetFleetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListFeaturesResponse + * Gets the default type url for GetFleetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetFeatureRequest. */ - interface IGetFeatureRequest { + /** Properties of an UpdateFleetRequest. */ + interface IUpdateFleetRequest { - /** GetFeatureRequest name */ - name?: (string|null); + /** UpdateFleetRequest fleet */ + fleet?: (google.cloud.gkehub.v1.IFleet|null); + + /** UpdateFleetRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a GetFeatureRequest. */ - class GetFeatureRequest implements IGetFeatureRequest { + /** Represents an UpdateFleetRequest. */ + class UpdateFleetRequest implements IUpdateFleetRequest { /** - * Constructs a new GetFeatureRequest. + * Constructs a new UpdateFleetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IGetFeatureRequest); + constructor(properties?: google.cloud.gkehub.v1.IUpdateFleetRequest); - /** GetFeatureRequest name. */ - public name: string; + /** UpdateFleetRequest fleet. */ + public fleet?: (google.cloud.gkehub.v1.IFleet|null); + + /** UpdateFleetRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new GetFeatureRequest instance using the specified properties. + * Creates a new UpdateFleetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetFeatureRequest instance + * @returns UpdateFleetRequest instance */ - public static create(properties?: google.cloud.gkehub.v1.IGetFeatureRequest): google.cloud.gkehub.v1.GetFeatureRequest; + public static create(properties?: google.cloud.gkehub.v1.IUpdateFleetRequest): google.cloud.gkehub.v1.UpdateFleetRequest; /** - * Encodes the specified GetFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetFeatureRequest.verify|verify} messages. - * @param message GetFeatureRequest message or plain object to encode + * Encodes the specified UpdateFleetRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateFleetRequest.verify|verify} messages. + * @param message UpdateFleetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IGetFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IUpdateFleetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetFeatureRequest.verify|verify} messages. - * @param message GetFeatureRequest message or plain object to encode + * Encodes the specified UpdateFleetRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateFleetRequest.verify|verify} messages. + * @param message UpdateFleetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IGetFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IUpdateFleetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetFeatureRequest message from the specified reader or buffer. + * Decodes an UpdateFleetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetFeatureRequest + * @returns UpdateFleetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.GetFeatureRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.UpdateFleetRequest; /** - * Decodes a GetFeatureRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateFleetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetFeatureRequest + * @returns UpdateFleetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.GetFeatureRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.UpdateFleetRequest; /** - * Verifies a GetFeatureRequest message. + * Verifies an UpdateFleetRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetFeatureRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateFleetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetFeatureRequest + * @returns UpdateFleetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.GetFeatureRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.UpdateFleetRequest; /** - * Creates a plain object from a GetFeatureRequest message. Also converts values to other types if specified. - * @param message GetFeatureRequest + * Creates a plain object from an UpdateFleetRequest message. Also converts values to other types if specified. + * @param message UpdateFleetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.GetFeatureRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.UpdateFleetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetFeatureRequest to JSON. + * Converts this UpdateFleetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetFeatureRequest + * Gets the default type url for UpdateFleetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateFeatureRequest. */ - interface ICreateFeatureRequest { - - /** CreateFeatureRequest parent */ - parent?: (string|null); - - /** CreateFeatureRequest featureId */ - featureId?: (string|null); - - /** CreateFeatureRequest resource */ - resource?: (google.cloud.gkehub.v1.IFeature|null); + /** Properties of a DeleteFleetRequest. */ + interface IDeleteFleetRequest { - /** CreateFeatureRequest requestId */ - requestId?: (string|null); + /** DeleteFleetRequest name */ + name?: (string|null); } - /** Represents a CreateFeatureRequest. */ - class CreateFeatureRequest implements ICreateFeatureRequest { + /** Represents a DeleteFleetRequest. */ + class DeleteFleetRequest implements IDeleteFleetRequest { /** - * Constructs a new CreateFeatureRequest. + * Constructs a new DeleteFleetRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.ICreateFeatureRequest); - - /** CreateFeatureRequest parent. */ - public parent: string; - - /** CreateFeatureRequest featureId. */ - public featureId: string; + constructor(properties?: google.cloud.gkehub.v1.IDeleteFleetRequest); - /** CreateFeatureRequest resource. */ - public resource?: (google.cloud.gkehub.v1.IFeature|null); - - /** CreateFeatureRequest requestId. */ - public requestId: string; + /** DeleteFleetRequest name. */ + public name: string; /** - * Creates a new CreateFeatureRequest instance using the specified properties. + * Creates a new DeleteFleetRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateFeatureRequest instance + * @returns DeleteFleetRequest instance */ - public static create(properties?: google.cloud.gkehub.v1.ICreateFeatureRequest): google.cloud.gkehub.v1.CreateFeatureRequest; + public static create(properties?: google.cloud.gkehub.v1.IDeleteFleetRequest): google.cloud.gkehub.v1.DeleteFleetRequest; /** - * Encodes the specified CreateFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateFeatureRequest.verify|verify} messages. - * @param message CreateFeatureRequest message or plain object to encode + * Encodes the specified DeleteFleetRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteFleetRequest.verify|verify} messages. + * @param message DeleteFleetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.ICreateFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IDeleteFleetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateFeatureRequest.verify|verify} messages. - * @param message CreateFeatureRequest message or plain object to encode + * Encodes the specified DeleteFleetRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteFleetRequest.verify|verify} messages. + * @param message DeleteFleetRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.ICreateFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IDeleteFleetRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateFeatureRequest message from the specified reader or buffer. + * Decodes a DeleteFleetRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateFeatureRequest + * @returns DeleteFleetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.CreateFeatureRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.DeleteFleetRequest; /** - * Decodes a CreateFeatureRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteFleetRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateFeatureRequest + * @returns DeleteFleetRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.CreateFeatureRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.DeleteFleetRequest; /** - * Verifies a CreateFeatureRequest message. + * Verifies a DeleteFleetRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateFeatureRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteFleetRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateFeatureRequest + * @returns DeleteFleetRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.CreateFeatureRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.DeleteFleetRequest; /** - * Creates a plain object from a CreateFeatureRequest message. Also converts values to other types if specified. - * @param message CreateFeatureRequest + * Creates a plain object from a DeleteFleetRequest message. Also converts values to other types if specified. + * @param message DeleteFleetRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.CreateFeatureRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.DeleteFleetRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateFeatureRequest to JSON. + * Converts this DeleteFleetRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateFeatureRequest + * Gets the default type url for DeleteFleetRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteFeatureRequest. */ - interface IDeleteFeatureRequest { + /** Properties of a ListFleetsRequest. */ + interface IListFleetsRequest { - /** DeleteFeatureRequest name */ - name?: (string|null); + /** ListFleetsRequest parent */ + parent?: (string|null); - /** DeleteFeatureRequest force */ - force?: (boolean|null); + /** ListFleetsRequest pageToken */ + pageToken?: (string|null); - /** DeleteFeatureRequest requestId */ - requestId?: (string|null); + /** ListFleetsRequest pageSize */ + pageSize?: (number|null); } - /** Represents a DeleteFeatureRequest. */ - class DeleteFeatureRequest implements IDeleteFeatureRequest { + /** Represents a ListFleetsRequest. */ + class ListFleetsRequest implements IListFleetsRequest { /** - * Constructs a new DeleteFeatureRequest. + * Constructs a new ListFleetsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IDeleteFeatureRequest); + constructor(properties?: google.cloud.gkehub.v1.IListFleetsRequest); - /** DeleteFeatureRequest name. */ - public name: string; + /** ListFleetsRequest parent. */ + public parent: string; - /** DeleteFeatureRequest force. */ - public force: boolean; + /** ListFleetsRequest pageToken. */ + public pageToken: string; - /** DeleteFeatureRequest requestId. */ - public requestId: string; + /** ListFleetsRequest pageSize. */ + public pageSize: number; /** - * Creates a new DeleteFeatureRequest instance using the specified properties. + * Creates a new ListFleetsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteFeatureRequest instance + * @returns ListFleetsRequest instance */ - public static create(properties?: google.cloud.gkehub.v1.IDeleteFeatureRequest): google.cloud.gkehub.v1.DeleteFeatureRequest; + public static create(properties?: google.cloud.gkehub.v1.IListFleetsRequest): google.cloud.gkehub.v1.ListFleetsRequest; /** - * Encodes the specified DeleteFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteFeatureRequest.verify|verify} messages. - * @param message DeleteFeatureRequest message or plain object to encode + * Encodes the specified ListFleetsRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListFleetsRequest.verify|verify} messages. + * @param message ListFleetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IDeleteFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IListFleetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteFeatureRequest.verify|verify} messages. - * @param message DeleteFeatureRequest message or plain object to encode + * Encodes the specified ListFleetsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListFleetsRequest.verify|verify} messages. + * @param message ListFleetsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IDeleteFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IListFleetsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteFeatureRequest message from the specified reader or buffer. + * Decodes a ListFleetsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteFeatureRequest + * @returns ListFleetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.DeleteFeatureRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListFleetsRequest; /** - * Decodes a DeleteFeatureRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFleetsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteFeatureRequest + * @returns ListFleetsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.DeleteFeatureRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListFleetsRequest; /** - * Verifies a DeleteFeatureRequest message. + * Verifies a ListFleetsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteFeatureRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFleetsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteFeatureRequest + * @returns ListFleetsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.DeleteFeatureRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListFleetsRequest; /** - * Creates a plain object from a DeleteFeatureRequest message. Also converts values to other types if specified. - * @param message DeleteFeatureRequest + * Creates a plain object from a ListFleetsRequest message. Also converts values to other types if specified. + * @param message ListFleetsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.DeleteFeatureRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.ListFleetsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteFeatureRequest to JSON. + * Converts this ListFleetsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteFeatureRequest + * Gets the default type url for ListFleetsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateFeatureRequest. */ - interface IUpdateFeatureRequest { - - /** UpdateFeatureRequest name */ - name?: (string|null); - - /** UpdateFeatureRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** Properties of a ListFleetsResponse. */ + interface IListFleetsResponse { - /** UpdateFeatureRequest resource */ - resource?: (google.cloud.gkehub.v1.IFeature|null); + /** ListFleetsResponse fleets */ + fleets?: (google.cloud.gkehub.v1.IFleet[]|null); - /** UpdateFeatureRequest requestId */ - requestId?: (string|null); + /** ListFleetsResponse nextPageToken */ + nextPageToken?: (string|null); } - /** Represents an UpdateFeatureRequest. */ - class UpdateFeatureRequest implements IUpdateFeatureRequest { + /** Represents a ListFleetsResponse. */ + class ListFleetsResponse implements IListFleetsResponse { /** - * Constructs a new UpdateFeatureRequest. + * Constructs a new ListFleetsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.gkehub.v1.IUpdateFeatureRequest); - - /** UpdateFeatureRequest name. */ - public name: string; - - /** UpdateFeatureRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + constructor(properties?: google.cloud.gkehub.v1.IListFleetsResponse); - /** UpdateFeatureRequest resource. */ - public resource?: (google.cloud.gkehub.v1.IFeature|null); + /** ListFleetsResponse fleets. */ + public fleets: google.cloud.gkehub.v1.IFleet[]; - /** UpdateFeatureRequest requestId. */ - public requestId: string; + /** ListFleetsResponse nextPageToken. */ + public nextPageToken: string; /** - * Creates a new UpdateFeatureRequest instance using the specified properties. + * Creates a new ListFleetsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateFeatureRequest instance + * @returns ListFleetsResponse instance */ - public static create(properties?: google.cloud.gkehub.v1.IUpdateFeatureRequest): google.cloud.gkehub.v1.UpdateFeatureRequest; + public static create(properties?: google.cloud.gkehub.v1.IListFleetsResponse): google.cloud.gkehub.v1.ListFleetsResponse; /** - * Encodes the specified UpdateFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateFeatureRequest.verify|verify} messages. - * @param message UpdateFeatureRequest message or plain object to encode + * Encodes the specified ListFleetsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListFleetsResponse.verify|verify} messages. + * @param message ListFleetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.gkehub.v1.IUpdateFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.gkehub.v1.IListFleetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateFeatureRequest.verify|verify} messages. - * @param message UpdateFeatureRequest message or plain object to encode + * Encodes the specified ListFleetsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListFleetsResponse.verify|verify} messages. + * @param message ListFleetsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.gkehub.v1.IUpdateFeatureRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.gkehub.v1.IListFleetsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateFeatureRequest message from the specified reader or buffer. + * Decodes a ListFleetsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateFeatureRequest + * @returns ListFleetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.UpdateFeatureRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.v1.ListFleetsResponse; /** - * Decodes an UpdateFeatureRequest message from the specified reader or buffer, length delimited. + * Decodes a ListFleetsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateFeatureRequest + * @returns ListFleetsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.UpdateFeatureRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.v1.ListFleetsResponse; /** - * Verifies an UpdateFeatureRequest message. + * Verifies a ListFleetsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateFeatureRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListFleetsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateFeatureRequest + * @returns ListFleetsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.UpdateFeatureRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.v1.ListFleetsResponse; /** - * Creates a plain object from an UpdateFeatureRequest message. Also converts values to other types if specified. - * @param message UpdateFeatureRequest + * Creates a plain object from a ListFleetsResponse message. Also converts values to other types if specified. + * @param message ListFleetsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.gkehub.v1.UpdateFeatureRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.gkehub.v1.ListFleetsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateFeatureRequest to JSON. + * Converts this ListFleetsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateFeatureRequest + * Gets the default type url for ListFleetsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -18182,6 +25503,202 @@ export namespace google { } } + /** Namespace rbacrolebindingactuation. */ + namespace rbacrolebindingactuation { + + /** Namespace v1. */ + namespace v1 { + + /** Properties of a FeatureSpec. */ + interface IFeatureSpec { + + /** FeatureSpec allowedCustomRoles */ + allowedCustomRoles?: (string[]|null); + } + + /** Represents a FeatureSpec. */ + class FeatureSpec implements IFeatureSpec { + + /** + * Constructs a new FeatureSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureSpec); + + /** FeatureSpec allowedCustomRoles. */ + public allowedCustomRoles: string[]; + + /** + * Creates a new FeatureSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSpec instance + */ + public static create(properties?: google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureSpec): google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec; + + /** + * Encodes the specified FeatureSpec message. Does not implicitly {@link google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec.verify|verify} messages. + * @param message FeatureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSpec message, length delimited. Does not implicitly {@link google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec.verify|verify} messages. + * @param message FeatureSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec; + + /** + * Decodes a FeatureSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec; + + /** + * Verifies a FeatureSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec; + + /** + * Creates a plain object from a FeatureSpec message. Also converts values to other types if specified. + * @param message FeatureSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FeatureState. */ + interface IFeatureState { + } + + /** Represents a FeatureState. */ + class FeatureState implements IFeatureState { + + /** + * Constructs a new FeatureState. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureState); + + /** + * Creates a new FeatureState instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureState instance + */ + public static create(properties?: google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureState): google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState; + + /** + * Encodes the specified FeatureState message. Does not implicitly {@link google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState.verify|verify} messages. + * @param message FeatureState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureState message, length delimited. Does not implicitly {@link google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState.verify|verify} messages. + * @param message FeatureState message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureState, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureState message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState; + + /** + * Decodes a FeatureState message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureState + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState; + + /** + * Verifies a FeatureState message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureState message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureState + */ + public static fromObject(object: { [k: string]: any }): google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState; + + /** + * Creates a plain object from a FeatureState message. Also converts values to other types if specified. + * @param message FeatureState + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureState to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureState + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + /** Namespace cloudauditlogging. */ namespace cloudauditlogging { diff --git a/packages/google-cloud-gkehub/protos/protos.js b/packages/google-cloud-gkehub/protos/protos.js index d23dd17ba99..9e6e65651dd 100644 --- a/packages/google-cloud-gkehub/protos/protos.js +++ b/packages/google-cloud-gkehub/protos/protos.js @@ -37621,6 +37621,9 @@ * @property {google.protobuf.ITimestamp|null} [createTime] Feature createTime * @property {google.protobuf.ITimestamp|null} [updateTime] Feature updateTime * @property {google.protobuf.ITimestamp|null} [deleteTime] Feature deleteTime + * @property {Object.|null} [scopeSpecs] Feature scopeSpecs + * @property {Object.|null} [scopeStates] Feature scopeStates + * @property {Array.|null} [unreachable] Feature unreachable */ /** @@ -37635,6 +37638,9 @@ this.labels = {}; this.membershipSpecs = {}; this.membershipStates = {}; + this.scopeSpecs = {}; + this.scopeStates = {}; + this.unreachable = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -37721,6 +37727,30 @@ */ Feature.prototype.deleteTime = null; + /** + * Feature scopeSpecs. + * @member {Object.} scopeSpecs + * @memberof google.cloud.gkehub.v1.Feature + * @instance + */ + Feature.prototype.scopeSpecs = $util.emptyObject; + + /** + * Feature scopeStates. + * @member {Object.} scopeStates + * @memberof google.cloud.gkehub.v1.Feature + * @instance + */ + Feature.prototype.scopeStates = $util.emptyObject; + + /** + * Feature unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.gkehub.v1.Feature + * @instance + */ + Feature.prototype.unreachable = $util.emptyArray; + /** * Creates a new Feature instance using the specified properties. * @function create @@ -37772,6 +37802,19 @@ $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.scopeSpecs != null && Object.hasOwnProperty.call(message, "scopeSpecs")) + for (var keys = Object.keys(message.scopeSpecs), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 12, wireType 2 =*/98).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.gkehub.v1.ScopeFeatureSpec.encode(message.scopeSpecs[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.scopeStates != null && Object.hasOwnProperty.call(message, "scopeStates")) + for (var keys = Object.keys(message.scopeStates), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 13, wireType 2 =*/106).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.gkehub.v1.ScopeFeatureState.encode(message.scopeStates[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.unreachable[i]); return writer; }; @@ -37905,6 +37948,58 @@ message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 12: { + if (message.scopeSpecs === $util.emptyObject) + message.scopeSpecs = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.gkehub.v1.ScopeFeatureSpec.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.scopeSpecs[key] = value; + break; + } + case 13: { + if (message.scopeStates === $util.emptyObject) + message.scopeStates = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.gkehub.v1.ScopeFeatureState.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.scopeStates[key] = value; + break; + } + case 15: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -38001,6 +38096,33 @@ if (error) return "deleteTime." + error; } + if (message.scopeSpecs != null && message.hasOwnProperty("scopeSpecs")) { + if (!$util.isObject(message.scopeSpecs)) + return "scopeSpecs: object expected"; + var key = Object.keys(message.scopeSpecs); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.gkehub.v1.ScopeFeatureSpec.verify(message.scopeSpecs[key[i]]); + if (error) + return "scopeSpecs." + error; + } + } + if (message.scopeStates != null && message.hasOwnProperty("scopeStates")) { + if (!$util.isObject(message.scopeStates)) + return "scopeStates: object expected"; + var key = Object.keys(message.scopeStates); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.gkehub.v1.ScopeFeatureState.verify(message.scopeStates[key[i]]); + if (error) + return "scopeStates." + error; + } + } + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } return null; }; @@ -38075,6 +38197,33 @@ throw TypeError(".google.cloud.gkehub.v1.Feature.deleteTime: object expected"); message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); } + if (object.scopeSpecs) { + if (typeof object.scopeSpecs !== "object") + throw TypeError(".google.cloud.gkehub.v1.Feature.scopeSpecs: object expected"); + message.scopeSpecs = {}; + for (var keys = Object.keys(object.scopeSpecs), i = 0; i < keys.length; ++i) { + if (typeof object.scopeSpecs[keys[i]] !== "object") + throw TypeError(".google.cloud.gkehub.v1.Feature.scopeSpecs: object expected"); + message.scopeSpecs[keys[i]] = $root.google.cloud.gkehub.v1.ScopeFeatureSpec.fromObject(object.scopeSpecs[keys[i]]); + } + } + if (object.scopeStates) { + if (typeof object.scopeStates !== "object") + throw TypeError(".google.cloud.gkehub.v1.Feature.scopeStates: object expected"); + message.scopeStates = {}; + for (var keys = Object.keys(object.scopeStates), i = 0; i < keys.length; ++i) { + if (typeof object.scopeStates[keys[i]] !== "object") + throw TypeError(".google.cloud.gkehub.v1.Feature.scopeStates: object expected"); + message.scopeStates[keys[i]] = $root.google.cloud.gkehub.v1.ScopeFeatureState.fromObject(object.scopeStates[keys[i]]); + } + } + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.gkehub.v1.Feature.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } return message; }; @@ -38091,10 +38240,14 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.unreachable = []; if (options.objects || options.defaults) { object.labels = {}; object.membershipSpecs = {}; object.membershipStates = {}; + object.scopeSpecs = {}; + object.scopeStates = {}; } if (options.defaults) { object.name = ""; @@ -38135,6 +38288,21 @@ object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.scopeSpecs && (keys2 = Object.keys(message.scopeSpecs)).length) { + object.scopeSpecs = {}; + for (var j = 0; j < keys2.length; ++j) + object.scopeSpecs[keys2[j]] = $root.google.cloud.gkehub.v1.ScopeFeatureSpec.toObject(message.scopeSpecs[keys2[j]], options); + } + if (message.scopeStates && (keys2 = Object.keys(message.scopeStates)).length) { + object.scopeStates = {}; + for (var j = 0; j < keys2.length; ++j) + object.scopeStates[keys2[j]] = $root.google.cloud.gkehub.v1.ScopeFeatureState.toObject(message.scopeStates[keys2[j]], options); + } + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } return object; }; @@ -38972,6 +39140,7 @@ * Properties of a CommonFeatureState. * @memberof google.cloud.gkehub.v1 * @interface ICommonFeatureState + * @property {google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureState|null} [rbacrolebindingactuation] CommonFeatureState rbacrolebindingactuation * @property {google.cloud.gkehub.v1.IFeatureState|null} [state] CommonFeatureState state */ @@ -38990,6 +39159,14 @@ this[keys[i]] = properties[keys[i]]; } + /** + * CommonFeatureState rbacrolebindingactuation. + * @member {google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureState|null|undefined} rbacrolebindingactuation + * @memberof google.cloud.gkehub.v1.CommonFeatureState + * @instance + */ + CommonFeatureState.prototype.rbacrolebindingactuation = null; + /** * CommonFeatureState state. * @member {google.cloud.gkehub.v1.IFeatureState|null|undefined} state @@ -38998,6 +39175,20 @@ */ CommonFeatureState.prototype.state = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CommonFeatureState featureState. + * @member {"rbacrolebindingactuation"|undefined} featureState + * @memberof google.cloud.gkehub.v1.CommonFeatureState + * @instance + */ + Object.defineProperty(CommonFeatureState.prototype, "featureState", { + get: $util.oneOfGetter($oneOfFields = ["rbacrolebindingactuation"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new CommonFeatureState instance using the specified properties. * @function create @@ -39024,6 +39215,8 @@ writer = $Writer.create(); if (message.state != null && Object.hasOwnProperty.call(message, "state")) $root.google.cloud.gkehub.v1.FeatureState.encode(message.state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rbacrolebindingactuation != null && Object.hasOwnProperty.call(message, "rbacrolebindingactuation")) + $root.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState.encode(message.rbacrolebindingactuation, writer.uint32(/* id 120, wireType 2 =*/962).fork()).ldelim(); return writer; }; @@ -39060,6 +39253,10 @@ if (tag === error) break; switch (tag >>> 3) { + case 120: { + message.rbacrolebindingactuation = $root.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState.decode(reader, reader.uint32()); + break; + } case 1: { message.state = $root.google.cloud.gkehub.v1.FeatureState.decode(reader, reader.uint32()); break; @@ -39099,6 +39296,15 @@ CommonFeatureState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.rbacrolebindingactuation != null && message.hasOwnProperty("rbacrolebindingactuation")) { + properties.featureState = 1; + { + var error = $root.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState.verify(message.rbacrolebindingactuation); + if (error) + return "rbacrolebindingactuation." + error; + } + } if (message.state != null && message.hasOwnProperty("state")) { var error = $root.google.cloud.gkehub.v1.FeatureState.verify(message.state); if (error) @@ -39119,6 +39325,11 @@ if (object instanceof $root.google.cloud.gkehub.v1.CommonFeatureState) return object; var message = new $root.google.cloud.gkehub.v1.CommonFeatureState(); + if (object.rbacrolebindingactuation != null) { + if (typeof object.rbacrolebindingactuation !== "object") + throw TypeError(".google.cloud.gkehub.v1.CommonFeatureState.rbacrolebindingactuation: object expected"); + message.rbacrolebindingactuation = $root.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState.fromObject(object.rbacrolebindingactuation); + } if (object.state != null) { if (typeof object.state !== "object") throw TypeError(".google.cloud.gkehub.v1.CommonFeatureState.state: object expected"); @@ -39144,6 +39355,11 @@ object.state = null; if (message.state != null && message.hasOwnProperty("state")) object.state = $root.google.cloud.gkehub.v1.FeatureState.toObject(message.state, options); + if (message.rbacrolebindingactuation != null && message.hasOwnProperty("rbacrolebindingactuation")) { + object.rbacrolebindingactuation = $root.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState.toObject(message.rbacrolebindingactuation, options); + if (options.oneofs) + object.featureState = "rbacrolebindingactuation"; + } return object; }; @@ -39176,24 +39392,23 @@ return CommonFeatureState; })(); - v1.MembershipFeatureSpec = (function() { + v1.ScopeFeatureSpec = (function() { /** - * Properties of a MembershipFeatureSpec. + * Properties of a ScopeFeatureSpec. * @memberof google.cloud.gkehub.v1 - * @interface IMembershipFeatureSpec - * @property {google.cloud.gkehub.configmanagement.v1.IMembershipSpec|null} [configmanagement] MembershipFeatureSpec configmanagement + * @interface IScopeFeatureSpec */ /** - * Constructs a new MembershipFeatureSpec. + * Constructs a new ScopeFeatureSpec. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a MembershipFeatureSpec. - * @implements IMembershipFeatureSpec + * @classdesc Represents a ScopeFeatureSpec. + * @implements IScopeFeatureSpec * @constructor - * @param {google.cloud.gkehub.v1.IMembershipFeatureSpec=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IScopeFeatureSpec=} [properties] Properties to set */ - function MembershipFeatureSpec(properties) { + function ScopeFeatureSpec(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39201,93 +39416,65 @@ } /** - * MembershipFeatureSpec configmanagement. - * @member {google.cloud.gkehub.configmanagement.v1.IMembershipSpec|null|undefined} configmanagement - * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec - * @instance - */ - MembershipFeatureSpec.prototype.configmanagement = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MembershipFeatureSpec featureSpec. - * @member {"configmanagement"|undefined} featureSpec - * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec - * @instance - */ - Object.defineProperty(MembershipFeatureSpec.prototype, "featureSpec", { - get: $util.oneOfGetter($oneOfFields = ["configmanagement"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MembershipFeatureSpec instance using the specified properties. + * Creates a new ScopeFeatureSpec instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec + * @memberof google.cloud.gkehub.v1.ScopeFeatureSpec * @static - * @param {google.cloud.gkehub.v1.IMembershipFeatureSpec=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.MembershipFeatureSpec} MembershipFeatureSpec instance + * @param {google.cloud.gkehub.v1.IScopeFeatureSpec=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ScopeFeatureSpec} ScopeFeatureSpec instance */ - MembershipFeatureSpec.create = function create(properties) { - return new MembershipFeatureSpec(properties); + ScopeFeatureSpec.create = function create(properties) { + return new ScopeFeatureSpec(properties); }; /** - * Encodes the specified MembershipFeatureSpec message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipFeatureSpec.verify|verify} messages. + * Encodes the specified ScopeFeatureSpec message. Does not implicitly {@link google.cloud.gkehub.v1.ScopeFeatureSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec + * @memberof google.cloud.gkehub.v1.ScopeFeatureSpec * @static - * @param {google.cloud.gkehub.v1.IMembershipFeatureSpec} message MembershipFeatureSpec message or plain object to encode + * @param {google.cloud.gkehub.v1.IScopeFeatureSpec} message ScopeFeatureSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MembershipFeatureSpec.encode = function encode(message, writer) { + ScopeFeatureSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.configmanagement != null && Object.hasOwnProperty.call(message, "configmanagement")) - $root.google.cloud.gkehub.configmanagement.v1.MembershipSpec.encode(message.configmanagement, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); return writer; }; /** - * Encodes the specified MembershipFeatureSpec message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipFeatureSpec.verify|verify} messages. + * Encodes the specified ScopeFeatureSpec message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ScopeFeatureSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec + * @memberof google.cloud.gkehub.v1.ScopeFeatureSpec * @static - * @param {google.cloud.gkehub.v1.IMembershipFeatureSpec} message MembershipFeatureSpec message or plain object to encode + * @param {google.cloud.gkehub.v1.IScopeFeatureSpec} message ScopeFeatureSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MembershipFeatureSpec.encodeDelimited = function encodeDelimited(message, writer) { + ScopeFeatureSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MembershipFeatureSpec message from the specified reader or buffer. + * Decodes a ScopeFeatureSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec + * @memberof google.cloud.gkehub.v1.ScopeFeatureSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.MembershipFeatureSpec} MembershipFeatureSpec + * @returns {google.cloud.gkehub.v1.ScopeFeatureSpec} ScopeFeatureSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MembershipFeatureSpec.decode = function decode(reader, length, error) { + ScopeFeatureSpec.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.MembershipFeatureSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ScopeFeatureSpec(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 106: { - message.configmanagement = $root.google.cloud.gkehub.configmanagement.v1.MembershipSpec.decode(reader, reader.uint32()); - break; - } default: reader.skipType(tag & 7); break; @@ -39297,133 +39484,109 @@ }; /** - * Decodes a MembershipFeatureSpec message from the specified reader or buffer, length delimited. + * Decodes a ScopeFeatureSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec + * @memberof google.cloud.gkehub.v1.ScopeFeatureSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.MembershipFeatureSpec} MembershipFeatureSpec + * @returns {google.cloud.gkehub.v1.ScopeFeatureSpec} ScopeFeatureSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MembershipFeatureSpec.decodeDelimited = function decodeDelimited(reader) { + ScopeFeatureSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MembershipFeatureSpec message. + * Verifies a ScopeFeatureSpec message. * @function verify - * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec + * @memberof google.cloud.gkehub.v1.ScopeFeatureSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MembershipFeatureSpec.verify = function verify(message) { + ScopeFeatureSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.configmanagement != null && message.hasOwnProperty("configmanagement")) { - properties.featureSpec = 1; - { - var error = $root.google.cloud.gkehub.configmanagement.v1.MembershipSpec.verify(message.configmanagement); - if (error) - return "configmanagement." + error; - } - } return null; }; /** - * Creates a MembershipFeatureSpec message from a plain object. Also converts values to their respective internal types. + * Creates a ScopeFeatureSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec + * @memberof google.cloud.gkehub.v1.ScopeFeatureSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.MembershipFeatureSpec} MembershipFeatureSpec + * @returns {google.cloud.gkehub.v1.ScopeFeatureSpec} ScopeFeatureSpec */ - MembershipFeatureSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.MembershipFeatureSpec) + ScopeFeatureSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ScopeFeatureSpec) return object; - var message = new $root.google.cloud.gkehub.v1.MembershipFeatureSpec(); - if (object.configmanagement != null) { - if (typeof object.configmanagement !== "object") - throw TypeError(".google.cloud.gkehub.v1.MembershipFeatureSpec.configmanagement: object expected"); - message.configmanagement = $root.google.cloud.gkehub.configmanagement.v1.MembershipSpec.fromObject(object.configmanagement); - } - return message; + return new $root.google.cloud.gkehub.v1.ScopeFeatureSpec(); }; /** - * Creates a plain object from a MembershipFeatureSpec message. Also converts values to other types if specified. + * Creates a plain object from a ScopeFeatureSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec + * @memberof google.cloud.gkehub.v1.ScopeFeatureSpec * @static - * @param {google.cloud.gkehub.v1.MembershipFeatureSpec} message MembershipFeatureSpec + * @param {google.cloud.gkehub.v1.ScopeFeatureSpec} message ScopeFeatureSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MembershipFeatureSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.configmanagement != null && message.hasOwnProperty("configmanagement")) { - object.configmanagement = $root.google.cloud.gkehub.configmanagement.v1.MembershipSpec.toObject(message.configmanagement, options); - if (options.oneofs) - object.featureSpec = "configmanagement"; - } - return object; + ScopeFeatureSpec.toObject = function toObject() { + return {}; }; /** - * Converts this MembershipFeatureSpec to JSON. + * Converts this ScopeFeatureSpec to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec + * @memberof google.cloud.gkehub.v1.ScopeFeatureSpec * @instance * @returns {Object.} JSON object */ - MembershipFeatureSpec.prototype.toJSON = function toJSON() { + ScopeFeatureSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MembershipFeatureSpec + * Gets the default type url for ScopeFeatureSpec * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec + * @memberof google.cloud.gkehub.v1.ScopeFeatureSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MembershipFeatureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ScopeFeatureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.MembershipFeatureSpec"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.ScopeFeatureSpec"; }; - return MembershipFeatureSpec; + return ScopeFeatureSpec; })(); - v1.MembershipFeatureState = (function() { + v1.ScopeFeatureState = (function() { /** - * Properties of a MembershipFeatureState. + * Properties of a ScopeFeatureState. * @memberof google.cloud.gkehub.v1 - * @interface IMembershipFeatureState - * @property {google.cloud.gkehub.configmanagement.v1.IMembershipState|null} [configmanagement] MembershipFeatureState configmanagement - * @property {google.cloud.gkehub.v1.IFeatureState|null} [state] MembershipFeatureState state + * @interface IScopeFeatureState + * @property {google.cloud.gkehub.v1.IFeatureState|null} [state] ScopeFeatureState state */ /** - * Constructs a new MembershipFeatureState. + * Constructs a new ScopeFeatureState. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a MembershipFeatureState. - * @implements IMembershipFeatureState + * @classdesc Represents a ScopeFeatureState. + * @implements IScopeFeatureState * @constructor - * @param {google.cloud.gkehub.v1.IMembershipFeatureState=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IScopeFeatureState=} [properties] Properties to set */ - function MembershipFeatureState(properties) { + function ScopeFeatureState(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39431,103 +39594,75 @@ } /** - * MembershipFeatureState configmanagement. - * @member {google.cloud.gkehub.configmanagement.v1.IMembershipState|null|undefined} configmanagement - * @memberof google.cloud.gkehub.v1.MembershipFeatureState + * ScopeFeatureState state. + * @member {google.cloud.gkehub.v1.IFeatureState|null|undefined} state + * @memberof google.cloud.gkehub.v1.ScopeFeatureState * @instance */ - MembershipFeatureState.prototype.configmanagement = null; + ScopeFeatureState.prototype.state = null; /** - * MembershipFeatureState state. - * @member {google.cloud.gkehub.v1.IFeatureState|null|undefined} state - * @memberof google.cloud.gkehub.v1.MembershipFeatureState - * @instance + * Creates a new ScopeFeatureState instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ScopeFeatureState + * @static + * @param {google.cloud.gkehub.v1.IScopeFeatureState=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ScopeFeatureState} ScopeFeatureState instance */ - MembershipFeatureState.prototype.state = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MembershipFeatureState featureState. - * @member {"configmanagement"|undefined} featureState - * @memberof google.cloud.gkehub.v1.MembershipFeatureState - * @instance - */ - Object.defineProperty(MembershipFeatureState.prototype, "featureState", { - get: $util.oneOfGetter($oneOfFields = ["configmanagement"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MembershipFeatureState instance using the specified properties. - * @function create - * @memberof google.cloud.gkehub.v1.MembershipFeatureState - * @static - * @param {google.cloud.gkehub.v1.IMembershipFeatureState=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.MembershipFeatureState} MembershipFeatureState instance - */ - MembershipFeatureState.create = function create(properties) { - return new MembershipFeatureState(properties); - }; + ScopeFeatureState.create = function create(properties) { + return new ScopeFeatureState(properties); + }; /** - * Encodes the specified MembershipFeatureState message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipFeatureState.verify|verify} messages. + * Encodes the specified ScopeFeatureState message. Does not implicitly {@link google.cloud.gkehub.v1.ScopeFeatureState.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.MembershipFeatureState + * @memberof google.cloud.gkehub.v1.ScopeFeatureState * @static - * @param {google.cloud.gkehub.v1.IMembershipFeatureState} message MembershipFeatureState message or plain object to encode + * @param {google.cloud.gkehub.v1.IScopeFeatureState} message ScopeFeatureState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MembershipFeatureState.encode = function encode(message, writer) { + ScopeFeatureState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.state != null && Object.hasOwnProperty.call(message, "state")) $root.google.cloud.gkehub.v1.FeatureState.encode(message.state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.configmanagement != null && Object.hasOwnProperty.call(message, "configmanagement")) - $root.google.cloud.gkehub.configmanagement.v1.MembershipState.encode(message.configmanagement, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); return writer; }; /** - * Encodes the specified MembershipFeatureState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipFeatureState.verify|verify} messages. + * Encodes the specified ScopeFeatureState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ScopeFeatureState.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.MembershipFeatureState + * @memberof google.cloud.gkehub.v1.ScopeFeatureState * @static - * @param {google.cloud.gkehub.v1.IMembershipFeatureState} message MembershipFeatureState message or plain object to encode + * @param {google.cloud.gkehub.v1.IScopeFeatureState} message ScopeFeatureState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MembershipFeatureState.encodeDelimited = function encodeDelimited(message, writer) { + ScopeFeatureState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MembershipFeatureState message from the specified reader or buffer. + * Decodes a ScopeFeatureState message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.MembershipFeatureState + * @memberof google.cloud.gkehub.v1.ScopeFeatureState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.MembershipFeatureState} MembershipFeatureState + * @returns {google.cloud.gkehub.v1.ScopeFeatureState} ScopeFeatureState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MembershipFeatureState.decode = function decode(reader, length, error) { + ScopeFeatureState.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.MembershipFeatureState(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ScopeFeatureState(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 106: { - message.configmanagement = $root.google.cloud.gkehub.configmanagement.v1.MembershipState.decode(reader, reader.uint32()); - break; - } case 1: { message.state = $root.google.cloud.gkehub.v1.FeatureState.decode(reader, reader.uint32()); break; @@ -39541,41 +39676,32 @@ }; /** - * Decodes a MembershipFeatureState message from the specified reader or buffer, length delimited. + * Decodes a ScopeFeatureState message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.MembershipFeatureState + * @memberof google.cloud.gkehub.v1.ScopeFeatureState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.MembershipFeatureState} MembershipFeatureState + * @returns {google.cloud.gkehub.v1.ScopeFeatureState} ScopeFeatureState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MembershipFeatureState.decodeDelimited = function decodeDelimited(reader) { + ScopeFeatureState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MembershipFeatureState message. + * Verifies a ScopeFeatureState message. * @function verify - * @memberof google.cloud.gkehub.v1.MembershipFeatureState + * @memberof google.cloud.gkehub.v1.ScopeFeatureState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MembershipFeatureState.verify = function verify(message) { + ScopeFeatureState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.configmanagement != null && message.hasOwnProperty("configmanagement")) { - properties.featureState = 1; - { - var error = $root.google.cloud.gkehub.configmanagement.v1.MembershipState.verify(message.configmanagement); - if (error) - return "configmanagement." + error; - } - } if (message.state != null && message.hasOwnProperty("state")) { var error = $root.google.cloud.gkehub.v1.FeatureState.verify(message.state); if (error) @@ -39585,40 +39711,35 @@ }; /** - * Creates a MembershipFeatureState message from a plain object. Also converts values to their respective internal types. + * Creates a ScopeFeatureState message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.MembershipFeatureState + * @memberof google.cloud.gkehub.v1.ScopeFeatureState * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.MembershipFeatureState} MembershipFeatureState + * @returns {google.cloud.gkehub.v1.ScopeFeatureState} ScopeFeatureState */ - MembershipFeatureState.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.MembershipFeatureState) + ScopeFeatureState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ScopeFeatureState) return object; - var message = new $root.google.cloud.gkehub.v1.MembershipFeatureState(); - if (object.configmanagement != null) { - if (typeof object.configmanagement !== "object") - throw TypeError(".google.cloud.gkehub.v1.MembershipFeatureState.configmanagement: object expected"); - message.configmanagement = $root.google.cloud.gkehub.configmanagement.v1.MembershipState.fromObject(object.configmanagement); - } + var message = new $root.google.cloud.gkehub.v1.ScopeFeatureState(); if (object.state != null) { if (typeof object.state !== "object") - throw TypeError(".google.cloud.gkehub.v1.MembershipFeatureState.state: object expected"); + throw TypeError(".google.cloud.gkehub.v1.ScopeFeatureState.state: object expected"); message.state = $root.google.cloud.gkehub.v1.FeatureState.fromObject(object.state); } return message; }; /** - * Creates a plain object from a MembershipFeatureState message. Also converts values to other types if specified. + * Creates a plain object from a ScopeFeatureState message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.MembershipFeatureState + * @memberof google.cloud.gkehub.v1.ScopeFeatureState * @static - * @param {google.cloud.gkehub.v1.MembershipFeatureState} message MembershipFeatureState + * @param {google.cloud.gkehub.v1.ScopeFeatureState} message ScopeFeatureState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MembershipFeatureState.toObject = function toObject(message, options) { + ScopeFeatureState.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -39626,74 +39747,56 @@ object.state = null; if (message.state != null && message.hasOwnProperty("state")) object.state = $root.google.cloud.gkehub.v1.FeatureState.toObject(message.state, options); - if (message.configmanagement != null && message.hasOwnProperty("configmanagement")) { - object.configmanagement = $root.google.cloud.gkehub.configmanagement.v1.MembershipState.toObject(message.configmanagement, options); - if (options.oneofs) - object.featureState = "configmanagement"; - } return object; }; /** - * Converts this MembershipFeatureState to JSON. + * Converts this ScopeFeatureState to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.MembershipFeatureState + * @memberof google.cloud.gkehub.v1.ScopeFeatureState * @instance * @returns {Object.} JSON object */ - MembershipFeatureState.prototype.toJSON = function toJSON() { + ScopeFeatureState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MembershipFeatureState + * Gets the default type url for ScopeFeatureState * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.MembershipFeatureState + * @memberof google.cloud.gkehub.v1.ScopeFeatureState * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MembershipFeatureState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ScopeFeatureState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.MembershipFeatureState"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.ScopeFeatureState"; }; - return MembershipFeatureState; + return ScopeFeatureState; })(); - v1.Membership = (function() { + v1.MembershipFeatureSpec = (function() { /** - * Properties of a Membership. + * Properties of a MembershipFeatureSpec. * @memberof google.cloud.gkehub.v1 - * @interface IMembership - * @property {google.cloud.gkehub.v1.IMembershipEndpoint|null} [endpoint] Membership endpoint - * @property {string|null} [name] Membership name - * @property {Object.|null} [labels] Membership labels - * @property {string|null} [description] Membership description - * @property {google.cloud.gkehub.v1.IMembershipState|null} [state] Membership state - * @property {google.protobuf.ITimestamp|null} [createTime] Membership createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Membership updateTime - * @property {google.protobuf.ITimestamp|null} [deleteTime] Membership deleteTime - * @property {string|null} [externalId] Membership externalId - * @property {google.protobuf.ITimestamp|null} [lastConnectionTime] Membership lastConnectionTime - * @property {string|null} [uniqueId] Membership uniqueId - * @property {google.cloud.gkehub.v1.IAuthority|null} [authority] Membership authority - * @property {google.cloud.gkehub.v1.IMonitoringConfig|null} [monitoringConfig] Membership monitoringConfig + * @interface IMembershipFeatureSpec + * @property {google.cloud.gkehub.configmanagement.v1.IMembershipSpec|null} [configmanagement] MembershipFeatureSpec configmanagement */ /** - * Constructs a new Membership. + * Constructs a new MembershipFeatureSpec. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a Membership. - * @implements IMembership + * @classdesc Represents a MembershipFeatureSpec. + * @implements IMembershipFeatureSpec * @constructor - * @param {google.cloud.gkehub.v1.IMembership=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IMembershipFeatureSpec=} [properties] Properties to set */ - function Membership(properties) { - this.labels = {}; + function MembershipFeatureSpec(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -39701,279 +39804,91 @@ } /** - * Membership endpoint. - * @member {google.cloud.gkehub.v1.IMembershipEndpoint|null|undefined} endpoint - * @memberof google.cloud.gkehub.v1.Membership - * @instance - */ - Membership.prototype.endpoint = null; - - /** - * Membership name. - * @member {string} name - * @memberof google.cloud.gkehub.v1.Membership - * @instance - */ - Membership.prototype.name = ""; - - /** - * Membership labels. - * @member {Object.} labels - * @memberof google.cloud.gkehub.v1.Membership - * @instance - */ - Membership.prototype.labels = $util.emptyObject; - - /** - * Membership description. - * @member {string} description - * @memberof google.cloud.gkehub.v1.Membership - * @instance - */ - Membership.prototype.description = ""; - - /** - * Membership state. - * @member {google.cloud.gkehub.v1.IMembershipState|null|undefined} state - * @memberof google.cloud.gkehub.v1.Membership - * @instance - */ - Membership.prototype.state = null; - - /** - * Membership createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.gkehub.v1.Membership - * @instance - */ - Membership.prototype.createTime = null; - - /** - * Membership updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.gkehub.v1.Membership - * @instance - */ - Membership.prototype.updateTime = null; - - /** - * Membership deleteTime. - * @member {google.protobuf.ITimestamp|null|undefined} deleteTime - * @memberof google.cloud.gkehub.v1.Membership - * @instance - */ - Membership.prototype.deleteTime = null; - - /** - * Membership externalId. - * @member {string} externalId - * @memberof google.cloud.gkehub.v1.Membership - * @instance - */ - Membership.prototype.externalId = ""; - - /** - * Membership lastConnectionTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastConnectionTime - * @memberof google.cloud.gkehub.v1.Membership - * @instance - */ - Membership.prototype.lastConnectionTime = null; - - /** - * Membership uniqueId. - * @member {string} uniqueId - * @memberof google.cloud.gkehub.v1.Membership - * @instance - */ - Membership.prototype.uniqueId = ""; - - /** - * Membership authority. - * @member {google.cloud.gkehub.v1.IAuthority|null|undefined} authority - * @memberof google.cloud.gkehub.v1.Membership - * @instance - */ - Membership.prototype.authority = null; - - /** - * Membership monitoringConfig. - * @member {google.cloud.gkehub.v1.IMonitoringConfig|null|undefined} monitoringConfig - * @memberof google.cloud.gkehub.v1.Membership + * MembershipFeatureSpec configmanagement. + * @member {google.cloud.gkehub.configmanagement.v1.IMembershipSpec|null|undefined} configmanagement + * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec * @instance */ - Membership.prototype.monitoringConfig = null; + MembershipFeatureSpec.prototype.configmanagement = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * Membership type. - * @member {"endpoint"|undefined} type - * @memberof google.cloud.gkehub.v1.Membership + * MembershipFeatureSpec featureSpec. + * @member {"configmanagement"|undefined} featureSpec + * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec * @instance */ - Object.defineProperty(Membership.prototype, "type", { - get: $util.oneOfGetter($oneOfFields = ["endpoint"]), + Object.defineProperty(MembershipFeatureSpec.prototype, "featureSpec", { + get: $util.oneOfGetter($oneOfFields = ["configmanagement"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new Membership instance using the specified properties. + * Creates a new MembershipFeatureSpec instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.Membership + * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec * @static - * @param {google.cloud.gkehub.v1.IMembership=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.Membership} Membership instance + * @param {google.cloud.gkehub.v1.IMembershipFeatureSpec=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.MembershipFeatureSpec} MembershipFeatureSpec instance */ - Membership.create = function create(properties) { - return new Membership(properties); + MembershipFeatureSpec.create = function create(properties) { + return new MembershipFeatureSpec(properties); }; /** - * Encodes the specified Membership message. Does not implicitly {@link google.cloud.gkehub.v1.Membership.verify|verify} messages. + * Encodes the specified MembershipFeatureSpec message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipFeatureSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.Membership + * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec * @static - * @param {google.cloud.gkehub.v1.IMembership} message Membership message or plain object to encode + * @param {google.cloud.gkehub.v1.IMembershipFeatureSpec} message MembershipFeatureSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Membership.encode = function encode(message, writer) { + MembershipFeatureSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) - $root.google.cloud.gkehub.v1.MembershipEndpoint.encode(message.endpoint, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - $root.google.cloud.gkehub.v1.MembershipState.encode(message.state, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) - $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.externalId != null && Object.hasOwnProperty.call(message, "externalId")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.externalId); - if (message.lastConnectionTime != null && Object.hasOwnProperty.call(message, "lastConnectionTime")) - $root.google.protobuf.Timestamp.encode(message.lastConnectionTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.uniqueId != null && Object.hasOwnProperty.call(message, "uniqueId")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.uniqueId); - if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) - $root.google.cloud.gkehub.v1.Authority.encode(message.authority, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.monitoringConfig != null && Object.hasOwnProperty.call(message, "monitoringConfig")) - $root.google.cloud.gkehub.v1.MonitoringConfig.encode(message.monitoringConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.configmanagement != null && Object.hasOwnProperty.call(message, "configmanagement")) + $root.google.cloud.gkehub.configmanagement.v1.MembershipSpec.encode(message.configmanagement, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); return writer; }; /** - * Encodes the specified Membership message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Membership.verify|verify} messages. + * Encodes the specified MembershipFeatureSpec message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipFeatureSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.Membership + * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec * @static - * @param {google.cloud.gkehub.v1.IMembership} message Membership message or plain object to encode + * @param {google.cloud.gkehub.v1.IMembershipFeatureSpec} message MembershipFeatureSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Membership.encodeDelimited = function encodeDelimited(message, writer) { + MembershipFeatureSpec.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Membership message from the specified reader or buffer. + * Decodes a MembershipFeatureSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.Membership + * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.Membership} Membership + * @returns {google.cloud.gkehub.v1.MembershipFeatureSpec} MembershipFeatureSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Membership.decode = function decode(reader, length, error) { + MembershipFeatureSpec.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.Membership(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.MembershipFeatureSpec(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 4: { - message.endpoint = $root.google.cloud.gkehub.v1.MembershipEndpoint.decode(reader, reader.uint32()); - break; - } - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - case 3: { - message.description = reader.string(); - break; - } - case 5: { - message.state = $root.google.cloud.gkehub.v1.MembershipState.decode(reader, reader.uint32()); - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.externalId = reader.string(); - break; - } - case 10: { - message.lastConnectionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.uniqueId = reader.string(); - break; - } - case 12: { - message.authority = $root.google.cloud.gkehub.v1.Authority.decode(reader, reader.uint32()); - break; - } - case 14: { - message.monitoringConfig = $root.google.cloud.gkehub.v1.MonitoringConfig.decode(reader, reader.uint32()); + case 106: { + message.configmanagement = $root.google.cloud.gkehub.configmanagement.v1.MembershipSpec.decode(reader, reader.uint32()); break; } default: @@ -39985,283 +39900,133 @@ }; /** - * Decodes a Membership message from the specified reader or buffer, length delimited. + * Decodes a MembershipFeatureSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.Membership + * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.Membership} Membership + * @returns {google.cloud.gkehub.v1.MembershipFeatureSpec} MembershipFeatureSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Membership.decodeDelimited = function decodeDelimited(reader) { + MembershipFeatureSpec.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Membership message. + * Verifies a MembershipFeatureSpec message. * @function verify - * @memberof google.cloud.gkehub.v1.Membership + * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Membership.verify = function verify(message) { + MembershipFeatureSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.endpoint != null && message.hasOwnProperty("endpoint")) { - properties.type = 1; + if (message.configmanagement != null && message.hasOwnProperty("configmanagement")) { + properties.featureSpec = 1; { - var error = $root.google.cloud.gkehub.v1.MembershipEndpoint.verify(message.endpoint); + var error = $root.google.cloud.gkehub.configmanagement.v1.MembershipSpec.verify(message.configmanagement); if (error) - return "endpoint." + error; + return "configmanagement." + error; } } - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.state != null && message.hasOwnProperty("state")) { - var error = $root.google.cloud.gkehub.v1.MembershipState.verify(message.state); - if (error) - return "state." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); - if (error) - return "deleteTime." + error; - } - if (message.externalId != null && message.hasOwnProperty("externalId")) - if (!$util.isString(message.externalId)) - return "externalId: string expected"; - if (message.lastConnectionTime != null && message.hasOwnProperty("lastConnectionTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastConnectionTime); - if (error) - return "lastConnectionTime." + error; - } - if (message.uniqueId != null && message.hasOwnProperty("uniqueId")) - if (!$util.isString(message.uniqueId)) - return "uniqueId: string expected"; - if (message.authority != null && message.hasOwnProperty("authority")) { - var error = $root.google.cloud.gkehub.v1.Authority.verify(message.authority); - if (error) - return "authority." + error; - } - if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) { - var error = $root.google.cloud.gkehub.v1.MonitoringConfig.verify(message.monitoringConfig); - if (error) - return "monitoringConfig." + error; - } return null; }; /** - * Creates a Membership message from a plain object. Also converts values to their respective internal types. + * Creates a MembershipFeatureSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.Membership + * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.Membership} Membership + * @returns {google.cloud.gkehub.v1.MembershipFeatureSpec} MembershipFeatureSpec */ - Membership.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.Membership) + MembershipFeatureSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.MembershipFeatureSpec) return object; - var message = new $root.google.cloud.gkehub.v1.Membership(); - if (object.endpoint != null) { - if (typeof object.endpoint !== "object") - throw TypeError(".google.cloud.gkehub.v1.Membership.endpoint: object expected"); - message.endpoint = $root.google.cloud.gkehub.v1.MembershipEndpoint.fromObject(object.endpoint); - } - if (object.name != null) - message.name = String(object.name); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.gkehub.v1.Membership.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - if (object.description != null) - message.description = String(object.description); - if (object.state != null) { - if (typeof object.state !== "object") - throw TypeError(".google.cloud.gkehub.v1.Membership.state: object expected"); - message.state = $root.google.cloud.gkehub.v1.MembershipState.fromObject(object.state); + var message = new $root.google.cloud.gkehub.v1.MembershipFeatureSpec(); + if (object.configmanagement != null) { + if (typeof object.configmanagement !== "object") + throw TypeError(".google.cloud.gkehub.v1.MembershipFeatureSpec.configmanagement: object expected"); + message.configmanagement = $root.google.cloud.gkehub.configmanagement.v1.MembershipSpec.fromObject(object.configmanagement); } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.gkehub.v1.Membership.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + return message; + }; + + /** + * Creates a plain object from a MembershipFeatureSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec + * @static + * @param {google.cloud.gkehub.v1.MembershipFeatureSpec} message MembershipFeatureSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MembershipFeatureSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.configmanagement != null && message.hasOwnProperty("configmanagement")) { + object.configmanagement = $root.google.cloud.gkehub.configmanagement.v1.MembershipSpec.toObject(message.configmanagement, options); + if (options.oneofs) + object.featureSpec = "configmanagement"; } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.gkehub.v1.Membership.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.deleteTime != null) { - if (typeof object.deleteTime !== "object") - throw TypeError(".google.cloud.gkehub.v1.Membership.deleteTime: object expected"); - message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); - } - if (object.externalId != null) - message.externalId = String(object.externalId); - if (object.lastConnectionTime != null) { - if (typeof object.lastConnectionTime !== "object") - throw TypeError(".google.cloud.gkehub.v1.Membership.lastConnectionTime: object expected"); - message.lastConnectionTime = $root.google.protobuf.Timestamp.fromObject(object.lastConnectionTime); - } - if (object.uniqueId != null) - message.uniqueId = String(object.uniqueId); - if (object.authority != null) { - if (typeof object.authority !== "object") - throw TypeError(".google.cloud.gkehub.v1.Membership.authority: object expected"); - message.authority = $root.google.cloud.gkehub.v1.Authority.fromObject(object.authority); - } - if (object.monitoringConfig != null) { - if (typeof object.monitoringConfig !== "object") - throw TypeError(".google.cloud.gkehub.v1.Membership.monitoringConfig: object expected"); - message.monitoringConfig = $root.google.cloud.gkehub.v1.MonitoringConfig.fromObject(object.monitoringConfig); - } - return message; - }; - - /** - * Creates a plain object from a Membership message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.gkehub.v1.Membership - * @static - * @param {google.cloud.gkehub.v1.Membership} message Membership - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Membership.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.description = ""; - object.state = null; - object.createTime = null; - object.updateTime = null; - object.deleteTime = null; - object.externalId = ""; - object.lastConnectionTime = null; - object.uniqueId = ""; - object.authority = null; - object.monitoringConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.endpoint != null && message.hasOwnProperty("endpoint")) { - object.endpoint = $root.google.cloud.gkehub.v1.MembershipEndpoint.toObject(message.endpoint, options); - if (options.oneofs) - object.type = "endpoint"; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = $root.google.cloud.gkehub.v1.MembershipState.toObject(message.state, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) - object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); - if (message.externalId != null && message.hasOwnProperty("externalId")) - object.externalId = message.externalId; - if (message.lastConnectionTime != null && message.hasOwnProperty("lastConnectionTime")) - object.lastConnectionTime = $root.google.protobuf.Timestamp.toObject(message.lastConnectionTime, options); - if (message.uniqueId != null && message.hasOwnProperty("uniqueId")) - object.uniqueId = message.uniqueId; - if (message.authority != null && message.hasOwnProperty("authority")) - object.authority = $root.google.cloud.gkehub.v1.Authority.toObject(message.authority, options); - if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) - object.monitoringConfig = $root.google.cloud.gkehub.v1.MonitoringConfig.toObject(message.monitoringConfig, options); return object; }; /** - * Converts this Membership to JSON. + * Converts this MembershipFeatureSpec to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.Membership + * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec * @instance * @returns {Object.} JSON object */ - Membership.prototype.toJSON = function toJSON() { + MembershipFeatureSpec.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Membership + * Gets the default type url for MembershipFeatureSpec * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.Membership + * @memberof google.cloud.gkehub.v1.MembershipFeatureSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Membership.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MembershipFeatureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.Membership"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.MembershipFeatureSpec"; }; - return Membership; + return MembershipFeatureSpec; })(); - v1.MembershipEndpoint = (function() { + v1.MembershipFeatureState = (function() { /** - * Properties of a MembershipEndpoint. + * Properties of a MembershipFeatureState. * @memberof google.cloud.gkehub.v1 - * @interface IMembershipEndpoint - * @property {google.cloud.gkehub.v1.IGkeCluster|null} [gkeCluster] MembershipEndpoint gkeCluster - * @property {google.cloud.gkehub.v1.IKubernetesMetadata|null} [kubernetesMetadata] MembershipEndpoint kubernetesMetadata - * @property {google.cloud.gkehub.v1.IKubernetesResource|null} [kubernetesResource] MembershipEndpoint kubernetesResource - * @property {boolean|null} [googleManaged] MembershipEndpoint googleManaged + * @interface IMembershipFeatureState + * @property {google.cloud.gkehub.configmanagement.v1.IMembershipState|null} [configmanagement] MembershipFeatureState configmanagement + * @property {google.cloud.gkehub.v1.IFeatureState|null} [state] MembershipFeatureState state */ /** - * Constructs a new MembershipEndpoint. + * Constructs a new MembershipFeatureState. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a MembershipEndpoint. - * @implements IMembershipEndpoint + * @classdesc Represents a MembershipFeatureState. + * @implements IMembershipFeatureState * @constructor - * @param {google.cloud.gkehub.v1.IMembershipEndpoint=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IMembershipFeatureState=} [properties] Properties to set */ - function MembershipEndpoint(properties) { + function MembershipFeatureState(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40269,119 +40034,105 @@ } /** - * MembershipEndpoint gkeCluster. - * @member {google.cloud.gkehub.v1.IGkeCluster|null|undefined} gkeCluster - * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * MembershipFeatureState configmanagement. + * @member {google.cloud.gkehub.configmanagement.v1.IMembershipState|null|undefined} configmanagement + * @memberof google.cloud.gkehub.v1.MembershipFeatureState * @instance */ - MembershipEndpoint.prototype.gkeCluster = null; + MembershipFeatureState.prototype.configmanagement = null; /** - * MembershipEndpoint kubernetesMetadata. - * @member {google.cloud.gkehub.v1.IKubernetesMetadata|null|undefined} kubernetesMetadata - * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * MembershipFeatureState state. + * @member {google.cloud.gkehub.v1.IFeatureState|null|undefined} state + * @memberof google.cloud.gkehub.v1.MembershipFeatureState * @instance */ - MembershipEndpoint.prototype.kubernetesMetadata = null; + MembershipFeatureState.prototype.state = null; - /** - * MembershipEndpoint kubernetesResource. - * @member {google.cloud.gkehub.v1.IKubernetesResource|null|undefined} kubernetesResource - * @memberof google.cloud.gkehub.v1.MembershipEndpoint - * @instance - */ - MembershipEndpoint.prototype.kubernetesResource = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * MembershipEndpoint googleManaged. - * @member {boolean} googleManaged - * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * MembershipFeatureState featureState. + * @member {"configmanagement"|undefined} featureState + * @memberof google.cloud.gkehub.v1.MembershipFeatureState * @instance */ - MembershipEndpoint.prototype.googleManaged = false; + Object.defineProperty(MembershipFeatureState.prototype, "featureState", { + get: $util.oneOfGetter($oneOfFields = ["configmanagement"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new MembershipEndpoint instance using the specified properties. + * Creates a new MembershipFeatureState instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * @memberof google.cloud.gkehub.v1.MembershipFeatureState * @static - * @param {google.cloud.gkehub.v1.IMembershipEndpoint=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.MembershipEndpoint} MembershipEndpoint instance + * @param {google.cloud.gkehub.v1.IMembershipFeatureState=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.MembershipFeatureState} MembershipFeatureState instance */ - MembershipEndpoint.create = function create(properties) { - return new MembershipEndpoint(properties); + MembershipFeatureState.create = function create(properties) { + return new MembershipFeatureState(properties); }; /** - * Encodes the specified MembershipEndpoint message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipEndpoint.verify|verify} messages. + * Encodes the specified MembershipFeatureState message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipFeatureState.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * @memberof google.cloud.gkehub.v1.MembershipFeatureState * @static - * @param {google.cloud.gkehub.v1.IMembershipEndpoint} message MembershipEndpoint message or plain object to encode + * @param {google.cloud.gkehub.v1.IMembershipFeatureState} message MembershipFeatureState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MembershipEndpoint.encode = function encode(message, writer) { + MembershipFeatureState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.gkeCluster != null && Object.hasOwnProperty.call(message, "gkeCluster")) - $root.google.cloud.gkehub.v1.GkeCluster.encode(message.gkeCluster, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.kubernetesMetadata != null && Object.hasOwnProperty.call(message, "kubernetesMetadata")) - $root.google.cloud.gkehub.v1.KubernetesMetadata.encode(message.kubernetesMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.kubernetesResource != null && Object.hasOwnProperty.call(message, "kubernetesResource")) - $root.google.cloud.gkehub.v1.KubernetesResource.encode(message.kubernetesResource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.googleManaged != null && Object.hasOwnProperty.call(message, "googleManaged")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.googleManaged); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + $root.google.cloud.gkehub.v1.FeatureState.encode(message.state, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.configmanagement != null && Object.hasOwnProperty.call(message, "configmanagement")) + $root.google.cloud.gkehub.configmanagement.v1.MembershipState.encode(message.configmanagement, writer.uint32(/* id 106, wireType 2 =*/850).fork()).ldelim(); return writer; }; /** - * Encodes the specified MembershipEndpoint message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipEndpoint.verify|verify} messages. + * Encodes the specified MembershipFeatureState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipFeatureState.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * @memberof google.cloud.gkehub.v1.MembershipFeatureState * @static - * @param {google.cloud.gkehub.v1.IMembershipEndpoint} message MembershipEndpoint message or plain object to encode + * @param {google.cloud.gkehub.v1.IMembershipFeatureState} message MembershipFeatureState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MembershipEndpoint.encodeDelimited = function encodeDelimited(message, writer) { + MembershipFeatureState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MembershipEndpoint message from the specified reader or buffer. + * Decodes a MembershipFeatureState message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * @memberof google.cloud.gkehub.v1.MembershipFeatureState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.MembershipEndpoint} MembershipEndpoint + * @returns {google.cloud.gkehub.v1.MembershipFeatureState} MembershipFeatureState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MembershipEndpoint.decode = function decode(reader, length, error) { + MembershipFeatureState.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.MembershipEndpoint(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.MembershipFeatureState(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.gkeCluster = $root.google.cloud.gkehub.v1.GkeCluster.decode(reader, reader.uint32()); - break; - } - case 2: { - message.kubernetesMetadata = $root.google.cloud.gkehub.v1.KubernetesMetadata.decode(reader, reader.uint32()); - break; - } - case 3: { - message.kubernetesResource = $root.google.cloud.gkehub.v1.KubernetesResource.decode(reader, reader.uint32()); + case 106: { + message.configmanagement = $root.google.cloud.gkehub.configmanagement.v1.MembershipState.decode(reader, reader.uint32()); break; } - case 8: { - message.googleManaged = reader.bool(); + case 1: { + message.state = $root.google.cloud.gkehub.v1.FeatureState.decode(reader, reader.uint32()); break; } default: @@ -40393,167 +40144,155 @@ }; /** - * Decodes a MembershipEndpoint message from the specified reader or buffer, length delimited. + * Decodes a MembershipFeatureState message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * @memberof google.cloud.gkehub.v1.MembershipFeatureState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.MembershipEndpoint} MembershipEndpoint + * @returns {google.cloud.gkehub.v1.MembershipFeatureState} MembershipFeatureState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MembershipEndpoint.decodeDelimited = function decodeDelimited(reader) { + MembershipFeatureState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MembershipEndpoint message. + * Verifies a MembershipFeatureState message. * @function verify - * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * @memberof google.cloud.gkehub.v1.MembershipFeatureState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MembershipEndpoint.verify = function verify(message) { + MembershipFeatureState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) { - var error = $root.google.cloud.gkehub.v1.GkeCluster.verify(message.gkeCluster); - if (error) - return "gkeCluster." + error; - } - if (message.kubernetesMetadata != null && message.hasOwnProperty("kubernetesMetadata")) { - var error = $root.google.cloud.gkehub.v1.KubernetesMetadata.verify(message.kubernetesMetadata); - if (error) - return "kubernetesMetadata." + error; - } - if (message.kubernetesResource != null && message.hasOwnProperty("kubernetesResource")) { - var error = $root.google.cloud.gkehub.v1.KubernetesResource.verify(message.kubernetesResource); + var properties = {}; + if (message.configmanagement != null && message.hasOwnProperty("configmanagement")) { + properties.featureState = 1; + { + var error = $root.google.cloud.gkehub.configmanagement.v1.MembershipState.verify(message.configmanagement); + if (error) + return "configmanagement." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) { + var error = $root.google.cloud.gkehub.v1.FeatureState.verify(message.state); if (error) - return "kubernetesResource." + error; + return "state." + error; } - if (message.googleManaged != null && message.hasOwnProperty("googleManaged")) - if (typeof message.googleManaged !== "boolean") - return "googleManaged: boolean expected"; return null; }; /** - * Creates a MembershipEndpoint message from a plain object. Also converts values to their respective internal types. + * Creates a MembershipFeatureState message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * @memberof google.cloud.gkehub.v1.MembershipFeatureState * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.MembershipEndpoint} MembershipEndpoint + * @returns {google.cloud.gkehub.v1.MembershipFeatureState} MembershipFeatureState */ - MembershipEndpoint.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.MembershipEndpoint) + MembershipFeatureState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.MembershipFeatureState) return object; - var message = new $root.google.cloud.gkehub.v1.MembershipEndpoint(); - if (object.gkeCluster != null) { - if (typeof object.gkeCluster !== "object") - throw TypeError(".google.cloud.gkehub.v1.MembershipEndpoint.gkeCluster: object expected"); - message.gkeCluster = $root.google.cloud.gkehub.v1.GkeCluster.fromObject(object.gkeCluster); - } - if (object.kubernetesMetadata != null) { - if (typeof object.kubernetesMetadata !== "object") - throw TypeError(".google.cloud.gkehub.v1.MembershipEndpoint.kubernetesMetadata: object expected"); - message.kubernetesMetadata = $root.google.cloud.gkehub.v1.KubernetesMetadata.fromObject(object.kubernetesMetadata); + var message = new $root.google.cloud.gkehub.v1.MembershipFeatureState(); + if (object.configmanagement != null) { + if (typeof object.configmanagement !== "object") + throw TypeError(".google.cloud.gkehub.v1.MembershipFeatureState.configmanagement: object expected"); + message.configmanagement = $root.google.cloud.gkehub.configmanagement.v1.MembershipState.fromObject(object.configmanagement); } - if (object.kubernetesResource != null) { - if (typeof object.kubernetesResource !== "object") - throw TypeError(".google.cloud.gkehub.v1.MembershipEndpoint.kubernetesResource: object expected"); - message.kubernetesResource = $root.google.cloud.gkehub.v1.KubernetesResource.fromObject(object.kubernetesResource); + if (object.state != null) { + if (typeof object.state !== "object") + throw TypeError(".google.cloud.gkehub.v1.MembershipFeatureState.state: object expected"); + message.state = $root.google.cloud.gkehub.v1.FeatureState.fromObject(object.state); } - if (object.googleManaged != null) - message.googleManaged = Boolean(object.googleManaged); return message; }; /** - * Creates a plain object from a MembershipEndpoint message. Also converts values to other types if specified. + * Creates a plain object from a MembershipFeatureState message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * @memberof google.cloud.gkehub.v1.MembershipFeatureState * @static - * @param {google.cloud.gkehub.v1.MembershipEndpoint} message MembershipEndpoint + * @param {google.cloud.gkehub.v1.MembershipFeatureState} message MembershipFeatureState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MembershipEndpoint.toObject = function toObject(message, options) { + MembershipFeatureState.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.gkeCluster = null; - object.kubernetesMetadata = null; - object.kubernetesResource = null; - object.googleManaged = false; + if (options.defaults) + object.state = null; + if (message.state != null && message.hasOwnProperty("state")) + object.state = $root.google.cloud.gkehub.v1.FeatureState.toObject(message.state, options); + if (message.configmanagement != null && message.hasOwnProperty("configmanagement")) { + object.configmanagement = $root.google.cloud.gkehub.configmanagement.v1.MembershipState.toObject(message.configmanagement, options); + if (options.oneofs) + object.featureState = "configmanagement"; } - if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) - object.gkeCluster = $root.google.cloud.gkehub.v1.GkeCluster.toObject(message.gkeCluster, options); - if (message.kubernetesMetadata != null && message.hasOwnProperty("kubernetesMetadata")) - object.kubernetesMetadata = $root.google.cloud.gkehub.v1.KubernetesMetadata.toObject(message.kubernetesMetadata, options); - if (message.kubernetesResource != null && message.hasOwnProperty("kubernetesResource")) - object.kubernetesResource = $root.google.cloud.gkehub.v1.KubernetesResource.toObject(message.kubernetesResource, options); - if (message.googleManaged != null && message.hasOwnProperty("googleManaged")) - object.googleManaged = message.googleManaged; return object; }; /** - * Converts this MembershipEndpoint to JSON. + * Converts this MembershipFeatureState to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * @memberof google.cloud.gkehub.v1.MembershipFeatureState * @instance * @returns {Object.} JSON object */ - MembershipEndpoint.prototype.toJSON = function toJSON() { + MembershipFeatureState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MembershipEndpoint + * Gets the default type url for MembershipFeatureState * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * @memberof google.cloud.gkehub.v1.MembershipFeatureState * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MembershipEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MembershipFeatureState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.MembershipEndpoint"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.MembershipFeatureState"; }; - return MembershipEndpoint; + return MembershipFeatureState; })(); - v1.KubernetesResource = (function() { + v1.Fleet = (function() { /** - * Properties of a KubernetesResource. + * Properties of a Fleet. * @memberof google.cloud.gkehub.v1 - * @interface IKubernetesResource - * @property {string|null} [membershipCrManifest] KubernetesResource membershipCrManifest - * @property {Array.|null} [membershipResources] KubernetesResource membershipResources - * @property {Array.|null} [connectResources] KubernetesResource connectResources - * @property {google.cloud.gkehub.v1.IResourceOptions|null} [resourceOptions] KubernetesResource resourceOptions + * @interface IFleet + * @property {string|null} [name] Fleet name + * @property {string|null} [displayName] Fleet displayName + * @property {google.protobuf.ITimestamp|null} [createTime] Fleet createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Fleet updateTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] Fleet deleteTime + * @property {string|null} [uid] Fleet uid + * @property {google.cloud.gkehub.v1.IFleetLifecycleState|null} [state] Fleet state + * @property {google.cloud.gkehub.v1.IDefaultClusterConfig|null} [defaultClusterConfig] Fleet defaultClusterConfig + * @property {Object.|null} [labels] Fleet labels */ /** - * Constructs a new KubernetesResource. + * Constructs a new Fleet. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a KubernetesResource. - * @implements IKubernetesResource + * @classdesc Represents a Fleet. + * @implements IFleet * @constructor - * @param {google.cloud.gkehub.v1.IKubernetesResource=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IFleet=} [properties] Properties to set */ - function KubernetesResource(properties) { - this.membershipResources = []; - this.connectResources = []; + function Fleet(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40561,125 +40300,209 @@ } /** - * KubernetesResource membershipCrManifest. - * @member {string} membershipCrManifest - * @memberof google.cloud.gkehub.v1.KubernetesResource + * Fleet name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.Fleet * @instance */ - KubernetesResource.prototype.membershipCrManifest = ""; + Fleet.prototype.name = ""; /** - * KubernetesResource membershipResources. - * @member {Array.} membershipResources - * @memberof google.cloud.gkehub.v1.KubernetesResource + * Fleet displayName. + * @member {string} displayName + * @memberof google.cloud.gkehub.v1.Fleet * @instance */ - KubernetesResource.prototype.membershipResources = $util.emptyArray; + Fleet.prototype.displayName = ""; /** - * KubernetesResource connectResources. - * @member {Array.} connectResources - * @memberof google.cloud.gkehub.v1.KubernetesResource + * Fleet createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.gkehub.v1.Fleet * @instance */ - KubernetesResource.prototype.connectResources = $util.emptyArray; + Fleet.prototype.createTime = null; /** - * KubernetesResource resourceOptions. - * @member {google.cloud.gkehub.v1.IResourceOptions|null|undefined} resourceOptions - * @memberof google.cloud.gkehub.v1.KubernetesResource + * Fleet updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.gkehub.v1.Fleet * @instance */ - KubernetesResource.prototype.resourceOptions = null; + Fleet.prototype.updateTime = null; /** - * Creates a new KubernetesResource instance using the specified properties. + * Fleet deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.cloud.gkehub.v1.Fleet + * @instance + */ + Fleet.prototype.deleteTime = null; + + /** + * Fleet uid. + * @member {string} uid + * @memberof google.cloud.gkehub.v1.Fleet + * @instance + */ + Fleet.prototype.uid = ""; + + /** + * Fleet state. + * @member {google.cloud.gkehub.v1.IFleetLifecycleState|null|undefined} state + * @memberof google.cloud.gkehub.v1.Fleet + * @instance + */ + Fleet.prototype.state = null; + + /** + * Fleet defaultClusterConfig. + * @member {google.cloud.gkehub.v1.IDefaultClusterConfig|null|undefined} defaultClusterConfig + * @memberof google.cloud.gkehub.v1.Fleet + * @instance + */ + Fleet.prototype.defaultClusterConfig = null; + + /** + * Fleet labels. + * @member {Object.} labels + * @memberof google.cloud.gkehub.v1.Fleet + * @instance + */ + Fleet.prototype.labels = $util.emptyObject; + + /** + * Creates a new Fleet instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.KubernetesResource + * @memberof google.cloud.gkehub.v1.Fleet * @static - * @param {google.cloud.gkehub.v1.IKubernetesResource=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.KubernetesResource} KubernetesResource instance + * @param {google.cloud.gkehub.v1.IFleet=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.Fleet} Fleet instance */ - KubernetesResource.create = function create(properties) { - return new KubernetesResource(properties); + Fleet.create = function create(properties) { + return new Fleet(properties); }; /** - * Encodes the specified KubernetesResource message. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesResource.verify|verify} messages. + * Encodes the specified Fleet message. Does not implicitly {@link google.cloud.gkehub.v1.Fleet.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.KubernetesResource + * @memberof google.cloud.gkehub.v1.Fleet * @static - * @param {google.cloud.gkehub.v1.IKubernetesResource} message KubernetesResource message or plain object to encode + * @param {google.cloud.gkehub.v1.IFleet} message Fleet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KubernetesResource.encode = function encode(message, writer) { + Fleet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.membershipCrManifest != null && Object.hasOwnProperty.call(message, "membershipCrManifest")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.membershipCrManifest); - if (message.membershipResources != null && message.membershipResources.length) - for (var i = 0; i < message.membershipResources.length; ++i) - $root.google.cloud.gkehub.v1.ResourceManifest.encode(message.membershipResources[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.connectResources != null && message.connectResources.length) - for (var i = 0; i < message.connectResources.length; ++i) - $root.google.cloud.gkehub.v1.ResourceManifest.encode(message.connectResources[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.resourceOptions != null && Object.hasOwnProperty.call(message, "resourceOptions")) - $root.google.cloud.gkehub.v1.ResourceOptions.encode(message.resourceOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.uid); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + $root.google.cloud.gkehub.v1.FleetLifecycleState.encode(message.state, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.defaultClusterConfig != null && Object.hasOwnProperty.call(message, "defaultClusterConfig")) + $root.google.cloud.gkehub.v1.DefaultClusterConfig.encode(message.defaultClusterConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 11, wireType 2 =*/90).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified KubernetesResource message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesResource.verify|verify} messages. + * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Fleet.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.KubernetesResource + * @memberof google.cloud.gkehub.v1.Fleet * @static - * @param {google.cloud.gkehub.v1.IKubernetesResource} message KubernetesResource message or plain object to encode + * @param {google.cloud.gkehub.v1.IFleet} message Fleet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KubernetesResource.encodeDelimited = function encodeDelimited(message, writer) { + Fleet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KubernetesResource message from the specified reader or buffer. + * Decodes a Fleet message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.KubernetesResource + * @memberof google.cloud.gkehub.v1.Fleet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.KubernetesResource} KubernetesResource + * @returns {google.cloud.gkehub.v1.Fleet} Fleet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KubernetesResource.decode = function decode(reader, length, error) { + Fleet.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.KubernetesResource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.Fleet(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.membershipCrManifest = reader.string(); + message.name = reader.string(); break; } case 2: { - if (!(message.membershipResources && message.membershipResources.length)) - message.membershipResources = []; - message.membershipResources.push($root.google.cloud.gkehub.v1.ResourceManifest.decode(reader, reader.uint32())); + message.displayName = reader.string(); break; } case 3: { - if (!(message.connectResources && message.connectResources.length)) - message.connectResources = []; - message.connectResources.push($root.google.cloud.gkehub.v1.ResourceManifest.decode(reader, reader.uint32())); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 4: { - message.resourceOptions = $root.google.cloud.gkehub.v1.ResourceOptions.decode(reader, reader.uint32()); + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.uid = reader.string(); + break; + } + case 9: { + message.state = $root.google.cloud.gkehub.v1.FleetLifecycleState.decode(reader, reader.uint32()); + break; + } + case 10: { + message.defaultClusterConfig = $root.google.cloud.gkehub.v1.DefaultClusterConfig.decode(reader, reader.uint32()); + break; + } + case 11: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; } default: @@ -40691,191 +40514,229 @@ }; /** - * Decodes a KubernetesResource message from the specified reader or buffer, length delimited. + * Decodes a Fleet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.KubernetesResource + * @memberof google.cloud.gkehub.v1.Fleet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.KubernetesResource} KubernetesResource + * @returns {google.cloud.gkehub.v1.Fleet} Fleet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KubernetesResource.decodeDelimited = function decodeDelimited(reader) { + Fleet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KubernetesResource message. + * Verifies a Fleet message. * @function verify - * @memberof google.cloud.gkehub.v1.KubernetesResource + * @memberof google.cloud.gkehub.v1.Fleet * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KubernetesResource.verify = function verify(message) { + Fleet.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.membershipCrManifest != null && message.hasOwnProperty("membershipCrManifest")) - if (!$util.isString(message.membershipCrManifest)) - return "membershipCrManifest: string expected"; - if (message.membershipResources != null && message.hasOwnProperty("membershipResources")) { - if (!Array.isArray(message.membershipResources)) - return "membershipResources: array expected"; - for (var i = 0; i < message.membershipResources.length; ++i) { - var error = $root.google.cloud.gkehub.v1.ResourceManifest.verify(message.membershipResources[i]); - if (error) - return "membershipResources." + error; - } - } - if (message.connectResources != null && message.hasOwnProperty("connectResources")) { - if (!Array.isArray(message.connectResources)) - return "connectResources: array expected"; - for (var i = 0; i < message.connectResources.length; ++i) { - var error = $root.google.cloud.gkehub.v1.ResourceManifest.verify(message.connectResources[i]); - if (error) - return "connectResources." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.resourceOptions != null && message.hasOwnProperty("resourceOptions")) { - var error = $root.google.cloud.gkehub.v1.ResourceOptions.verify(message.resourceOptions); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); if (error) - return "resourceOptions." + error; + return "updateTime." + error; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.state != null && message.hasOwnProperty("state")) { + var error = $root.google.cloud.gkehub.v1.FleetLifecycleState.verify(message.state); + if (error) + return "state." + error; + } + if (message.defaultClusterConfig != null && message.hasOwnProperty("defaultClusterConfig")) { + var error = $root.google.cloud.gkehub.v1.DefaultClusterConfig.verify(message.defaultClusterConfig); + if (error) + return "defaultClusterConfig." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } return null; }; /** - * Creates a KubernetesResource message from a plain object. Also converts values to their respective internal types. + * Creates a Fleet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.KubernetesResource + * @memberof google.cloud.gkehub.v1.Fleet * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.KubernetesResource} KubernetesResource + * @returns {google.cloud.gkehub.v1.Fleet} Fleet */ - KubernetesResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.KubernetesResource) + Fleet.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.Fleet) return object; - var message = new $root.google.cloud.gkehub.v1.KubernetesResource(); - if (object.membershipCrManifest != null) - message.membershipCrManifest = String(object.membershipCrManifest); - if (object.membershipResources) { - if (!Array.isArray(object.membershipResources)) - throw TypeError(".google.cloud.gkehub.v1.KubernetesResource.membershipResources: array expected"); - message.membershipResources = []; - for (var i = 0; i < object.membershipResources.length; ++i) { - if (typeof object.membershipResources[i] !== "object") - throw TypeError(".google.cloud.gkehub.v1.KubernetesResource.membershipResources: object expected"); - message.membershipResources[i] = $root.google.cloud.gkehub.v1.ResourceManifest.fromObject(object.membershipResources[i]); - } + var message = new $root.google.cloud.gkehub.v1.Fleet(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.Fleet.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.connectResources) { - if (!Array.isArray(object.connectResources)) - throw TypeError(".google.cloud.gkehub.v1.KubernetesResource.connectResources: array expected"); - message.connectResources = []; - for (var i = 0; i < object.connectResources.length; ++i) { - if (typeof object.connectResources[i] !== "object") - throw TypeError(".google.cloud.gkehub.v1.KubernetesResource.connectResources: object expected"); - message.connectResources[i] = $root.google.cloud.gkehub.v1.ResourceManifest.fromObject(object.connectResources[i]); - } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.Fleet.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.resourceOptions != null) { - if (typeof object.resourceOptions !== "object") - throw TypeError(".google.cloud.gkehub.v1.KubernetesResource.resourceOptions: object expected"); - message.resourceOptions = $root.google.cloud.gkehub.v1.ResourceOptions.fromObject(object.resourceOptions); + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.Fleet.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + if (object.uid != null) + message.uid = String(object.uid); + if (object.state != null) { + if (typeof object.state !== "object") + throw TypeError(".google.cloud.gkehub.v1.Fleet.state: object expected"); + message.state = $root.google.cloud.gkehub.v1.FleetLifecycleState.fromObject(object.state); + } + if (object.defaultClusterConfig != null) { + if (typeof object.defaultClusterConfig !== "object") + throw TypeError(".google.cloud.gkehub.v1.Fleet.defaultClusterConfig: object expected"); + message.defaultClusterConfig = $root.google.cloud.gkehub.v1.DefaultClusterConfig.fromObject(object.defaultClusterConfig); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.gkehub.v1.Fleet.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } return message; }; /** - * Creates a plain object from a KubernetesResource message. Also converts values to other types if specified. + * Creates a plain object from a Fleet message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.KubernetesResource + * @memberof google.cloud.gkehub.v1.Fleet * @static - * @param {google.cloud.gkehub.v1.KubernetesResource} message KubernetesResource + * @param {google.cloud.gkehub.v1.Fleet} message Fleet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KubernetesResource.toObject = function toObject(message, options) { + Fleet.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.membershipResources = []; - object.connectResources = []; - } + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.membershipCrManifest = ""; - object.resourceOptions = null; - } - if (message.membershipCrManifest != null && message.hasOwnProperty("membershipCrManifest")) - object.membershipCrManifest = message.membershipCrManifest; - if (message.membershipResources && message.membershipResources.length) { - object.membershipResources = []; - for (var j = 0; j < message.membershipResources.length; ++j) - object.membershipResources[j] = $root.google.cloud.gkehub.v1.ResourceManifest.toObject(message.membershipResources[j], options); + object.name = ""; + object.displayName = ""; + object.createTime = null; + object.updateTime = null; + object.deleteTime = null; + object.uid = ""; + object.state = null; + object.defaultClusterConfig = null; } - if (message.connectResources && message.connectResources.length) { - object.connectResources = []; - for (var j = 0; j < message.connectResources.length; ++j) - object.connectResources[j] = $root.google.cloud.gkehub.v1.ResourceManifest.toObject(message.connectResources[j], options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.state != null && message.hasOwnProperty("state")) + object.state = $root.google.cloud.gkehub.v1.FleetLifecycleState.toObject(message.state, options); + if (message.defaultClusterConfig != null && message.hasOwnProperty("defaultClusterConfig")) + object.defaultClusterConfig = $root.google.cloud.gkehub.v1.DefaultClusterConfig.toObject(message.defaultClusterConfig, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.resourceOptions != null && message.hasOwnProperty("resourceOptions")) - object.resourceOptions = $root.google.cloud.gkehub.v1.ResourceOptions.toObject(message.resourceOptions, options); return object; }; /** - * Converts this KubernetesResource to JSON. + * Converts this Fleet to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.KubernetesResource + * @memberof google.cloud.gkehub.v1.Fleet * @instance * @returns {Object.} JSON object */ - KubernetesResource.prototype.toJSON = function toJSON() { + Fleet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for KubernetesResource + * Gets the default type url for Fleet * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.KubernetesResource + * @memberof google.cloud.gkehub.v1.Fleet * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - KubernetesResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Fleet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.KubernetesResource"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.Fleet"; }; - return KubernetesResource; + return Fleet; })(); - v1.ResourceOptions = (function() { + v1.DefaultClusterConfig = (function() { /** - * Properties of a ResourceOptions. + * Properties of a DefaultClusterConfig. * @memberof google.cloud.gkehub.v1 - * @interface IResourceOptions - * @property {string|null} [connectVersion] ResourceOptions connectVersion - * @property {boolean|null} [v1beta1Crd] ResourceOptions v1beta1Crd - * @property {string|null} [k8sVersion] ResourceOptions k8sVersion - * @property {string|null} [k8sGitVersion] ResourceOptions k8sGitVersion + * @interface IDefaultClusterConfig + * @property {google.cloud.gkehub.v1.ISecurityPostureConfig|null} [securityPostureConfig] DefaultClusterConfig securityPostureConfig + * @property {google.cloud.gkehub.v1.IBinaryAuthorizationConfig|null} [binaryAuthorizationConfig] DefaultClusterConfig binaryAuthorizationConfig + * @property {google.cloud.gkehub.v1.ICompliancePostureConfig|null} [compliancePostureConfig] DefaultClusterConfig compliancePostureConfig */ /** - * Constructs a new ResourceOptions. + * Constructs a new DefaultClusterConfig. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a ResourceOptions. - * @implements IResourceOptions + * @classdesc Represents a DefaultClusterConfig. + * @implements IDefaultClusterConfig * @constructor - * @param {google.cloud.gkehub.v1.IResourceOptions=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IDefaultClusterConfig=} [properties] Properties to set */ - function ResourceOptions(properties) { + function DefaultClusterConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -40883,119 +40744,105 @@ } /** - * ResourceOptions connectVersion. - * @member {string} connectVersion - * @memberof google.cloud.gkehub.v1.ResourceOptions - * @instance - */ - ResourceOptions.prototype.connectVersion = ""; - - /** - * ResourceOptions v1beta1Crd. - * @member {boolean} v1beta1Crd - * @memberof google.cloud.gkehub.v1.ResourceOptions + * DefaultClusterConfig securityPostureConfig. + * @member {google.cloud.gkehub.v1.ISecurityPostureConfig|null|undefined} securityPostureConfig + * @memberof google.cloud.gkehub.v1.DefaultClusterConfig * @instance */ - ResourceOptions.prototype.v1beta1Crd = false; + DefaultClusterConfig.prototype.securityPostureConfig = null; /** - * ResourceOptions k8sVersion. - * @member {string} k8sVersion - * @memberof google.cloud.gkehub.v1.ResourceOptions + * DefaultClusterConfig binaryAuthorizationConfig. + * @member {google.cloud.gkehub.v1.IBinaryAuthorizationConfig|null|undefined} binaryAuthorizationConfig + * @memberof google.cloud.gkehub.v1.DefaultClusterConfig * @instance */ - ResourceOptions.prototype.k8sVersion = ""; + DefaultClusterConfig.prototype.binaryAuthorizationConfig = null; /** - * ResourceOptions k8sGitVersion. - * @member {string} k8sGitVersion - * @memberof google.cloud.gkehub.v1.ResourceOptions + * DefaultClusterConfig compliancePostureConfig. + * @member {google.cloud.gkehub.v1.ICompliancePostureConfig|null|undefined} compliancePostureConfig + * @memberof google.cloud.gkehub.v1.DefaultClusterConfig * @instance */ - ResourceOptions.prototype.k8sGitVersion = ""; + DefaultClusterConfig.prototype.compliancePostureConfig = null; /** - * Creates a new ResourceOptions instance using the specified properties. + * Creates a new DefaultClusterConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.ResourceOptions + * @memberof google.cloud.gkehub.v1.DefaultClusterConfig * @static - * @param {google.cloud.gkehub.v1.IResourceOptions=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.ResourceOptions} ResourceOptions instance + * @param {google.cloud.gkehub.v1.IDefaultClusterConfig=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.DefaultClusterConfig} DefaultClusterConfig instance */ - ResourceOptions.create = function create(properties) { - return new ResourceOptions(properties); + DefaultClusterConfig.create = function create(properties) { + return new DefaultClusterConfig(properties); }; /** - * Encodes the specified ResourceOptions message. Does not implicitly {@link google.cloud.gkehub.v1.ResourceOptions.verify|verify} messages. + * Encodes the specified DefaultClusterConfig message. Does not implicitly {@link google.cloud.gkehub.v1.DefaultClusterConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.ResourceOptions + * @memberof google.cloud.gkehub.v1.DefaultClusterConfig * @static - * @param {google.cloud.gkehub.v1.IResourceOptions} message ResourceOptions message or plain object to encode + * @param {google.cloud.gkehub.v1.IDefaultClusterConfig} message DefaultClusterConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceOptions.encode = function encode(message, writer) { + DefaultClusterConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.connectVersion != null && Object.hasOwnProperty.call(message, "connectVersion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectVersion); - if (message.v1beta1Crd != null && Object.hasOwnProperty.call(message, "v1beta1Crd")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.v1beta1Crd); - if (message.k8sVersion != null && Object.hasOwnProperty.call(message, "k8sVersion")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.k8sVersion); - if (message.k8sGitVersion != null && Object.hasOwnProperty.call(message, "k8sGitVersion")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.k8sGitVersion); + if (message.securityPostureConfig != null && Object.hasOwnProperty.call(message, "securityPostureConfig")) + $root.google.cloud.gkehub.v1.SecurityPostureConfig.encode(message.securityPostureConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.binaryAuthorizationConfig != null && Object.hasOwnProperty.call(message, "binaryAuthorizationConfig")) + $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.encode(message.binaryAuthorizationConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.compliancePostureConfig != null && Object.hasOwnProperty.call(message, "compliancePostureConfig")) + $root.google.cloud.gkehub.v1.CompliancePostureConfig.encode(message.compliancePostureConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ResourceOptions message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ResourceOptions.verify|verify} messages. + * Encodes the specified DefaultClusterConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DefaultClusterConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.ResourceOptions + * @memberof google.cloud.gkehub.v1.DefaultClusterConfig * @static - * @param {google.cloud.gkehub.v1.IResourceOptions} message ResourceOptions message or plain object to encode + * @param {google.cloud.gkehub.v1.IDefaultClusterConfig} message DefaultClusterConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceOptions.encodeDelimited = function encodeDelimited(message, writer) { + DefaultClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceOptions message from the specified reader or buffer. + * Decodes a DefaultClusterConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.ResourceOptions + * @memberof google.cloud.gkehub.v1.DefaultClusterConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.ResourceOptions} ResourceOptions + * @returns {google.cloud.gkehub.v1.DefaultClusterConfig} DefaultClusterConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceOptions.decode = function decode(reader, length, error) { + DefaultClusterConfig.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ResourceOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.DefaultClusterConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.connectVersion = reader.string(); + message.securityPostureConfig = $root.google.cloud.gkehub.v1.SecurityPostureConfig.decode(reader, reader.uint32()); break; } case 2: { - message.v1beta1Crd = reader.bool(); + message.binaryAuthorizationConfig = $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.decode(reader, reader.uint32()); break; } case 3: { - message.k8sVersion = reader.string(); - break; - } - case 4: { - message.k8sGitVersion = reader.string(); + message.compliancePostureConfig = $root.google.cloud.gkehub.v1.CompliancePostureConfig.decode(reader, reader.uint32()); break; } default: @@ -41007,148 +40854,155 @@ }; /** - * Decodes a ResourceOptions message from the specified reader or buffer, length delimited. + * Decodes a DefaultClusterConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.ResourceOptions + * @memberof google.cloud.gkehub.v1.DefaultClusterConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.ResourceOptions} ResourceOptions + * @returns {google.cloud.gkehub.v1.DefaultClusterConfig} DefaultClusterConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceOptions.decodeDelimited = function decodeDelimited(reader) { + DefaultClusterConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceOptions message. + * Verifies a DefaultClusterConfig message. * @function verify - * @memberof google.cloud.gkehub.v1.ResourceOptions + * @memberof google.cloud.gkehub.v1.DefaultClusterConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceOptions.verify = function verify(message) { + DefaultClusterConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.connectVersion != null && message.hasOwnProperty("connectVersion")) - if (!$util.isString(message.connectVersion)) - return "connectVersion: string expected"; - if (message.v1beta1Crd != null && message.hasOwnProperty("v1beta1Crd")) - if (typeof message.v1beta1Crd !== "boolean") - return "v1beta1Crd: boolean expected"; - if (message.k8sVersion != null && message.hasOwnProperty("k8sVersion")) - if (!$util.isString(message.k8sVersion)) - return "k8sVersion: string expected"; - if (message.k8sGitVersion != null && message.hasOwnProperty("k8sGitVersion")) - if (!$util.isString(message.k8sGitVersion)) - return "k8sGitVersion: string expected"; + if (message.securityPostureConfig != null && message.hasOwnProperty("securityPostureConfig")) { + var error = $root.google.cloud.gkehub.v1.SecurityPostureConfig.verify(message.securityPostureConfig); + if (error) + return "securityPostureConfig." + error; + } + if (message.binaryAuthorizationConfig != null && message.hasOwnProperty("binaryAuthorizationConfig")) { + var error = $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.verify(message.binaryAuthorizationConfig); + if (error) + return "binaryAuthorizationConfig." + error; + } + if (message.compliancePostureConfig != null && message.hasOwnProperty("compliancePostureConfig")) { + var error = $root.google.cloud.gkehub.v1.CompliancePostureConfig.verify(message.compliancePostureConfig); + if (error) + return "compliancePostureConfig." + error; + } return null; }; /** - * Creates a ResourceOptions message from a plain object. Also converts values to their respective internal types. + * Creates a DefaultClusterConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.ResourceOptions + * @memberof google.cloud.gkehub.v1.DefaultClusterConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.ResourceOptions} ResourceOptions + * @returns {google.cloud.gkehub.v1.DefaultClusterConfig} DefaultClusterConfig */ - ResourceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.ResourceOptions) + DefaultClusterConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.DefaultClusterConfig) return object; - var message = new $root.google.cloud.gkehub.v1.ResourceOptions(); - if (object.connectVersion != null) - message.connectVersion = String(object.connectVersion); - if (object.v1beta1Crd != null) - message.v1beta1Crd = Boolean(object.v1beta1Crd); - if (object.k8sVersion != null) - message.k8sVersion = String(object.k8sVersion); - if (object.k8sGitVersion != null) - message.k8sGitVersion = String(object.k8sGitVersion); + var message = new $root.google.cloud.gkehub.v1.DefaultClusterConfig(); + if (object.securityPostureConfig != null) { + if (typeof object.securityPostureConfig !== "object") + throw TypeError(".google.cloud.gkehub.v1.DefaultClusterConfig.securityPostureConfig: object expected"); + message.securityPostureConfig = $root.google.cloud.gkehub.v1.SecurityPostureConfig.fromObject(object.securityPostureConfig); + } + if (object.binaryAuthorizationConfig != null) { + if (typeof object.binaryAuthorizationConfig !== "object") + throw TypeError(".google.cloud.gkehub.v1.DefaultClusterConfig.binaryAuthorizationConfig: object expected"); + message.binaryAuthorizationConfig = $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.fromObject(object.binaryAuthorizationConfig); + } + if (object.compliancePostureConfig != null) { + if (typeof object.compliancePostureConfig !== "object") + throw TypeError(".google.cloud.gkehub.v1.DefaultClusterConfig.compliancePostureConfig: object expected"); + message.compliancePostureConfig = $root.google.cloud.gkehub.v1.CompliancePostureConfig.fromObject(object.compliancePostureConfig); + } return message; }; /** - * Creates a plain object from a ResourceOptions message. Also converts values to other types if specified. + * Creates a plain object from a DefaultClusterConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.ResourceOptions + * @memberof google.cloud.gkehub.v1.DefaultClusterConfig * @static - * @param {google.cloud.gkehub.v1.ResourceOptions} message ResourceOptions + * @param {google.cloud.gkehub.v1.DefaultClusterConfig} message DefaultClusterConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceOptions.toObject = function toObject(message, options) { + DefaultClusterConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.connectVersion = ""; - object.v1beta1Crd = false; - object.k8sVersion = ""; - object.k8sGitVersion = ""; - } - if (message.connectVersion != null && message.hasOwnProperty("connectVersion")) - object.connectVersion = message.connectVersion; - if (message.v1beta1Crd != null && message.hasOwnProperty("v1beta1Crd")) - object.v1beta1Crd = message.v1beta1Crd; - if (message.k8sVersion != null && message.hasOwnProperty("k8sVersion")) - object.k8sVersion = message.k8sVersion; - if (message.k8sGitVersion != null && message.hasOwnProperty("k8sGitVersion")) - object.k8sGitVersion = message.k8sGitVersion; + object.securityPostureConfig = null; + object.binaryAuthorizationConfig = null; + object.compliancePostureConfig = null; + } + if (message.securityPostureConfig != null && message.hasOwnProperty("securityPostureConfig")) + object.securityPostureConfig = $root.google.cloud.gkehub.v1.SecurityPostureConfig.toObject(message.securityPostureConfig, options); + if (message.binaryAuthorizationConfig != null && message.hasOwnProperty("binaryAuthorizationConfig")) + object.binaryAuthorizationConfig = $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.toObject(message.binaryAuthorizationConfig, options); + if (message.compliancePostureConfig != null && message.hasOwnProperty("compliancePostureConfig")) + object.compliancePostureConfig = $root.google.cloud.gkehub.v1.CompliancePostureConfig.toObject(message.compliancePostureConfig, options); return object; }; /** - * Converts this ResourceOptions to JSON. + * Converts this DefaultClusterConfig to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.ResourceOptions + * @memberof google.cloud.gkehub.v1.DefaultClusterConfig * @instance * @returns {Object.} JSON object */ - ResourceOptions.prototype.toJSON = function toJSON() { + DefaultClusterConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceOptions + * Gets the default type url for DefaultClusterConfig * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.ResourceOptions + * @memberof google.cloud.gkehub.v1.DefaultClusterConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DefaultClusterConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.ResourceOptions"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.DefaultClusterConfig"; }; - return ResourceOptions; + return DefaultClusterConfig; })(); - v1.ResourceManifest = (function() { + v1.SecurityPostureConfig = (function() { /** - * Properties of a ResourceManifest. + * Properties of a SecurityPostureConfig. * @memberof google.cloud.gkehub.v1 - * @interface IResourceManifest - * @property {string|null} [manifest] ResourceManifest manifest - * @property {boolean|null} [clusterScoped] ResourceManifest clusterScoped + * @interface ISecurityPostureConfig + * @property {google.cloud.gkehub.v1.SecurityPostureConfig.Mode|null} [mode] SecurityPostureConfig mode + * @property {google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode|null} [vulnerabilityMode] SecurityPostureConfig vulnerabilityMode */ /** - * Constructs a new ResourceManifest. + * Constructs a new SecurityPostureConfig. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a ResourceManifest. - * @implements IResourceManifest + * @classdesc Represents a SecurityPostureConfig. + * @implements ISecurityPostureConfig * @constructor - * @param {google.cloud.gkehub.v1.IResourceManifest=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.ISecurityPostureConfig=} [properties] Properties to set */ - function ResourceManifest(properties) { + function SecurityPostureConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41156,91 +41010,91 @@ } /** - * ResourceManifest manifest. - * @member {string} manifest - * @memberof google.cloud.gkehub.v1.ResourceManifest + * SecurityPostureConfig mode. + * @member {google.cloud.gkehub.v1.SecurityPostureConfig.Mode} mode + * @memberof google.cloud.gkehub.v1.SecurityPostureConfig * @instance */ - ResourceManifest.prototype.manifest = ""; + SecurityPostureConfig.prototype.mode = 0; /** - * ResourceManifest clusterScoped. - * @member {boolean} clusterScoped - * @memberof google.cloud.gkehub.v1.ResourceManifest + * SecurityPostureConfig vulnerabilityMode. + * @member {google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode} vulnerabilityMode + * @memberof google.cloud.gkehub.v1.SecurityPostureConfig * @instance */ - ResourceManifest.prototype.clusterScoped = false; + SecurityPostureConfig.prototype.vulnerabilityMode = 0; /** - * Creates a new ResourceManifest instance using the specified properties. + * Creates a new SecurityPostureConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.ResourceManifest + * @memberof google.cloud.gkehub.v1.SecurityPostureConfig * @static - * @param {google.cloud.gkehub.v1.IResourceManifest=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.ResourceManifest} ResourceManifest instance + * @param {google.cloud.gkehub.v1.ISecurityPostureConfig=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.SecurityPostureConfig} SecurityPostureConfig instance */ - ResourceManifest.create = function create(properties) { - return new ResourceManifest(properties); + SecurityPostureConfig.create = function create(properties) { + return new SecurityPostureConfig(properties); }; /** - * Encodes the specified ResourceManifest message. Does not implicitly {@link google.cloud.gkehub.v1.ResourceManifest.verify|verify} messages. + * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.cloud.gkehub.v1.SecurityPostureConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.ResourceManifest + * @memberof google.cloud.gkehub.v1.SecurityPostureConfig * @static - * @param {google.cloud.gkehub.v1.IResourceManifest} message ResourceManifest message or plain object to encode + * @param {google.cloud.gkehub.v1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceManifest.encode = function encode(message, writer) { + SecurityPostureConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.manifest != null && Object.hasOwnProperty.call(message, "manifest")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.manifest); - if (message.clusterScoped != null && Object.hasOwnProperty.call(message, "clusterScoped")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.clusterScoped); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.vulnerabilityMode != null && Object.hasOwnProperty.call(message, "vulnerabilityMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.vulnerabilityMode); return writer; }; /** - * Encodes the specified ResourceManifest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ResourceManifest.verify|verify} messages. + * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.SecurityPostureConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.ResourceManifest + * @memberof google.cloud.gkehub.v1.SecurityPostureConfig * @static - * @param {google.cloud.gkehub.v1.IResourceManifest} message ResourceManifest message or plain object to encode + * @param {google.cloud.gkehub.v1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceManifest.encodeDelimited = function encodeDelimited(message, writer) { + SecurityPostureConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceManifest message from the specified reader or buffer. + * Decodes a SecurityPostureConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.ResourceManifest + * @memberof google.cloud.gkehub.v1.SecurityPostureConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.ResourceManifest} ResourceManifest + * @returns {google.cloud.gkehub.v1.SecurityPostureConfig} SecurityPostureConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceManifest.decode = function decode(reader, length, error) { + SecurityPostureConfig.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ResourceManifest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.SecurityPostureConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.manifest = reader.string(); + message.mode = reader.int32(); break; } case 2: { - message.clusterScoped = reader.bool(); + message.vulnerabilityMode = reader.int32(); break; } default: @@ -41252,132 +41106,227 @@ }; /** - * Decodes a ResourceManifest message from the specified reader or buffer, length delimited. + * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.ResourceManifest + * @memberof google.cloud.gkehub.v1.SecurityPostureConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.ResourceManifest} ResourceManifest + * @returns {google.cloud.gkehub.v1.SecurityPostureConfig} SecurityPostureConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceManifest.decodeDelimited = function decodeDelimited(reader) { + SecurityPostureConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceManifest message. + * Verifies a SecurityPostureConfig message. * @function verify - * @memberof google.cloud.gkehub.v1.ResourceManifest + * @memberof google.cloud.gkehub.v1.SecurityPostureConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceManifest.verify = function verify(message) { + SecurityPostureConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.manifest != null && message.hasOwnProperty("manifest")) - if (!$util.isString(message.manifest)) - return "manifest: string expected"; - if (message.clusterScoped != null && message.hasOwnProperty("clusterScoped")) - if (typeof message.clusterScoped !== "boolean") - return "clusterScoped: boolean expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) + switch (message.vulnerabilityMode) { + default: + return "vulnerabilityMode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } return null; }; /** - * Creates a ResourceManifest message from a plain object. Also converts values to their respective internal types. + * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.ResourceManifest + * @memberof google.cloud.gkehub.v1.SecurityPostureConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.ResourceManifest} ResourceManifest + * @returns {google.cloud.gkehub.v1.SecurityPostureConfig} SecurityPostureConfig */ - ResourceManifest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.ResourceManifest) + SecurityPostureConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.SecurityPostureConfig) return object; - var message = new $root.google.cloud.gkehub.v1.ResourceManifest(); - if (object.manifest != null) - message.manifest = String(object.manifest); - if (object.clusterScoped != null) - message.clusterScoped = Boolean(object.clusterScoped); + var message = new $root.google.cloud.gkehub.v1.SecurityPostureConfig(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "DISABLED": + case 1: + message.mode = 1; + break; + case "BASIC": + case 2: + message.mode = 2; + break; + case "ENTERPRISE": + case 3: + message.mode = 3; + break; + } + switch (object.vulnerabilityMode) { + default: + if (typeof object.vulnerabilityMode === "number") { + message.vulnerabilityMode = object.vulnerabilityMode; + break; + } + break; + case "VULNERABILITY_MODE_UNSPECIFIED": + case 0: + message.vulnerabilityMode = 0; + break; + case "VULNERABILITY_DISABLED": + case 1: + message.vulnerabilityMode = 1; + break; + case "VULNERABILITY_BASIC": + case 2: + message.vulnerabilityMode = 2; + break; + case "VULNERABILITY_ENTERPRISE": + case 3: + message.vulnerabilityMode = 3; + break; + } return message; }; /** - * Creates a plain object from a ResourceManifest message. Also converts values to other types if specified. + * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.ResourceManifest + * @memberof google.cloud.gkehub.v1.SecurityPostureConfig * @static - * @param {google.cloud.gkehub.v1.ResourceManifest} message ResourceManifest + * @param {google.cloud.gkehub.v1.SecurityPostureConfig} message SecurityPostureConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceManifest.toObject = function toObject(message, options) { + SecurityPostureConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.manifest = ""; - object.clusterScoped = false; + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + object.vulnerabilityMode = options.enums === String ? "VULNERABILITY_MODE_UNSPECIFIED" : 0; } - if (message.manifest != null && message.hasOwnProperty("manifest")) - object.manifest = message.manifest; - if (message.clusterScoped != null && message.hasOwnProperty("clusterScoped")) - object.clusterScoped = message.clusterScoped; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.gkehub.v1.SecurityPostureConfig.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.gkehub.v1.SecurityPostureConfig.Mode[message.mode] : message.mode; + if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) + object.vulnerabilityMode = options.enums === String ? $root.google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] === undefined ? message.vulnerabilityMode : $root.google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] : message.vulnerabilityMode; return object; }; /** - * Converts this ResourceManifest to JSON. + * Converts this SecurityPostureConfig to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.ResourceManifest + * @memberof google.cloud.gkehub.v1.SecurityPostureConfig * @instance * @returns {Object.} JSON object */ - ResourceManifest.prototype.toJSON = function toJSON() { + SecurityPostureConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceManifest + * Gets the default type url for SecurityPostureConfig * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.ResourceManifest + * @memberof google.cloud.gkehub.v1.SecurityPostureConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceManifest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SecurityPostureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.ResourceManifest"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.SecurityPostureConfig"; }; - return ResourceManifest; + /** + * Mode enum. + * @name google.cloud.gkehub.v1.SecurityPostureConfig.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} BASIC=2 BASIC value + * @property {number} ENTERPRISE=3 ENTERPRISE value + */ + SecurityPostureConfig.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "BASIC"] = 2; + values[valuesById[3] = "ENTERPRISE"] = 3; + return values; + })(); + + /** + * VulnerabilityMode enum. + * @name google.cloud.gkehub.v1.SecurityPostureConfig.VulnerabilityMode + * @enum {number} + * @property {number} VULNERABILITY_MODE_UNSPECIFIED=0 VULNERABILITY_MODE_UNSPECIFIED value + * @property {number} VULNERABILITY_DISABLED=1 VULNERABILITY_DISABLED value + * @property {number} VULNERABILITY_BASIC=2 VULNERABILITY_BASIC value + * @property {number} VULNERABILITY_ENTERPRISE=3 VULNERABILITY_ENTERPRISE value + */ + SecurityPostureConfig.VulnerabilityMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VULNERABILITY_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VULNERABILITY_DISABLED"] = 1; + values[valuesById[2] = "VULNERABILITY_BASIC"] = 2; + values[valuesById[3] = "VULNERABILITY_ENTERPRISE"] = 3; + return values; + })(); + + return SecurityPostureConfig; })(); - v1.GkeCluster = (function() { + v1.BinaryAuthorizationConfig = (function() { /** - * Properties of a GkeCluster. + * Properties of a BinaryAuthorizationConfig. * @memberof google.cloud.gkehub.v1 - * @interface IGkeCluster - * @property {string|null} [resourceLink] GkeCluster resourceLink - * @property {boolean|null} [clusterMissing] GkeCluster clusterMissing + * @interface IBinaryAuthorizationConfig + * @property {google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode|null} [evaluationMode] BinaryAuthorizationConfig evaluationMode + * @property {Array.|null} [policyBindings] BinaryAuthorizationConfig policyBindings */ /** - * Constructs a new GkeCluster. + * Constructs a new BinaryAuthorizationConfig. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a GkeCluster. - * @implements IGkeCluster + * @classdesc Represents a BinaryAuthorizationConfig. + * @implements IBinaryAuthorizationConfig * @constructor - * @param {google.cloud.gkehub.v1.IGkeCluster=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IBinaryAuthorizationConfig=} [properties] Properties to set */ - function GkeCluster(properties) { + function BinaryAuthorizationConfig(properties) { + this.policyBindings = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41385,91 +41334,94 @@ } /** - * GkeCluster resourceLink. - * @member {string} resourceLink - * @memberof google.cloud.gkehub.v1.GkeCluster + * BinaryAuthorizationConfig evaluationMode. + * @member {google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode} evaluationMode + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig * @instance */ - GkeCluster.prototype.resourceLink = ""; + BinaryAuthorizationConfig.prototype.evaluationMode = 0; /** - * GkeCluster clusterMissing. - * @member {boolean} clusterMissing - * @memberof google.cloud.gkehub.v1.GkeCluster + * BinaryAuthorizationConfig policyBindings. + * @member {Array.} policyBindings + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig * @instance */ - GkeCluster.prototype.clusterMissing = false; + BinaryAuthorizationConfig.prototype.policyBindings = $util.emptyArray; /** - * Creates a new GkeCluster instance using the specified properties. + * Creates a new BinaryAuthorizationConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.GkeCluster + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig * @static - * @param {google.cloud.gkehub.v1.IGkeCluster=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.GkeCluster} GkeCluster instance + * @param {google.cloud.gkehub.v1.IBinaryAuthorizationConfig=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.BinaryAuthorizationConfig} BinaryAuthorizationConfig instance */ - GkeCluster.create = function create(properties) { - return new GkeCluster(properties); + BinaryAuthorizationConfig.create = function create(properties) { + return new BinaryAuthorizationConfig(properties); }; /** - * Encodes the specified GkeCluster message. Does not implicitly {@link google.cloud.gkehub.v1.GkeCluster.verify|verify} messages. + * Encodes the specified BinaryAuthorizationConfig message. Does not implicitly {@link google.cloud.gkehub.v1.BinaryAuthorizationConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.GkeCluster + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig * @static - * @param {google.cloud.gkehub.v1.IGkeCluster} message GkeCluster message or plain object to encode + * @param {google.cloud.gkehub.v1.IBinaryAuthorizationConfig} message BinaryAuthorizationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GkeCluster.encode = function encode(message, writer) { + BinaryAuthorizationConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceLink != null && Object.hasOwnProperty.call(message, "resourceLink")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceLink); - if (message.clusterMissing != null && Object.hasOwnProperty.call(message, "clusterMissing")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.clusterMissing); + if (message.evaluationMode != null && Object.hasOwnProperty.call(message, "evaluationMode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.evaluationMode); + if (message.policyBindings != null && message.policyBindings.length) + for (var i = 0; i < message.policyBindings.length; ++i) + $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding.encode(message.policyBindings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GkeCluster message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GkeCluster.verify|verify} messages. + * Encodes the specified BinaryAuthorizationConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.BinaryAuthorizationConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.GkeCluster + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig * @static - * @param {google.cloud.gkehub.v1.IGkeCluster} message GkeCluster message or plain object to encode + * @param {google.cloud.gkehub.v1.IBinaryAuthorizationConfig} message BinaryAuthorizationConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GkeCluster.encodeDelimited = function encodeDelimited(message, writer) { + BinaryAuthorizationConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GkeCluster message from the specified reader or buffer. + * Decodes a BinaryAuthorizationConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.GkeCluster + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.GkeCluster} GkeCluster + * @returns {google.cloud.gkehub.v1.BinaryAuthorizationConfig} BinaryAuthorizationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GkeCluster.decode = function decode(reader, length, error) { + BinaryAuthorizationConfig.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GkeCluster(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.resourceLink = reader.string(); + message.evaluationMode = reader.int32(); break; } case 2: { - message.clusterMissing = reader.bool(); + if (!(message.policyBindings && message.policyBindings.length)) + message.policyBindings = []; + message.policyBindings.push($root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding.decode(reader, reader.uint32())); break; } default: @@ -41481,136 +41433,395 @@ }; /** - * Decodes a GkeCluster message from the specified reader or buffer, length delimited. + * Decodes a BinaryAuthorizationConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.GkeCluster + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.GkeCluster} GkeCluster + * @returns {google.cloud.gkehub.v1.BinaryAuthorizationConfig} BinaryAuthorizationConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GkeCluster.decodeDelimited = function decodeDelimited(reader) { + BinaryAuthorizationConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GkeCluster message. + * Verifies a BinaryAuthorizationConfig message. * @function verify - * @memberof google.cloud.gkehub.v1.GkeCluster + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GkeCluster.verify = function verify(message) { + BinaryAuthorizationConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resourceLink != null && message.hasOwnProperty("resourceLink")) - if (!$util.isString(message.resourceLink)) - return "resourceLink: string expected"; - if (message.clusterMissing != null && message.hasOwnProperty("clusterMissing")) - if (typeof message.clusterMissing !== "boolean") - return "clusterMissing: boolean expected"; + if (message.evaluationMode != null && message.hasOwnProperty("evaluationMode")) + switch (message.evaluationMode) { + default: + return "evaluationMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.policyBindings != null && message.hasOwnProperty("policyBindings")) { + if (!Array.isArray(message.policyBindings)) + return "policyBindings: array expected"; + for (var i = 0; i < message.policyBindings.length; ++i) { + var error = $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding.verify(message.policyBindings[i]); + if (error) + return "policyBindings." + error; + } + } return null; }; /** - * Creates a GkeCluster message from a plain object. Also converts values to their respective internal types. + * Creates a BinaryAuthorizationConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.GkeCluster + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.GkeCluster} GkeCluster + * @returns {google.cloud.gkehub.v1.BinaryAuthorizationConfig} BinaryAuthorizationConfig */ - GkeCluster.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.GkeCluster) + BinaryAuthorizationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig) return object; - var message = new $root.google.cloud.gkehub.v1.GkeCluster(); - if (object.resourceLink != null) - message.resourceLink = String(object.resourceLink); - if (object.clusterMissing != null) - message.clusterMissing = Boolean(object.clusterMissing); + var message = new $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig(); + switch (object.evaluationMode) { + default: + if (typeof object.evaluationMode === "number") { + message.evaluationMode = object.evaluationMode; + break; + } + break; + case "EVALUATION_MODE_UNSPECIFIED": + case 0: + message.evaluationMode = 0; + break; + case "DISABLED": + case 1: + message.evaluationMode = 1; + break; + case "POLICY_BINDINGS": + case 2: + message.evaluationMode = 2; + break; + } + if (object.policyBindings) { + if (!Array.isArray(object.policyBindings)) + throw TypeError(".google.cloud.gkehub.v1.BinaryAuthorizationConfig.policyBindings: array expected"); + message.policyBindings = []; + for (var i = 0; i < object.policyBindings.length; ++i) { + if (typeof object.policyBindings[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.BinaryAuthorizationConfig.policyBindings: object expected"); + message.policyBindings[i] = $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding.fromObject(object.policyBindings[i]); + } + } return message; }; /** - * Creates a plain object from a GkeCluster message. Also converts values to other types if specified. + * Creates a plain object from a BinaryAuthorizationConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.GkeCluster + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig * @static - * @param {google.cloud.gkehub.v1.GkeCluster} message GkeCluster + * @param {google.cloud.gkehub.v1.BinaryAuthorizationConfig} message BinaryAuthorizationConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GkeCluster.toObject = function toObject(message, options) { + BinaryAuthorizationConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.resourceLink = ""; - object.clusterMissing = false; + if (options.arrays || options.defaults) + object.policyBindings = []; + if (options.defaults) + object.evaluationMode = options.enums === String ? "EVALUATION_MODE_UNSPECIFIED" : 0; + if (message.evaluationMode != null && message.hasOwnProperty("evaluationMode")) + object.evaluationMode = options.enums === String ? $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode[message.evaluationMode] === undefined ? message.evaluationMode : $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode[message.evaluationMode] : message.evaluationMode; + if (message.policyBindings && message.policyBindings.length) { + object.policyBindings = []; + for (var j = 0; j < message.policyBindings.length; ++j) + object.policyBindings[j] = $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding.toObject(message.policyBindings[j], options); } - if (message.resourceLink != null && message.hasOwnProperty("resourceLink")) - object.resourceLink = message.resourceLink; - if (message.clusterMissing != null && message.hasOwnProperty("clusterMissing")) - object.clusterMissing = message.clusterMissing; return object; }; /** - * Converts this GkeCluster to JSON. + * Converts this BinaryAuthorizationConfig to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.GkeCluster + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig * @instance * @returns {Object.} JSON object */ - GkeCluster.prototype.toJSON = function toJSON() { + BinaryAuthorizationConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GkeCluster + * Gets the default type url for BinaryAuthorizationConfig * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.GkeCluster + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GkeCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BinaryAuthorizationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.GkeCluster"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.BinaryAuthorizationConfig"; }; - return GkeCluster; + BinaryAuthorizationConfig.PolicyBinding = (function() { + + /** + * Properties of a PolicyBinding. + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig + * @interface IPolicyBinding + * @property {string|null} [name] PolicyBinding name + */ + + /** + * Constructs a new PolicyBinding. + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig + * @classdesc Represents a PolicyBinding. + * @implements IPolicyBinding + * @constructor + * @param {google.cloud.gkehub.v1.BinaryAuthorizationConfig.IPolicyBinding=} [properties] Properties to set + */ + function PolicyBinding(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PolicyBinding name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding + * @instance + */ + PolicyBinding.prototype.name = ""; + + /** + * Creates a new PolicyBinding instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding + * @static + * @param {google.cloud.gkehub.v1.BinaryAuthorizationConfig.IPolicyBinding=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding} PolicyBinding instance + */ + PolicyBinding.create = function create(properties) { + return new PolicyBinding(properties); + }; + + /** + * Encodes the specified PolicyBinding message. Does not implicitly {@link google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding + * @static + * @param {google.cloud.gkehub.v1.BinaryAuthorizationConfig.IPolicyBinding} message PolicyBinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyBinding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified PolicyBinding message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding + * @static + * @param {google.cloud.gkehub.v1.BinaryAuthorizationConfig.IPolicyBinding} message PolicyBinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PolicyBinding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PolicyBinding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding} PolicyBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyBinding.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PolicyBinding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding} PolicyBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PolicyBinding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PolicyBinding message. + * @function verify + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PolicyBinding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a PolicyBinding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding} PolicyBinding + */ + PolicyBinding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding) + return object; + var message = new $root.google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a PolicyBinding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding + * @static + * @param {google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding} message PolicyBinding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PolicyBinding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this PolicyBinding to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding + * @instance + * @returns {Object.} JSON object + */ + PolicyBinding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PolicyBinding + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PolicyBinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.BinaryAuthorizationConfig.PolicyBinding"; + }; + + return PolicyBinding; + })(); + + /** + * EvaluationMode enum. + * @name google.cloud.gkehub.v1.BinaryAuthorizationConfig.EvaluationMode + * @enum {number} + * @property {number} EVALUATION_MODE_UNSPECIFIED=0 EVALUATION_MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} POLICY_BINDINGS=2 POLICY_BINDINGS value + */ + BinaryAuthorizationConfig.EvaluationMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EVALUATION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "POLICY_BINDINGS"] = 2; + return values; + })(); + + return BinaryAuthorizationConfig; })(); - v1.KubernetesMetadata = (function() { + v1.CompliancePostureConfig = (function() { /** - * Properties of a KubernetesMetadata. + * Properties of a CompliancePostureConfig. * @memberof google.cloud.gkehub.v1 - * @interface IKubernetesMetadata - * @property {string|null} [kubernetesApiServerVersion] KubernetesMetadata kubernetesApiServerVersion - * @property {string|null} [nodeProviderId] KubernetesMetadata nodeProviderId - * @property {number|null} [nodeCount] KubernetesMetadata nodeCount - * @property {number|null} [vcpuCount] KubernetesMetadata vcpuCount - * @property {number|null} [memoryMb] KubernetesMetadata memoryMb - * @property {google.protobuf.ITimestamp|null} [updateTime] KubernetesMetadata updateTime + * @interface ICompliancePostureConfig + * @property {google.cloud.gkehub.v1.CompliancePostureConfig.Mode|null} [mode] CompliancePostureConfig mode + * @property {Array.|null} [complianceStandards] CompliancePostureConfig complianceStandards */ /** - * Constructs a new KubernetesMetadata. + * Constructs a new CompliancePostureConfig. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a KubernetesMetadata. - * @implements IKubernetesMetadata + * @classdesc Represents a CompliancePostureConfig. + * @implements ICompliancePostureConfig * @constructor - * @param {google.cloud.gkehub.v1.IKubernetesMetadata=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.ICompliancePostureConfig=} [properties] Properties to set */ - function KubernetesMetadata(properties) { + function CompliancePostureConfig(properties) { + this.complianceStandards = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41618,147 +41829,94 @@ } /** - * KubernetesMetadata kubernetesApiServerVersion. - * @member {string} kubernetesApiServerVersion - * @memberof google.cloud.gkehub.v1.KubernetesMetadata - * @instance - */ - KubernetesMetadata.prototype.kubernetesApiServerVersion = ""; - - /** - * KubernetesMetadata nodeProviderId. - * @member {string} nodeProviderId - * @memberof google.cloud.gkehub.v1.KubernetesMetadata - * @instance - */ - KubernetesMetadata.prototype.nodeProviderId = ""; - - /** - * KubernetesMetadata nodeCount. - * @member {number} nodeCount - * @memberof google.cloud.gkehub.v1.KubernetesMetadata - * @instance - */ - KubernetesMetadata.prototype.nodeCount = 0; - - /** - * KubernetesMetadata vcpuCount. - * @member {number} vcpuCount - * @memberof google.cloud.gkehub.v1.KubernetesMetadata - * @instance - */ - KubernetesMetadata.prototype.vcpuCount = 0; - - /** - * KubernetesMetadata memoryMb. - * @member {number} memoryMb - * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * CompliancePostureConfig mode. + * @member {google.cloud.gkehub.v1.CompliancePostureConfig.Mode} mode + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig * @instance */ - KubernetesMetadata.prototype.memoryMb = 0; + CompliancePostureConfig.prototype.mode = 0; /** - * KubernetesMetadata updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * CompliancePostureConfig complianceStandards. + * @member {Array.} complianceStandards + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig * @instance */ - KubernetesMetadata.prototype.updateTime = null; + CompliancePostureConfig.prototype.complianceStandards = $util.emptyArray; /** - * Creates a new KubernetesMetadata instance using the specified properties. + * Creates a new CompliancePostureConfig instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig * @static - * @param {google.cloud.gkehub.v1.IKubernetesMetadata=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.KubernetesMetadata} KubernetesMetadata instance + * @param {google.cloud.gkehub.v1.ICompliancePostureConfig=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.CompliancePostureConfig} CompliancePostureConfig instance */ - KubernetesMetadata.create = function create(properties) { - return new KubernetesMetadata(properties); + CompliancePostureConfig.create = function create(properties) { + return new CompliancePostureConfig(properties); }; /** - * Encodes the specified KubernetesMetadata message. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesMetadata.verify|verify} messages. + * Encodes the specified CompliancePostureConfig message. Does not implicitly {@link google.cloud.gkehub.v1.CompliancePostureConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig * @static - * @param {google.cloud.gkehub.v1.IKubernetesMetadata} message KubernetesMetadata message or plain object to encode + * @param {google.cloud.gkehub.v1.ICompliancePostureConfig} message CompliancePostureConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KubernetesMetadata.encode = function encode(message, writer) { + CompliancePostureConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kubernetesApiServerVersion != null && Object.hasOwnProperty.call(message, "kubernetesApiServerVersion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kubernetesApiServerVersion); - if (message.nodeProviderId != null && Object.hasOwnProperty.call(message, "nodeProviderId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nodeProviderId); - if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nodeCount); - if (message.vcpuCount != null && Object.hasOwnProperty.call(message, "vcpuCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.vcpuCount); - if (message.memoryMb != null && Object.hasOwnProperty.call(message, "memoryMb")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.memoryMb); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.complianceStandards != null && message.complianceStandards.length) + for (var i = 0; i < message.complianceStandards.length; ++i) + $root.google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard.encode(message.complianceStandards[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified KubernetesMetadata message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesMetadata.verify|verify} messages. + * Encodes the specified CompliancePostureConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CompliancePostureConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig * @static - * @param {google.cloud.gkehub.v1.IKubernetesMetadata} message KubernetesMetadata message or plain object to encode + * @param {google.cloud.gkehub.v1.ICompliancePostureConfig} message CompliancePostureConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KubernetesMetadata.encodeDelimited = function encodeDelimited(message, writer) { + CompliancePostureConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KubernetesMetadata message from the specified reader or buffer. + * Decodes a CompliancePostureConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.KubernetesMetadata} KubernetesMetadata + * @returns {google.cloud.gkehub.v1.CompliancePostureConfig} CompliancePostureConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KubernetesMetadata.decode = function decode(reader, length, error) { + CompliancePostureConfig.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.KubernetesMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.CompliancePostureConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.kubernetesApiServerVersion = reader.string(); + message.mode = reader.int32(); break; } case 2: { - message.nodeProviderId = reader.string(); - break; - } - case 3: { - message.nodeCount = reader.int32(); - break; - } - case 4: { - message.vcpuCount = reader.int32(); - break; - } - case 5: { - message.memoryMb = reader.int32(); - break; - } - case 100: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + if (!(message.complianceStandards && message.complianceStandards.length)) + message.complianceStandards = []; + message.complianceStandards.push($root.google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard.decode(reader, reader.uint32())); break; } default: @@ -41770,172 +41928,393 @@ }; /** - * Decodes a KubernetesMetadata message from the specified reader or buffer, length delimited. + * Decodes a CompliancePostureConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.KubernetesMetadata} KubernetesMetadata + * @returns {google.cloud.gkehub.v1.CompliancePostureConfig} CompliancePostureConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KubernetesMetadata.decodeDelimited = function decodeDelimited(reader) { + CompliancePostureConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KubernetesMetadata message. + * Verifies a CompliancePostureConfig message. * @function verify - * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KubernetesMetadata.verify = function verify(message) { + CompliancePostureConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kubernetesApiServerVersion != null && message.hasOwnProperty("kubernetesApiServerVersion")) - if (!$util.isString(message.kubernetesApiServerVersion)) - return "kubernetesApiServerVersion: string expected"; - if (message.nodeProviderId != null && message.hasOwnProperty("nodeProviderId")) - if (!$util.isString(message.nodeProviderId)) - return "nodeProviderId: string expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount)) - return "nodeCount: integer expected"; - if (message.vcpuCount != null && message.hasOwnProperty("vcpuCount")) - if (!$util.isInteger(message.vcpuCount)) - return "vcpuCount: integer expected"; - if (message.memoryMb != null && message.hasOwnProperty("memoryMb")) - if (!$util.isInteger(message.memoryMb)) - return "memoryMb: integer expected"; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.complianceStandards != null && message.hasOwnProperty("complianceStandards")) { + if (!Array.isArray(message.complianceStandards)) + return "complianceStandards: array expected"; + for (var i = 0; i < message.complianceStandards.length; ++i) { + var error = $root.google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard.verify(message.complianceStandards[i]); + if (error) + return "complianceStandards." + error; + } } return null; }; /** - * Creates a KubernetesMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a CompliancePostureConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.KubernetesMetadata} KubernetesMetadata + * @returns {google.cloud.gkehub.v1.CompliancePostureConfig} CompliancePostureConfig */ - KubernetesMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.KubernetesMetadata) + CompliancePostureConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.CompliancePostureConfig) return object; - var message = new $root.google.cloud.gkehub.v1.KubernetesMetadata(); - if (object.kubernetesApiServerVersion != null) - message.kubernetesApiServerVersion = String(object.kubernetesApiServerVersion); - if (object.nodeProviderId != null) - message.nodeProviderId = String(object.nodeProviderId); - if (object.nodeCount != null) - message.nodeCount = object.nodeCount | 0; - if (object.vcpuCount != null) - message.vcpuCount = object.vcpuCount | 0; - if (object.memoryMb != null) - message.memoryMb = object.memoryMb | 0; - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.gkehub.v1.KubernetesMetadata.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + var message = new $root.google.cloud.gkehub.v1.CompliancePostureConfig(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "DISABLED": + case 1: + message.mode = 1; + break; + case "ENABLED": + case 2: + message.mode = 2; + break; + } + if (object.complianceStandards) { + if (!Array.isArray(object.complianceStandards)) + throw TypeError(".google.cloud.gkehub.v1.CompliancePostureConfig.complianceStandards: array expected"); + message.complianceStandards = []; + for (var i = 0; i < object.complianceStandards.length; ++i) { + if (typeof object.complianceStandards[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.CompliancePostureConfig.complianceStandards: object expected"); + message.complianceStandards[i] = $root.google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard.fromObject(object.complianceStandards[i]); + } } return message; }; /** - * Creates a plain object from a KubernetesMetadata message. Also converts values to other types if specified. + * Creates a plain object from a CompliancePostureConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig * @static - * @param {google.cloud.gkehub.v1.KubernetesMetadata} message KubernetesMetadata + * @param {google.cloud.gkehub.v1.CompliancePostureConfig} message CompliancePostureConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KubernetesMetadata.toObject = function toObject(message, options) { + CompliancePostureConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.kubernetesApiServerVersion = ""; - object.nodeProviderId = ""; - object.nodeCount = 0; - object.vcpuCount = 0; - object.memoryMb = 0; - object.updateTime = null; + if (options.arrays || options.defaults) + object.complianceStandards = []; + if (options.defaults) + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.gkehub.v1.CompliancePostureConfig.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.gkehub.v1.CompliancePostureConfig.Mode[message.mode] : message.mode; + if (message.complianceStandards && message.complianceStandards.length) { + object.complianceStandards = []; + for (var j = 0; j < message.complianceStandards.length; ++j) + object.complianceStandards[j] = $root.google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard.toObject(message.complianceStandards[j], options); } - if (message.kubernetesApiServerVersion != null && message.hasOwnProperty("kubernetesApiServerVersion")) - object.kubernetesApiServerVersion = message.kubernetesApiServerVersion; - if (message.nodeProviderId != null && message.hasOwnProperty("nodeProviderId")) - object.nodeProviderId = message.nodeProviderId; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - object.nodeCount = message.nodeCount; - if (message.vcpuCount != null && message.hasOwnProperty("vcpuCount")) - object.vcpuCount = message.vcpuCount; - if (message.memoryMb != null && message.hasOwnProperty("memoryMb")) - object.memoryMb = message.memoryMb; - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this KubernetesMetadata to JSON. + * Converts this CompliancePostureConfig to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig * @instance * @returns {Object.} JSON object */ - KubernetesMetadata.prototype.toJSON = function toJSON() { + CompliancePostureConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for KubernetesMetadata + * Gets the default type url for CompliancePostureConfig * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - KubernetesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CompliancePostureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.KubernetesMetadata"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.CompliancePostureConfig"; }; - return KubernetesMetadata; + CompliancePostureConfig.ComplianceStandard = (function() { + + /** + * Properties of a ComplianceStandard. + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig + * @interface IComplianceStandard + * @property {string|null} [standard] ComplianceStandard standard + */ + + /** + * Constructs a new ComplianceStandard. + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig + * @classdesc Represents a ComplianceStandard. + * @implements IComplianceStandard + * @constructor + * @param {google.cloud.gkehub.v1.CompliancePostureConfig.IComplianceStandard=} [properties] Properties to set + */ + function ComplianceStandard(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComplianceStandard standard. + * @member {string} standard + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard + * @instance + */ + ComplianceStandard.prototype.standard = ""; + + /** + * Creates a new ComplianceStandard instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.cloud.gkehub.v1.CompliancePostureConfig.IComplianceStandard=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard instance + */ + ComplianceStandard.create = function create(properties) { + return new ComplianceStandard(properties); + }; + + /** + * Encodes the specified ComplianceStandard message. Does not implicitly {@link google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.cloud.gkehub.v1.CompliancePostureConfig.IComplianceStandard} message ComplianceStandard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComplianceStandard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.standard != null && Object.hasOwnProperty.call(message, "standard")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.standard); + return writer; + }; + + /** + * Encodes the specified ComplianceStandard message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.cloud.gkehub.v1.CompliancePostureConfig.IComplianceStandard} message ComplianceStandard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComplianceStandard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComplianceStandard.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.standard = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComplianceStandard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComplianceStandard message. + * @function verify + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComplianceStandard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.standard != null && message.hasOwnProperty("standard")) + if (!$util.isString(message.standard)) + return "standard: string expected"; + return null; + }; + + /** + * Creates a ComplianceStandard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard + */ + ComplianceStandard.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard) + return object; + var message = new $root.google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard(); + if (object.standard != null) + message.standard = String(object.standard); + return message; + }; + + /** + * Creates a plain object from a ComplianceStandard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard} message ComplianceStandard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComplianceStandard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.standard = ""; + if (message.standard != null && message.hasOwnProperty("standard")) + object.standard = message.standard; + return object; + }; + + /** + * Converts this ComplianceStandard to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard + * @instance + * @returns {Object.} JSON object + */ + ComplianceStandard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComplianceStandard + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComplianceStandard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.CompliancePostureConfig.ComplianceStandard"; + }; + + return ComplianceStandard; + })(); + + /** + * Mode enum. + * @name google.cloud.gkehub.v1.CompliancePostureConfig.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} ENABLED=2 ENABLED value + */ + CompliancePostureConfig.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "ENABLED"] = 2; + return values; + })(); + + return CompliancePostureConfig; })(); - v1.MonitoringConfig = (function() { + v1.FleetLifecycleState = (function() { /** - * Properties of a MonitoringConfig. + * Properties of a FleetLifecycleState. * @memberof google.cloud.gkehub.v1 - * @interface IMonitoringConfig - * @property {string|null} [projectId] MonitoringConfig projectId - * @property {string|null} [location] MonitoringConfig location - * @property {string|null} [cluster] MonitoringConfig cluster - * @property {string|null} [kubernetesMetricsPrefix] MonitoringConfig kubernetesMetricsPrefix - * @property {string|null} [clusterHash] MonitoringConfig clusterHash + * @interface IFleetLifecycleState + * @property {google.cloud.gkehub.v1.FleetLifecycleState.Code|null} [code] FleetLifecycleState code */ /** - * Constructs a new MonitoringConfig. + * Constructs a new FleetLifecycleState. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a MonitoringConfig. - * @implements IMonitoringConfig + * @classdesc Represents a FleetLifecycleState. + * @implements IFleetLifecycleState * @constructor - * @param {google.cloud.gkehub.v1.IMonitoringConfig=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IFleetLifecycleState=} [properties] Properties to set */ - function MonitoringConfig(properties) { + function FleetLifecycleState(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -41943,133 +42322,77 @@ } /** - * MonitoringConfig projectId. - * @member {string} projectId - * @memberof google.cloud.gkehub.v1.MonitoringConfig + * FleetLifecycleState code. + * @member {google.cloud.gkehub.v1.FleetLifecycleState.Code} code + * @memberof google.cloud.gkehub.v1.FleetLifecycleState * @instance */ - MonitoringConfig.prototype.projectId = ""; + FleetLifecycleState.prototype.code = 0; /** - * MonitoringConfig location. - * @member {string} location - * @memberof google.cloud.gkehub.v1.MonitoringConfig - * @instance - */ - MonitoringConfig.prototype.location = ""; - - /** - * MonitoringConfig cluster. - * @member {string} cluster - * @memberof google.cloud.gkehub.v1.MonitoringConfig - * @instance - */ - MonitoringConfig.prototype.cluster = ""; - - /** - * MonitoringConfig kubernetesMetricsPrefix. - * @member {string} kubernetesMetricsPrefix - * @memberof google.cloud.gkehub.v1.MonitoringConfig - * @instance - */ - MonitoringConfig.prototype.kubernetesMetricsPrefix = ""; - - /** - * MonitoringConfig clusterHash. - * @member {string} clusterHash - * @memberof google.cloud.gkehub.v1.MonitoringConfig - * @instance - */ - MonitoringConfig.prototype.clusterHash = ""; - - /** - * Creates a new MonitoringConfig instance using the specified properties. + * Creates a new FleetLifecycleState instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @memberof google.cloud.gkehub.v1.FleetLifecycleState * @static - * @param {google.cloud.gkehub.v1.IMonitoringConfig=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.MonitoringConfig} MonitoringConfig instance + * @param {google.cloud.gkehub.v1.IFleetLifecycleState=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.FleetLifecycleState} FleetLifecycleState instance */ - MonitoringConfig.create = function create(properties) { - return new MonitoringConfig(properties); + FleetLifecycleState.create = function create(properties) { + return new FleetLifecycleState(properties); }; /** - * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.cloud.gkehub.v1.MonitoringConfig.verify|verify} messages. + * Encodes the specified FleetLifecycleState message. Does not implicitly {@link google.cloud.gkehub.v1.FleetLifecycleState.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @memberof google.cloud.gkehub.v1.FleetLifecycleState * @static - * @param {google.cloud.gkehub.v1.IMonitoringConfig} message MonitoringConfig message or plain object to encode + * @param {google.cloud.gkehub.v1.IFleetLifecycleState} message FleetLifecycleState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoringConfig.encode = function encode(message, writer) { + FleetLifecycleState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.cluster); - if (message.kubernetesMetricsPrefix != null && Object.hasOwnProperty.call(message, "kubernetesMetricsPrefix")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.kubernetesMetricsPrefix); - if (message.clusterHash != null && Object.hasOwnProperty.call(message, "clusterHash")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.clusterHash); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); return writer; }; /** - * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MonitoringConfig.verify|verify} messages. + * Encodes the specified FleetLifecycleState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.FleetLifecycleState.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @memberof google.cloud.gkehub.v1.FleetLifecycleState * @static - * @param {google.cloud.gkehub.v1.IMonitoringConfig} message MonitoringConfig message or plain object to encode + * @param {google.cloud.gkehub.v1.IFleetLifecycleState} message FleetLifecycleState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MonitoringConfig.encodeDelimited = function encodeDelimited(message, writer) { + FleetLifecycleState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MonitoringConfig message from the specified reader or buffer. + * Decodes a FleetLifecycleState message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @memberof google.cloud.gkehub.v1.FleetLifecycleState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.MonitoringConfig} MonitoringConfig + * @returns {google.cloud.gkehub.v1.FleetLifecycleState} FleetLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoringConfig.decode = function decode(reader, length, error) { + FleetLifecycleState.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.MonitoringConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.FleetLifecycleState(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.projectId = reader.string(); - break; - } - case 2: { - message.location = reader.string(); - break; - } - case 3: { - message.cluster = reader.string(); - break; - } - case 4: { - message.kubernetesMetricsPrefix = reader.string(); - break; - } - case 5: { - message.clusterHash = reader.string(); + message.code = reader.int32(); break; } default: @@ -42081,155 +42404,186 @@ }; /** - * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. + * Decodes a FleetLifecycleState message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @memberof google.cloud.gkehub.v1.FleetLifecycleState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.MonitoringConfig} MonitoringConfig + * @returns {google.cloud.gkehub.v1.FleetLifecycleState} FleetLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MonitoringConfig.decodeDelimited = function decodeDelimited(reader) { + FleetLifecycleState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MonitoringConfig message. + * Verifies a FleetLifecycleState message. * @function verify - * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @memberof google.cloud.gkehub.v1.FleetLifecycleState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MonitoringConfig.verify = function verify(message) { + FleetLifecycleState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.cluster != null && message.hasOwnProperty("cluster")) - if (!$util.isString(message.cluster)) - return "cluster: string expected"; - if (message.kubernetesMetricsPrefix != null && message.hasOwnProperty("kubernetesMetricsPrefix")) - if (!$util.isString(message.kubernetesMetricsPrefix)) - return "kubernetesMetricsPrefix: string expected"; - if (message.clusterHash != null && message.hasOwnProperty("clusterHash")) - if (!$util.isString(message.clusterHash)) - return "clusterHash: string expected"; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; /** - * Creates a MonitoringConfig message from a plain object. Also converts values to their respective internal types. + * Creates a FleetLifecycleState message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @memberof google.cloud.gkehub.v1.FleetLifecycleState * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.MonitoringConfig} MonitoringConfig + * @returns {google.cloud.gkehub.v1.FleetLifecycleState} FleetLifecycleState */ - MonitoringConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.MonitoringConfig) + FleetLifecycleState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.FleetLifecycleState) return object; - var message = new $root.google.cloud.gkehub.v1.MonitoringConfig(); - if (object.projectId != null) - message.projectId = String(object.projectId); - if (object.location != null) - message.location = String(object.location); - if (object.cluster != null) - message.cluster = String(object.cluster); - if (object.kubernetesMetricsPrefix != null) - message.kubernetesMetricsPrefix = String(object.kubernetesMetricsPrefix); - if (object.clusterHash != null) - message.clusterHash = String(object.clusterHash); + var message = new $root.google.cloud.gkehub.v1.FleetLifecycleState(); + switch (object.code) { + default: + if (typeof object.code === "number") { + message.code = object.code; + break; + } + break; + case "CODE_UNSPECIFIED": + case 0: + message.code = 0; + break; + case "CREATING": + case 1: + message.code = 1; + break; + case "READY": + case 2: + message.code = 2; + break; + case "DELETING": + case 3: + message.code = 3; + break; + case "UPDATING": + case 4: + message.code = 4; + break; + } return message; }; /** - * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. + * Creates a plain object from a FleetLifecycleState message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @memberof google.cloud.gkehub.v1.FleetLifecycleState * @static - * @param {google.cloud.gkehub.v1.MonitoringConfig} message MonitoringConfig + * @param {google.cloud.gkehub.v1.FleetLifecycleState} message FleetLifecycleState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoringConfig.toObject = function toObject(message, options) { + FleetLifecycleState.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.projectId = ""; - object.location = ""; - object.cluster = ""; - object.kubernetesMetricsPrefix = ""; - object.clusterHash = ""; - } - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.cluster != null && message.hasOwnProperty("cluster")) - object.cluster = message.cluster; - if (message.kubernetesMetricsPrefix != null && message.hasOwnProperty("kubernetesMetricsPrefix")) - object.kubernetesMetricsPrefix = message.kubernetesMetricsPrefix; - if (message.clusterHash != null && message.hasOwnProperty("clusterHash")) - object.clusterHash = message.clusterHash; + if (options.defaults) + object.code = options.enums === String ? "CODE_UNSPECIFIED" : 0; + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.google.cloud.gkehub.v1.FleetLifecycleState.Code[message.code] === undefined ? message.code : $root.google.cloud.gkehub.v1.FleetLifecycleState.Code[message.code] : message.code; return object; }; /** - * Converts this MonitoringConfig to JSON. + * Converts this FleetLifecycleState to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @memberof google.cloud.gkehub.v1.FleetLifecycleState * @instance * @returns {Object.} JSON object */ - MonitoringConfig.prototype.toJSON = function toJSON() { + FleetLifecycleState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MonitoringConfig + * Gets the default type url for FleetLifecycleState * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @memberof google.cloud.gkehub.v1.FleetLifecycleState * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FleetLifecycleState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.MonitoringConfig"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.FleetLifecycleState"; }; - return MonitoringConfig; + /** + * Code enum. + * @name google.cloud.gkehub.v1.FleetLifecycleState.Code + * @enum {number} + * @property {number} CODE_UNSPECIFIED=0 CODE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value + */ + FleetLifecycleState.Code = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + return values; + })(); + + return FleetLifecycleState; })(); - v1.MembershipState = (function() { + v1.Namespace = (function() { /** - * Properties of a MembershipState. + * Properties of a Namespace. * @memberof google.cloud.gkehub.v1 - * @interface IMembershipState - * @property {google.cloud.gkehub.v1.MembershipState.Code|null} [code] MembershipState code + * @interface INamespace + * @property {string|null} [name] Namespace name + * @property {string|null} [uid] Namespace uid + * @property {google.protobuf.ITimestamp|null} [createTime] Namespace createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Namespace updateTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] Namespace deleteTime + * @property {google.cloud.gkehub.v1.INamespaceLifecycleState|null} [state] Namespace state + * @property {string|null} [scope] Namespace scope + * @property {Object.|null} [namespaceLabels] Namespace namespaceLabels + * @property {Object.|null} [labels] Namespace labels */ /** - * Constructs a new MembershipState. + * Constructs a new Namespace. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a MembershipState. - * @implements IMembershipState + * @classdesc Represents a Namespace. + * @implements INamespace * @constructor - * @param {google.cloud.gkehub.v1.IMembershipState=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.INamespace=} [properties] Properties to set */ - function MembershipState(properties) { + function Namespace(properties) { + this.namespaceLabels = {}; + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42237,77 +42591,229 @@ } /** - * MembershipState code. - * @member {google.cloud.gkehub.v1.MembershipState.Code} code - * @memberof google.cloud.gkehub.v1.MembershipState + * Namespace name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.Namespace * @instance */ - MembershipState.prototype.code = 0; + Namespace.prototype.name = ""; /** - * Creates a new MembershipState instance using the specified properties. - * @function create - * @memberof google.cloud.gkehub.v1.MembershipState - * @static - * @param {google.cloud.gkehub.v1.IMembershipState=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.MembershipState} MembershipState instance + * Namespace uid. + * @member {string} uid + * @memberof google.cloud.gkehub.v1.Namespace + * @instance */ - MembershipState.create = function create(properties) { - return new MembershipState(properties); - }; + Namespace.prototype.uid = ""; /** - * Encodes the specified MembershipState message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipState.verify|verify} messages. - * @function encode - * @memberof google.cloud.gkehub.v1.MembershipState - * @static - * @param {google.cloud.gkehub.v1.IMembershipState} message MembershipState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Namespace createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.gkehub.v1.Namespace + * @instance */ - MembershipState.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.code != null && Object.hasOwnProperty.call(message, "code")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); - return writer; - }; + Namespace.prototype.createTime = null; /** - * Encodes the specified MembershipState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipState.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.MembershipState - * @static - * @param {google.cloud.gkehub.v1.IMembershipState} message MembershipState message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Namespace updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.gkehub.v1.Namespace + * @instance */ - MembershipState.encodeDelimited = function encodeDelimited(message, writer) { + Namespace.prototype.updateTime = null; + + /** + * Namespace deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.cloud.gkehub.v1.Namespace + * @instance + */ + Namespace.prototype.deleteTime = null; + + /** + * Namespace state. + * @member {google.cloud.gkehub.v1.INamespaceLifecycleState|null|undefined} state + * @memberof google.cloud.gkehub.v1.Namespace + * @instance + */ + Namespace.prototype.state = null; + + /** + * Namespace scope. + * @member {string} scope + * @memberof google.cloud.gkehub.v1.Namespace + * @instance + */ + Namespace.prototype.scope = ""; + + /** + * Namespace namespaceLabels. + * @member {Object.} namespaceLabels + * @memberof google.cloud.gkehub.v1.Namespace + * @instance + */ + Namespace.prototype.namespaceLabels = $util.emptyObject; + + /** + * Namespace labels. + * @member {Object.} labels + * @memberof google.cloud.gkehub.v1.Namespace + * @instance + */ + Namespace.prototype.labels = $util.emptyObject; + + /** + * Creates a new Namespace instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.Namespace + * @static + * @param {google.cloud.gkehub.v1.INamespace=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.Namespace} Namespace instance + */ + Namespace.create = function create(properties) { + return new Namespace(properties); + }; + + /** + * Encodes the specified Namespace message. Does not implicitly {@link google.cloud.gkehub.v1.Namespace.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.Namespace + * @static + * @param {google.cloud.gkehub.v1.INamespace} message Namespace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Namespace.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + $root.google.cloud.gkehub.v1.NamespaceLifecycleState.encode(message.state, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.scope); + if (message.namespaceLabels != null && Object.hasOwnProperty.call(message, "namespaceLabels")) + for (var keys = Object.keys(message.namespaceLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.namespaceLabels[keys[i]]).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified Namespace message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Namespace.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.Namespace + * @static + * @param {google.cloud.gkehub.v1.INamespace} message Namespace message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Namespace.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MembershipState message from the specified reader or buffer. + * Decodes a Namespace message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.MembershipState + * @memberof google.cloud.gkehub.v1.Namespace * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.MembershipState} MembershipState + * @returns {google.cloud.gkehub.v1.Namespace} Namespace * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MembershipState.decode = function decode(reader, length, error) { + Namespace.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.MembershipState(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.Namespace(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.code = reader.int32(); + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.state = $root.google.cloud.gkehub.v1.NamespaceLifecycleState.decode(reader, reader.uint32()); + break; + } + case 8: { + message.scope = reader.string(); + break; + } + case 9: { + if (message.namespaceLabels === $util.emptyObject) + message.namespaceLabels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.namespaceLabels[key] = value; + break; + } + case 10: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; } default: @@ -42319,186 +42825,236 @@ }; /** - * Decodes a MembershipState message from the specified reader or buffer, length delimited. + * Decodes a Namespace message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.MembershipState + * @memberof google.cloud.gkehub.v1.Namespace * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.MembershipState} MembershipState + * @returns {google.cloud.gkehub.v1.Namespace} Namespace * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MembershipState.decodeDelimited = function decodeDelimited(reader) { + Namespace.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MembershipState message. + * Verifies a Namespace message. * @function verify - * @memberof google.cloud.gkehub.v1.MembershipState + * @memberof google.cloud.gkehub.v1.Namespace * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MembershipState.verify = function verify(message) { + Namespace.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.code != null && message.hasOwnProperty("code")) - switch (message.code) { - default: - return "code: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) { + var error = $root.google.cloud.gkehub.v1.NamespaceLifecycleState.verify(message.state); + if (error) + return "state." + error; + } + if (message.scope != null && message.hasOwnProperty("scope")) + if (!$util.isString(message.scope)) + return "scope: string expected"; + if (message.namespaceLabels != null && message.hasOwnProperty("namespaceLabels")) { + if (!$util.isObject(message.namespaceLabels)) + return "namespaceLabels: object expected"; + var key = Object.keys(message.namespaceLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.namespaceLabels[key[i]])) + return "namespaceLabels: string{k:string} expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } return null; }; /** - * Creates a MembershipState message from a plain object. Also converts values to their respective internal types. + * Creates a Namespace message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.MembershipState + * @memberof google.cloud.gkehub.v1.Namespace * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.MembershipState} MembershipState + * @returns {google.cloud.gkehub.v1.Namespace} Namespace */ - MembershipState.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.MembershipState) + Namespace.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.Namespace) return object; - var message = new $root.google.cloud.gkehub.v1.MembershipState(); - switch (object.code) { - default: - if (typeof object.code === "number") { - message.code = object.code; - break; - } - break; - case "CODE_UNSPECIFIED": - case 0: - message.code = 0; - break; - case "CREATING": - case 1: - message.code = 1; - break; - case "READY": - case 2: - message.code = 2; - break; - case "DELETING": - case 3: - message.code = 3; - break; - case "UPDATING": - case 4: - message.code = 4; - break; - case "SERVICE_UPDATING": - case 5: - message.code = 5; - break; + var message = new $root.google.cloud.gkehub.v1.Namespace(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.Namespace.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.Namespace.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.Namespace.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + if (object.state != null) { + if (typeof object.state !== "object") + throw TypeError(".google.cloud.gkehub.v1.Namespace.state: object expected"); + message.state = $root.google.cloud.gkehub.v1.NamespaceLifecycleState.fromObject(object.state); + } + if (object.scope != null) + message.scope = String(object.scope); + if (object.namespaceLabels) { + if (typeof object.namespaceLabels !== "object") + throw TypeError(".google.cloud.gkehub.v1.Namespace.namespaceLabels: object expected"); + message.namespaceLabels = {}; + for (var keys = Object.keys(object.namespaceLabels), i = 0; i < keys.length; ++i) + message.namespaceLabels[keys[i]] = String(object.namespaceLabels[keys[i]]); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.gkehub.v1.Namespace.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } return message; }; /** - * Creates a plain object from a MembershipState message. Also converts values to other types if specified. + * Creates a plain object from a Namespace message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.MembershipState + * @memberof google.cloud.gkehub.v1.Namespace * @static - * @param {google.cloud.gkehub.v1.MembershipState} message MembershipState + * @param {google.cloud.gkehub.v1.Namespace} message Namespace * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MembershipState.toObject = function toObject(message, options) { + Namespace.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.code = options.enums === String ? "CODE_UNSPECIFIED" : 0; - if (message.code != null && message.hasOwnProperty("code")) - object.code = options.enums === String ? $root.google.cloud.gkehub.v1.MembershipState.Code[message.code] === undefined ? message.code : $root.google.cloud.gkehub.v1.MembershipState.Code[message.code] : message.code; - return object; - }; - - /** - * Converts this MembershipState to JSON. - * @function toJSON - * @memberof google.cloud.gkehub.v1.MembershipState - * @instance - * @returns {Object.} JSON object - */ - MembershipState.prototype.toJSON = function toJSON() { + if (options.objects || options.defaults) { + object.namespaceLabels = {}; + object.labels = {}; + } + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.deleteTime = null; + object.state = null; + object.scope = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = $root.google.cloud.gkehub.v1.NamespaceLifecycleState.toObject(message.state, options); + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = message.scope; + var keys2; + if (message.namespaceLabels && (keys2 = Object.keys(message.namespaceLabels)).length) { + object.namespaceLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.namespaceLabels[keys2[j]] = message.namespaceLabels[keys2[j]]; + } + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; + + /** + * Converts this Namespace to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.Namespace + * @instance + * @returns {Object.} JSON object + */ + Namespace.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MembershipState + * Gets the default type url for Namespace * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.MembershipState + * @memberof google.cloud.gkehub.v1.Namespace * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MembershipState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Namespace.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.MembershipState"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.Namespace"; }; - /** - * Code enum. - * @name google.cloud.gkehub.v1.MembershipState.Code - * @enum {number} - * @property {number} CODE_UNSPECIFIED=0 CODE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} READY=2 READY value - * @property {number} DELETING=3 DELETING value - * @property {number} UPDATING=4 UPDATING value - * @property {number} SERVICE_UPDATING=5 SERVICE_UPDATING value - */ - MembershipState.Code = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "READY"] = 2; - values[valuesById[3] = "DELETING"] = 3; - values[valuesById[4] = "UPDATING"] = 4; - values[valuesById[5] = "SERVICE_UPDATING"] = 5; - return values; - })(); - - return MembershipState; + return Namespace; })(); - v1.Authority = (function() { + v1.NamespaceLifecycleState = (function() { /** - * Properties of an Authority. + * Properties of a NamespaceLifecycleState. * @memberof google.cloud.gkehub.v1 - * @interface IAuthority - * @property {string|null} [issuer] Authority issuer - * @property {string|null} [workloadIdentityPool] Authority workloadIdentityPool - * @property {string|null} [identityProvider] Authority identityProvider - * @property {Uint8Array|null} [oidcJwks] Authority oidcJwks + * @interface INamespaceLifecycleState + * @property {google.cloud.gkehub.v1.NamespaceLifecycleState.Code|null} [code] NamespaceLifecycleState code */ /** - * Constructs a new Authority. + * Constructs a new NamespaceLifecycleState. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents an Authority. - * @implements IAuthority + * @classdesc Represents a NamespaceLifecycleState. + * @implements INamespaceLifecycleState * @constructor - * @param {google.cloud.gkehub.v1.IAuthority=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.INamespaceLifecycleState=} [properties] Properties to set */ - function Authority(properties) { + function NamespaceLifecycleState(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -42506,119 +43062,77 @@ } /** - * Authority issuer. - * @member {string} issuer - * @memberof google.cloud.gkehub.v1.Authority - * @instance - */ - Authority.prototype.issuer = ""; - - /** - * Authority workloadIdentityPool. - * @member {string} workloadIdentityPool - * @memberof google.cloud.gkehub.v1.Authority - * @instance - */ - Authority.prototype.workloadIdentityPool = ""; - - /** - * Authority identityProvider. - * @member {string} identityProvider - * @memberof google.cloud.gkehub.v1.Authority - * @instance - */ - Authority.prototype.identityProvider = ""; - - /** - * Authority oidcJwks. - * @member {Uint8Array} oidcJwks - * @memberof google.cloud.gkehub.v1.Authority + * NamespaceLifecycleState code. + * @member {google.cloud.gkehub.v1.NamespaceLifecycleState.Code} code + * @memberof google.cloud.gkehub.v1.NamespaceLifecycleState * @instance */ - Authority.prototype.oidcJwks = $util.newBuffer([]); + NamespaceLifecycleState.prototype.code = 0; /** - * Creates a new Authority instance using the specified properties. + * Creates a new NamespaceLifecycleState instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.Authority + * @memberof google.cloud.gkehub.v1.NamespaceLifecycleState * @static - * @param {google.cloud.gkehub.v1.IAuthority=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.Authority} Authority instance + * @param {google.cloud.gkehub.v1.INamespaceLifecycleState=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.NamespaceLifecycleState} NamespaceLifecycleState instance */ - Authority.create = function create(properties) { - return new Authority(properties); + NamespaceLifecycleState.create = function create(properties) { + return new NamespaceLifecycleState(properties); }; /** - * Encodes the specified Authority message. Does not implicitly {@link google.cloud.gkehub.v1.Authority.verify|verify} messages. + * Encodes the specified NamespaceLifecycleState message. Does not implicitly {@link google.cloud.gkehub.v1.NamespaceLifecycleState.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.Authority + * @memberof google.cloud.gkehub.v1.NamespaceLifecycleState * @static - * @param {google.cloud.gkehub.v1.IAuthority} message Authority message or plain object to encode + * @param {google.cloud.gkehub.v1.INamespaceLifecycleState} message NamespaceLifecycleState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Authority.encode = function encode(message, writer) { + NamespaceLifecycleState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuer); - if (message.workloadIdentityPool != null && Object.hasOwnProperty.call(message, "workloadIdentityPool")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.workloadIdentityPool); - if (message.identityProvider != null && Object.hasOwnProperty.call(message, "identityProvider")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identityProvider); - if (message.oidcJwks != null && Object.hasOwnProperty.call(message, "oidcJwks")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.oidcJwks); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); return writer; }; /** - * Encodes the specified Authority message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Authority.verify|verify} messages. + * Encodes the specified NamespaceLifecycleState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.NamespaceLifecycleState.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.Authority + * @memberof google.cloud.gkehub.v1.NamespaceLifecycleState * @static - * @param {google.cloud.gkehub.v1.IAuthority} message Authority message or plain object to encode + * @param {google.cloud.gkehub.v1.INamespaceLifecycleState} message NamespaceLifecycleState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Authority.encodeDelimited = function encodeDelimited(message, writer) { + NamespaceLifecycleState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Authority message from the specified reader or buffer. + * Decodes a NamespaceLifecycleState message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.Authority + * @memberof google.cloud.gkehub.v1.NamespaceLifecycleState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.Authority} Authority + * @returns {google.cloud.gkehub.v1.NamespaceLifecycleState} NamespaceLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Authority.decode = function decode(reader, length, error) { + NamespaceLifecycleState.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.Authority(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.NamespaceLifecycleState(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.issuer = reader.string(); - break; - } - case 2: { - message.workloadIdentityPool = reader.string(); - break; - } - case 3: { - message.identityProvider = reader.string(); - break; - } - case 4: { - message.oidcJwks = reader.bytes(); + message.code = reader.int32(); break; } default: @@ -42630,558 +43144,958 @@ }; /** - * Decodes an Authority message from the specified reader or buffer, length delimited. + * Decodes a NamespaceLifecycleState message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.Authority + * @memberof google.cloud.gkehub.v1.NamespaceLifecycleState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.Authority} Authority + * @returns {google.cloud.gkehub.v1.NamespaceLifecycleState} NamespaceLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Authority.decodeDelimited = function decodeDelimited(reader) { + NamespaceLifecycleState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Authority message. + * Verifies a NamespaceLifecycleState message. * @function verify - * @memberof google.cloud.gkehub.v1.Authority + * @memberof google.cloud.gkehub.v1.NamespaceLifecycleState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Authority.verify = function verify(message) { + NamespaceLifecycleState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.issuer != null && message.hasOwnProperty("issuer")) - if (!$util.isString(message.issuer)) - return "issuer: string expected"; - if (message.workloadIdentityPool != null && message.hasOwnProperty("workloadIdentityPool")) - if (!$util.isString(message.workloadIdentityPool)) - return "workloadIdentityPool: string expected"; - if (message.identityProvider != null && message.hasOwnProperty("identityProvider")) - if (!$util.isString(message.identityProvider)) - return "identityProvider: string expected"; - if (message.oidcJwks != null && message.hasOwnProperty("oidcJwks")) - if (!(message.oidcJwks && typeof message.oidcJwks.length === "number" || $util.isString(message.oidcJwks))) - return "oidcJwks: buffer expected"; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; /** - * Creates an Authority message from a plain object. Also converts values to their respective internal types. + * Creates a NamespaceLifecycleState message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.Authority + * @memberof google.cloud.gkehub.v1.NamespaceLifecycleState * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.Authority} Authority + * @returns {google.cloud.gkehub.v1.NamespaceLifecycleState} NamespaceLifecycleState */ - Authority.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.Authority) + NamespaceLifecycleState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.NamespaceLifecycleState) return object; - var message = new $root.google.cloud.gkehub.v1.Authority(); - if (object.issuer != null) - message.issuer = String(object.issuer); - if (object.workloadIdentityPool != null) - message.workloadIdentityPool = String(object.workloadIdentityPool); - if (object.identityProvider != null) - message.identityProvider = String(object.identityProvider); - if (object.oidcJwks != null) - if (typeof object.oidcJwks === "string") - $util.base64.decode(object.oidcJwks, message.oidcJwks = $util.newBuffer($util.base64.length(object.oidcJwks)), 0); - else if (object.oidcJwks.length >= 0) - message.oidcJwks = object.oidcJwks; + var message = new $root.google.cloud.gkehub.v1.NamespaceLifecycleState(); + switch (object.code) { + default: + if (typeof object.code === "number") { + message.code = object.code; + break; + } + break; + case "CODE_UNSPECIFIED": + case 0: + message.code = 0; + break; + case "CREATING": + case 1: + message.code = 1; + break; + case "READY": + case 2: + message.code = 2; + break; + case "DELETING": + case 3: + message.code = 3; + break; + case "UPDATING": + case 4: + message.code = 4; + break; + } return message; }; /** - * Creates a plain object from an Authority message. Also converts values to other types if specified. + * Creates a plain object from a NamespaceLifecycleState message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.Authority + * @memberof google.cloud.gkehub.v1.NamespaceLifecycleState * @static - * @param {google.cloud.gkehub.v1.Authority} message Authority + * @param {google.cloud.gkehub.v1.NamespaceLifecycleState} message NamespaceLifecycleState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Authority.toObject = function toObject(message, options) { + NamespaceLifecycleState.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.issuer = ""; - object.workloadIdentityPool = ""; - object.identityProvider = ""; - if (options.bytes === String) - object.oidcJwks = ""; - else { - object.oidcJwks = []; - if (options.bytes !== Array) - object.oidcJwks = $util.newBuffer(object.oidcJwks); - } - } - if (message.issuer != null && message.hasOwnProperty("issuer")) - object.issuer = message.issuer; - if (message.workloadIdentityPool != null && message.hasOwnProperty("workloadIdentityPool")) - object.workloadIdentityPool = message.workloadIdentityPool; - if (message.identityProvider != null && message.hasOwnProperty("identityProvider")) - object.identityProvider = message.identityProvider; - if (message.oidcJwks != null && message.hasOwnProperty("oidcJwks")) - object.oidcJwks = options.bytes === String ? $util.base64.encode(message.oidcJwks, 0, message.oidcJwks.length) : options.bytes === Array ? Array.prototype.slice.call(message.oidcJwks) : message.oidcJwks; + if (options.defaults) + object.code = options.enums === String ? "CODE_UNSPECIFIED" : 0; + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.google.cloud.gkehub.v1.NamespaceLifecycleState.Code[message.code] === undefined ? message.code : $root.google.cloud.gkehub.v1.NamespaceLifecycleState.Code[message.code] : message.code; return object; }; /** - * Converts this Authority to JSON. + * Converts this NamespaceLifecycleState to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.Authority + * @memberof google.cloud.gkehub.v1.NamespaceLifecycleState * @instance * @returns {Object.} JSON object */ - Authority.prototype.toJSON = function toJSON() { + NamespaceLifecycleState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Authority + * Gets the default type url for NamespaceLifecycleState * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.Authority + * @memberof google.cloud.gkehub.v1.NamespaceLifecycleState * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Authority.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NamespaceLifecycleState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.Authority"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.NamespaceLifecycleState"; }; - return Authority; - })(); - - v1.GkeHub = (function() { - /** - * Constructs a new GkeHub service. - * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a GkeHub - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * Code enum. + * @name google.cloud.gkehub.v1.NamespaceLifecycleState.Code + * @enum {number} + * @property {number} CODE_UNSPECIFIED=0 CODE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value */ - function GkeHub(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } + NamespaceLifecycleState.Code = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + return values; + })(); - (GkeHub.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = GkeHub; + return NamespaceLifecycleState; + })(); - /** - * Creates new GkeHub service using the specified rpc implementation. - * @function create - * @memberof google.cloud.gkehub.v1.GkeHub - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {GkeHub} RPC service. Useful where requests and/or responses are streamed. - */ - GkeHub.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; + v1.RBACRoleBinding = (function() { /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listMemberships}. - * @memberof google.cloud.gkehub.v1.GkeHub - * @typedef ListMembershipsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.gkehub.v1.ListMembershipsResponse} [response] ListMembershipsResponse + * Properties of a RBACRoleBinding. + * @memberof google.cloud.gkehub.v1 + * @interface IRBACRoleBinding + * @property {string|null} [user] RBACRoleBinding user + * @property {string|null} [group] RBACRoleBinding group + * @property {string|null} [name] RBACRoleBinding name + * @property {string|null} [uid] RBACRoleBinding uid + * @property {google.protobuf.ITimestamp|null} [createTime] RBACRoleBinding createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] RBACRoleBinding updateTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] RBACRoleBinding deleteTime + * @property {google.cloud.gkehub.v1.IRBACRoleBindingLifecycleState|null} [state] RBACRoleBinding state + * @property {google.cloud.gkehub.v1.RBACRoleBinding.IRole|null} [role] RBACRoleBinding role + * @property {Object.|null} [labels] RBACRoleBinding labels */ /** - * Calls ListMemberships. - * @function listMemberships - * @memberof google.cloud.gkehub.v1.GkeHub - * @instance - * @param {google.cloud.gkehub.v1.IListMembershipsRequest} request ListMembershipsRequest message or plain object - * @param {google.cloud.gkehub.v1.GkeHub.ListMembershipsCallback} callback Node-style callback called with the error, if any, and ListMembershipsResponse - * @returns {undefined} - * @variation 1 + * Constructs a new RBACRoleBinding. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a RBACRoleBinding. + * @implements IRBACRoleBinding + * @constructor + * @param {google.cloud.gkehub.v1.IRBACRoleBinding=} [properties] Properties to set */ - Object.defineProperty(GkeHub.prototype.listMemberships = function listMemberships(request, callback) { - return this.rpcCall(listMemberships, $root.google.cloud.gkehub.v1.ListMembershipsRequest, $root.google.cloud.gkehub.v1.ListMembershipsResponse, request, callback); - }, "name", { value: "ListMemberships" }); + function RBACRoleBinding(properties) { + this.labels = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Calls ListMemberships. - * @function listMemberships - * @memberof google.cloud.gkehub.v1.GkeHub + * RBACRoleBinding user. + * @member {string|null|undefined} user + * @memberof google.cloud.gkehub.v1.RBACRoleBinding * @instance - * @param {google.cloud.gkehub.v1.IListMembershipsRequest} request ListMembershipsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listFeatures}. - * @memberof google.cloud.gkehub.v1.GkeHub - * @typedef ListFeaturesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.gkehub.v1.ListFeaturesResponse} [response] ListFeaturesResponse */ + RBACRoleBinding.prototype.user = null; /** - * Calls ListFeatures. - * @function listFeatures - * @memberof google.cloud.gkehub.v1.GkeHub + * RBACRoleBinding group. + * @member {string|null|undefined} group + * @memberof google.cloud.gkehub.v1.RBACRoleBinding * @instance - * @param {google.cloud.gkehub.v1.IListFeaturesRequest} request ListFeaturesRequest message or plain object - * @param {google.cloud.gkehub.v1.GkeHub.ListFeaturesCallback} callback Node-style callback called with the error, if any, and ListFeaturesResponse - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(GkeHub.prototype.listFeatures = function listFeatures(request, callback) { - return this.rpcCall(listFeatures, $root.google.cloud.gkehub.v1.ListFeaturesRequest, $root.google.cloud.gkehub.v1.ListFeaturesResponse, request, callback); - }, "name", { value: "ListFeatures" }); + RBACRoleBinding.prototype.group = null; /** - * Calls ListFeatures. - * @function listFeatures - * @memberof google.cloud.gkehub.v1.GkeHub + * RBACRoleBinding name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.RBACRoleBinding * @instance - * @param {google.cloud.gkehub.v1.IListFeaturesRequest} request ListFeaturesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getMembership}. - * @memberof google.cloud.gkehub.v1.GkeHub - * @typedef GetMembershipCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.gkehub.v1.Membership} [response] Membership */ + RBACRoleBinding.prototype.name = ""; /** - * Calls GetMembership. - * @function getMembership - * @memberof google.cloud.gkehub.v1.GkeHub + * RBACRoleBinding uid. + * @member {string} uid + * @memberof google.cloud.gkehub.v1.RBACRoleBinding * @instance - * @param {google.cloud.gkehub.v1.IGetMembershipRequest} request GetMembershipRequest message or plain object - * @param {google.cloud.gkehub.v1.GkeHub.GetMembershipCallback} callback Node-style callback called with the error, if any, and Membership - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(GkeHub.prototype.getMembership = function getMembership(request, callback) { - return this.rpcCall(getMembership, $root.google.cloud.gkehub.v1.GetMembershipRequest, $root.google.cloud.gkehub.v1.Membership, request, callback); - }, "name", { value: "GetMembership" }); + RBACRoleBinding.prototype.uid = ""; /** - * Calls GetMembership. - * @function getMembership - * @memberof google.cloud.gkehub.v1.GkeHub + * RBACRoleBinding createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.gkehub.v1.RBACRoleBinding * @instance - * @param {google.cloud.gkehub.v1.IGetMembershipRequest} request GetMembershipRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getFeature}. - * @memberof google.cloud.gkehub.v1.GkeHub - * @typedef GetFeatureCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.gkehub.v1.Feature} [response] Feature */ + RBACRoleBinding.prototype.createTime = null; /** - * Calls GetFeature. - * @function getFeature - * @memberof google.cloud.gkehub.v1.GkeHub + * RBACRoleBinding updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.gkehub.v1.RBACRoleBinding * @instance - * @param {google.cloud.gkehub.v1.IGetFeatureRequest} request GetFeatureRequest message or plain object - * @param {google.cloud.gkehub.v1.GkeHub.GetFeatureCallback} callback Node-style callback called with the error, if any, and Feature - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(GkeHub.prototype.getFeature = function getFeature(request, callback) { - return this.rpcCall(getFeature, $root.google.cloud.gkehub.v1.GetFeatureRequest, $root.google.cloud.gkehub.v1.Feature, request, callback); - }, "name", { value: "GetFeature" }); + RBACRoleBinding.prototype.updateTime = null; /** - * Calls GetFeature. - * @function getFeature - * @memberof google.cloud.gkehub.v1.GkeHub + * RBACRoleBinding deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.cloud.gkehub.v1.RBACRoleBinding * @instance - * @param {google.cloud.gkehub.v1.IGetFeatureRequest} request GetFeatureRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + RBACRoleBinding.prototype.deleteTime = null; /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createMembership}. - * @memberof google.cloud.gkehub.v1.GkeHub - * @typedef CreateMembershipCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * RBACRoleBinding state. + * @member {google.cloud.gkehub.v1.IRBACRoleBindingLifecycleState|null|undefined} state + * @memberof google.cloud.gkehub.v1.RBACRoleBinding + * @instance */ + RBACRoleBinding.prototype.state = null; /** - * Calls CreateMembership. - * @function createMembership - * @memberof google.cloud.gkehub.v1.GkeHub + * RBACRoleBinding role. + * @member {google.cloud.gkehub.v1.RBACRoleBinding.IRole|null|undefined} role + * @memberof google.cloud.gkehub.v1.RBACRoleBinding * @instance - * @param {google.cloud.gkehub.v1.ICreateMembershipRequest} request CreateMembershipRequest message or plain object - * @param {google.cloud.gkehub.v1.GkeHub.CreateMembershipCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(GkeHub.prototype.createMembership = function createMembership(request, callback) { - return this.rpcCall(createMembership, $root.google.cloud.gkehub.v1.CreateMembershipRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateMembership" }); + RBACRoleBinding.prototype.role = null; /** - * Calls CreateMembership. - * @function createMembership - * @memberof google.cloud.gkehub.v1.GkeHub + * RBACRoleBinding labels. + * @member {Object.} labels + * @memberof google.cloud.gkehub.v1.RBACRoleBinding * @instance - * @param {google.cloud.gkehub.v1.ICreateMembershipRequest} request CreateMembershipRequest message or plain object - * @returns {Promise} Promise - * @variation 2 */ + RBACRoleBinding.prototype.labels = $util.emptyObject; - /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createFeature}. - * @memberof google.cloud.gkehub.v1.GkeHub - * @typedef CreateFeatureCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Calls CreateFeature. - * @function createFeature - * @memberof google.cloud.gkehub.v1.GkeHub + * RBACRoleBinding principal. + * @member {"user"|"group"|undefined} principal + * @memberof google.cloud.gkehub.v1.RBACRoleBinding * @instance - * @param {google.cloud.gkehub.v1.ICreateFeatureRequest} request CreateFeatureRequest message or plain object - * @param {google.cloud.gkehub.v1.GkeHub.CreateFeatureCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 */ - Object.defineProperty(GkeHub.prototype.createFeature = function createFeature(request, callback) { - return this.rpcCall(createFeature, $root.google.cloud.gkehub.v1.CreateFeatureRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateFeature" }); + Object.defineProperty(RBACRoleBinding.prototype, "principal", { + get: $util.oneOfGetter($oneOfFields = ["user", "group"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Calls CreateFeature. - * @function createFeature - * @memberof google.cloud.gkehub.v1.GkeHub - * @instance - * @param {google.cloud.gkehub.v1.ICreateFeatureRequest} request CreateFeatureRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a new RBACRoleBinding instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.RBACRoleBinding + * @static + * @param {google.cloud.gkehub.v1.IRBACRoleBinding=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.RBACRoleBinding} RBACRoleBinding instance */ + RBACRoleBinding.create = function create(properties) { + return new RBACRoleBinding(properties); + }; /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteMembership}. - * @memberof google.cloud.gkehub.v1.GkeHub - * @typedef DeleteMembershipCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified RBACRoleBinding message. Does not implicitly {@link google.cloud.gkehub.v1.RBACRoleBinding.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.RBACRoleBinding + * @static + * @param {google.cloud.gkehub.v1.IRBACRoleBinding} message RBACRoleBinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + RBACRoleBinding.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + $root.google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.encode(message.state, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.user != null && Object.hasOwnProperty.call(message, "user")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.user); + if (message.group != null && Object.hasOwnProperty.call(message, "group")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.group); + if (message.role != null && Object.hasOwnProperty.call(message, "role")) + $root.google.cloud.gkehub.v1.RBACRoleBinding.Role.encode(message.role, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + return writer; + }; /** - * Calls DeleteMembership. - * @function deleteMembership - * @memberof google.cloud.gkehub.v1.GkeHub - * @instance - * @param {google.cloud.gkehub.v1.IDeleteMembershipRequest} request DeleteMembershipRequest message or plain object - * @param {google.cloud.gkehub.v1.GkeHub.DeleteMembershipCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified RBACRoleBinding message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.RBACRoleBinding.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.RBACRoleBinding + * @static + * @param {google.cloud.gkehub.v1.IRBACRoleBinding} message RBACRoleBinding message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(GkeHub.prototype.deleteMembership = function deleteMembership(request, callback) { - return this.rpcCall(deleteMembership, $root.google.cloud.gkehub.v1.DeleteMembershipRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteMembership" }); + RBACRoleBinding.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls DeleteMembership. - * @function deleteMembership - * @memberof google.cloud.gkehub.v1.GkeHub - * @instance - * @param {google.cloud.gkehub.v1.IDeleteMembershipRequest} request DeleteMembershipRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes a RBACRoleBinding message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.RBACRoleBinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.RBACRoleBinding} RBACRoleBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + RBACRoleBinding.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.RBACRoleBinding(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 7: { + message.user = reader.string(); + break; + } + case 8: { + message.group = reader.string(); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.uid = reader.string(); + break; + } + case 3: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.state = $root.google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.decode(reader, reader.uint32()); + break; + } + case 9: { + message.role = $root.google.cloud.gkehub.v1.RBACRoleBinding.Role.decode(reader, reader.uint32()); + break; + } + case 10: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteFeature}. - * @memberof google.cloud.gkehub.v1.GkeHub - * @typedef DeleteFeatureCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Decodes a RBACRoleBinding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.RBACRoleBinding + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.RBACRoleBinding} RBACRoleBinding + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + RBACRoleBinding.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls DeleteFeature. - * @function deleteFeature - * @memberof google.cloud.gkehub.v1.GkeHub - * @instance - * @param {google.cloud.gkehub.v1.IDeleteFeatureRequest} request DeleteFeatureRequest message or plain object - * @param {google.cloud.gkehub.v1.GkeHub.DeleteFeatureCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Verifies a RBACRoleBinding message. + * @function verify + * @memberof google.cloud.gkehub.v1.RBACRoleBinding + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(GkeHub.prototype.deleteFeature = function deleteFeature(request, callback) { - return this.rpcCall(deleteFeature, $root.google.cloud.gkehub.v1.DeleteFeatureRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteFeature" }); + RBACRoleBinding.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.user != null && message.hasOwnProperty("user")) { + properties.principal = 1; + if (!$util.isString(message.user)) + return "user: string expected"; + } + if (message.group != null && message.hasOwnProperty("group")) { + if (properties.principal === 1) + return "principal: multiple values"; + properties.principal = 1; + if (!$util.isString(message.group)) + return "group: string expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) { + var error = $root.google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.verify(message.state); + if (error) + return "state." + error; + } + if (message.role != null && message.hasOwnProperty("role")) { + var error = $root.google.cloud.gkehub.v1.RBACRoleBinding.Role.verify(message.role); + if (error) + return "role." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; /** - * Calls DeleteFeature. - * @function deleteFeature - * @memberof google.cloud.gkehub.v1.GkeHub - * @instance - * @param {google.cloud.gkehub.v1.IDeleteFeatureRequest} request DeleteFeatureRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates a RBACRoleBinding message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.RBACRoleBinding + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.RBACRoleBinding} RBACRoleBinding */ + RBACRoleBinding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.RBACRoleBinding) + return object; + var message = new $root.google.cloud.gkehub.v1.RBACRoleBinding(); + if (object.user != null) + message.user = String(object.user); + if (object.group != null) + message.group = String(object.group); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.RBACRoleBinding.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.RBACRoleBinding.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.RBACRoleBinding.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + if (object.state != null) { + if (typeof object.state !== "object") + throw TypeError(".google.cloud.gkehub.v1.RBACRoleBinding.state: object expected"); + message.state = $root.google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.fromObject(object.state); + } + if (object.role != null) { + if (typeof object.role !== "object") + throw TypeError(".google.cloud.gkehub.v1.RBACRoleBinding.role: object expected"); + message.role = $root.google.cloud.gkehub.v1.RBACRoleBinding.Role.fromObject(object.role); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.gkehub.v1.RBACRoleBinding.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateMembership}. - * @memberof google.cloud.gkehub.v1.GkeHub - * @typedef UpdateMembershipCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Creates a plain object from a RBACRoleBinding message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.RBACRoleBinding + * @static + * @param {google.cloud.gkehub.v1.RBACRoleBinding} message RBACRoleBinding + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + RBACRoleBinding.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.deleteTime = null; + object.state = null; + object.role = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = $root.google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.toObject(message.state, options); + if (message.user != null && message.hasOwnProperty("user")) { + object.user = message.user; + if (options.oneofs) + object.principal = "user"; + } + if (message.group != null && message.hasOwnProperty("group")) { + object.group = message.group; + if (options.oneofs) + object.principal = "group"; + } + if (message.role != null && message.hasOwnProperty("role")) + object.role = $root.google.cloud.gkehub.v1.RBACRoleBinding.Role.toObject(message.role, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + return object; + }; /** - * Calls UpdateMembership. - * @function updateMembership - * @memberof google.cloud.gkehub.v1.GkeHub + * Converts this RBACRoleBinding to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.RBACRoleBinding * @instance - * @param {google.cloud.gkehub.v1.IUpdateMembershipRequest} request UpdateMembershipRequest message or plain object - * @param {google.cloud.gkehub.v1.GkeHub.UpdateMembershipCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(GkeHub.prototype.updateMembership = function updateMembership(request, callback) { - return this.rpcCall(updateMembership, $root.google.cloud.gkehub.v1.UpdateMembershipRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateMembership" }); + RBACRoleBinding.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls UpdateMembership. - * @function updateMembership - * @memberof google.cloud.gkehub.v1.GkeHub - * @instance - * @param {google.cloud.gkehub.v1.IUpdateMembershipRequest} request UpdateMembershipRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for RBACRoleBinding + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.RBACRoleBinding + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + RBACRoleBinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.RBACRoleBinding"; + }; - /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateFeature}. - * @memberof google.cloud.gkehub.v1.GkeHub - * @typedef UpdateFeatureCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ + RBACRoleBinding.Role = (function() { - /** - * Calls UpdateFeature. - * @function updateFeature - * @memberof google.cloud.gkehub.v1.GkeHub - * @instance - * @param {google.cloud.gkehub.v1.IUpdateFeatureRequest} request UpdateFeatureRequest message or plain object - * @param {google.cloud.gkehub.v1.GkeHub.UpdateFeatureCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(GkeHub.prototype.updateFeature = function updateFeature(request, callback) { - return this.rpcCall(updateFeature, $root.google.cloud.gkehub.v1.UpdateFeatureRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateFeature" }); + /** + * Properties of a Role. + * @memberof google.cloud.gkehub.v1.RBACRoleBinding + * @interface IRole + * @property {google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles|null} [predefinedRole] Role predefinedRole + * @property {string|null} [customRole] Role customRole + */ - /** - * Calls UpdateFeature. - * @function updateFeature - * @memberof google.cloud.gkehub.v1.GkeHub - * @instance - * @param {google.cloud.gkehub.v1.IUpdateFeatureRequest} request UpdateFeatureRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Constructs a new Role. + * @memberof google.cloud.gkehub.v1.RBACRoleBinding + * @classdesc Represents a Role. + * @implements IRole + * @constructor + * @param {google.cloud.gkehub.v1.RBACRoleBinding.IRole=} [properties] Properties to set + */ + function Role(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|generateConnectManifest}. - * @memberof google.cloud.gkehub.v1.GkeHub - * @typedef GenerateConnectManifestCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.gkehub.v1.GenerateConnectManifestResponse} [response] GenerateConnectManifestResponse - */ + /** + * Role predefinedRole. + * @member {google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles} predefinedRole + * @memberof google.cloud.gkehub.v1.RBACRoleBinding.Role + * @instance + */ + Role.prototype.predefinedRole = 0; - /** - * Calls GenerateConnectManifest. - * @function generateConnectManifest - * @memberof google.cloud.gkehub.v1.GkeHub - * @instance - * @param {google.cloud.gkehub.v1.IGenerateConnectManifestRequest} request GenerateConnectManifestRequest message or plain object - * @param {google.cloud.gkehub.v1.GkeHub.GenerateConnectManifestCallback} callback Node-style callback called with the error, if any, and GenerateConnectManifestResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(GkeHub.prototype.generateConnectManifest = function generateConnectManifest(request, callback) { - return this.rpcCall(generateConnectManifest, $root.google.cloud.gkehub.v1.GenerateConnectManifestRequest, $root.google.cloud.gkehub.v1.GenerateConnectManifestResponse, request, callback); - }, "name", { value: "GenerateConnectManifest" }); + /** + * Role customRole. + * @member {string} customRole + * @memberof google.cloud.gkehub.v1.RBACRoleBinding.Role + * @instance + */ + Role.prototype.customRole = ""; - /** - * Calls GenerateConnectManifest. - * @function generateConnectManifest - * @memberof google.cloud.gkehub.v1.GkeHub - * @instance - * @param {google.cloud.gkehub.v1.IGenerateConnectManifestRequest} request GenerateConnectManifestRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ + /** + * Creates a new Role instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.RBACRoleBinding.Role + * @static + * @param {google.cloud.gkehub.v1.RBACRoleBinding.IRole=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.RBACRoleBinding.Role} Role instance + */ + Role.create = function create(properties) { + return new Role(properties); + }; - return GkeHub; + /** + * Encodes the specified Role message. Does not implicitly {@link google.cloud.gkehub.v1.RBACRoleBinding.Role.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.RBACRoleBinding.Role + * @static + * @param {google.cloud.gkehub.v1.RBACRoleBinding.IRole} message Role message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Role.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.predefinedRole != null && Object.hasOwnProperty.call(message, "predefinedRole")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.predefinedRole); + if (message.customRole != null && Object.hasOwnProperty.call(message, "customRole")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.customRole); + return writer; + }; + + /** + * Encodes the specified Role message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.RBACRoleBinding.Role.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.RBACRoleBinding.Role + * @static + * @param {google.cloud.gkehub.v1.RBACRoleBinding.IRole} message Role message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Role.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Role message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.RBACRoleBinding.Role + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.RBACRoleBinding.Role} Role + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Role.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.RBACRoleBinding.Role(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.predefinedRole = reader.int32(); + break; + } + case 2: { + message.customRole = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Role message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.RBACRoleBinding.Role + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.RBACRoleBinding.Role} Role + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Role.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Role message. + * @function verify + * @memberof google.cloud.gkehub.v1.RBACRoleBinding.Role + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Role.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.predefinedRole != null && message.hasOwnProperty("predefinedRole")) + switch (message.predefinedRole) { + default: + return "predefinedRole: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.customRole != null && message.hasOwnProperty("customRole")) + if (!$util.isString(message.customRole)) + return "customRole: string expected"; + return null; + }; + + /** + * Creates a Role message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.RBACRoleBinding.Role + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.RBACRoleBinding.Role} Role + */ + Role.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.RBACRoleBinding.Role) + return object; + var message = new $root.google.cloud.gkehub.v1.RBACRoleBinding.Role(); + switch (object.predefinedRole) { + default: + if (typeof object.predefinedRole === "number") { + message.predefinedRole = object.predefinedRole; + break; + } + break; + case "UNKNOWN": + case 0: + message.predefinedRole = 0; + break; + case "ADMIN": + case 1: + message.predefinedRole = 1; + break; + case "EDIT": + case 2: + message.predefinedRole = 2; + break; + case "VIEW": + case 3: + message.predefinedRole = 3; + break; + case "ANTHOS_SUPPORT": + case 4: + message.predefinedRole = 4; + break; + } + if (object.customRole != null) + message.customRole = String(object.customRole); + return message; + }; + + /** + * Creates a plain object from a Role message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.RBACRoleBinding.Role + * @static + * @param {google.cloud.gkehub.v1.RBACRoleBinding.Role} message Role + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Role.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.predefinedRole = options.enums === String ? "UNKNOWN" : 0; + object.customRole = ""; + } + if (message.predefinedRole != null && message.hasOwnProperty("predefinedRole")) + object.predefinedRole = options.enums === String ? $root.google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles[message.predefinedRole] === undefined ? message.predefinedRole : $root.google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles[message.predefinedRole] : message.predefinedRole; + if (message.customRole != null && message.hasOwnProperty("customRole")) + object.customRole = message.customRole; + return object; + }; + + /** + * Converts this Role to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.RBACRoleBinding.Role + * @instance + * @returns {Object.} JSON object + */ + Role.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Role + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.RBACRoleBinding.Role + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Role.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.RBACRoleBinding.Role"; + }; + + /** + * PredefinedRoles enum. + * @name google.cloud.gkehub.v1.RBACRoleBinding.Role.PredefinedRoles + * @enum {number} + * @property {number} UNKNOWN=0 UNKNOWN value + * @property {number} ADMIN=1 ADMIN value + * @property {number} EDIT=2 EDIT value + * @property {number} VIEW=3 VIEW value + * @property {number} ANTHOS_SUPPORT=4 ANTHOS_SUPPORT value + */ + Role.PredefinedRoles = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UNKNOWN"] = 0; + values[valuesById[1] = "ADMIN"] = 1; + values[valuesById[2] = "EDIT"] = 2; + values[valuesById[3] = "VIEW"] = 3; + values[valuesById[4] = "ANTHOS_SUPPORT"] = 4; + return values; + })(); + + return Role; + })(); + + return RBACRoleBinding; })(); - v1.ListMembershipsRequest = (function() { + v1.RBACRoleBindingLifecycleState = (function() { /** - * Properties of a ListMembershipsRequest. + * Properties of a RBACRoleBindingLifecycleState. * @memberof google.cloud.gkehub.v1 - * @interface IListMembershipsRequest - * @property {string|null} [parent] ListMembershipsRequest parent - * @property {number|null} [pageSize] ListMembershipsRequest pageSize - * @property {string|null} [pageToken] ListMembershipsRequest pageToken - * @property {string|null} [filter] ListMembershipsRequest filter - * @property {string|null} [orderBy] ListMembershipsRequest orderBy + * @interface IRBACRoleBindingLifecycleState + * @property {google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code|null} [code] RBACRoleBindingLifecycleState code */ /** - * Constructs a new ListMembershipsRequest. + * Constructs a new RBACRoleBindingLifecycleState. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a ListMembershipsRequest. - * @implements IListMembershipsRequest + * @classdesc Represents a RBACRoleBindingLifecycleState. + * @implements IRBACRoleBindingLifecycleState * @constructor - * @param {google.cloud.gkehub.v1.IListMembershipsRequest=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IRBACRoleBindingLifecycleState=} [properties] Properties to set */ - function ListMembershipsRequest(properties) { + function RBACRoleBindingLifecycleState(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43189,133 +44103,77 @@ } /** - * ListMembershipsRequest parent. - * @member {string} parent - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * RBACRoleBindingLifecycleState code. + * @member {google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code} code + * @memberof google.cloud.gkehub.v1.RBACRoleBindingLifecycleState * @instance */ - ListMembershipsRequest.prototype.parent = ""; + RBACRoleBindingLifecycleState.prototype.code = 0; /** - * ListMembershipsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest - * @instance + * Creates a new RBACRoleBindingLifecycleState instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.RBACRoleBindingLifecycleState + * @static + * @param {google.cloud.gkehub.v1.IRBACRoleBindingLifecycleState=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.RBACRoleBindingLifecycleState} RBACRoleBindingLifecycleState instance */ - ListMembershipsRequest.prototype.pageSize = 0; + RBACRoleBindingLifecycleState.create = function create(properties) { + return new RBACRoleBindingLifecycleState(properties); + }; /** - * ListMembershipsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest - * @instance - */ - ListMembershipsRequest.prototype.pageToken = ""; - - /** - * ListMembershipsRequest filter. - * @member {string} filter - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest - * @instance - */ - ListMembershipsRequest.prototype.filter = ""; - - /** - * ListMembershipsRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest - * @instance - */ - ListMembershipsRequest.prototype.orderBy = ""; - - /** - * Creates a new ListMembershipsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest - * @static - * @param {google.cloud.gkehub.v1.IListMembershipsRequest=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.ListMembershipsRequest} ListMembershipsRequest instance - */ - ListMembershipsRequest.create = function create(properties) { - return new ListMembershipsRequest(properties); - }; - - /** - * Encodes the specified ListMembershipsRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsRequest.verify|verify} messages. + * Encodes the specified RBACRoleBindingLifecycleState message. Does not implicitly {@link google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @memberof google.cloud.gkehub.v1.RBACRoleBindingLifecycleState * @static - * @param {google.cloud.gkehub.v1.IListMembershipsRequest} message ListMembershipsRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IRBACRoleBindingLifecycleState} message RBACRoleBindingLifecycleState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMembershipsRequest.encode = function encode(message, writer) { + RBACRoleBindingLifecycleState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); return writer; }; /** - * Encodes the specified ListMembershipsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsRequest.verify|verify} messages. + * Encodes the specified RBACRoleBindingLifecycleState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @memberof google.cloud.gkehub.v1.RBACRoleBindingLifecycleState * @static - * @param {google.cloud.gkehub.v1.IListMembershipsRequest} message ListMembershipsRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IRBACRoleBindingLifecycleState} message RBACRoleBindingLifecycleState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMembershipsRequest.encodeDelimited = function encodeDelimited(message, writer) { + RBACRoleBindingLifecycleState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMembershipsRequest message from the specified reader or buffer. + * Decodes a RBACRoleBindingLifecycleState message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @memberof google.cloud.gkehub.v1.RBACRoleBindingLifecycleState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.ListMembershipsRequest} ListMembershipsRequest + * @returns {google.cloud.gkehub.v1.RBACRoleBindingLifecycleState} RBACRoleBindingLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMembershipsRequest.decode = function decode(reader, length, error) { + RBACRoleBindingLifecycleState.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListMembershipsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.RBACRoleBindingLifecycleState(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.code = reader.int32(); break; } default: @@ -43327,159 +44185,185 @@ }; /** - * Decodes a ListMembershipsRequest message from the specified reader or buffer, length delimited. + * Decodes a RBACRoleBindingLifecycleState message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @memberof google.cloud.gkehub.v1.RBACRoleBindingLifecycleState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.ListMembershipsRequest} ListMembershipsRequest + * @returns {google.cloud.gkehub.v1.RBACRoleBindingLifecycleState} RBACRoleBindingLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMembershipsRequest.decodeDelimited = function decodeDelimited(reader) { + RBACRoleBindingLifecycleState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMembershipsRequest message. + * Verifies a RBACRoleBindingLifecycleState message. * @function verify - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @memberof google.cloud.gkehub.v1.RBACRoleBindingLifecycleState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMembershipsRequest.verify = function verify(message) { + RBACRoleBindingLifecycleState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; /** - * Creates a ListMembershipsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a RBACRoleBindingLifecycleState message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @memberof google.cloud.gkehub.v1.RBACRoleBindingLifecycleState * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.ListMembershipsRequest} ListMembershipsRequest + * @returns {google.cloud.gkehub.v1.RBACRoleBindingLifecycleState} RBACRoleBindingLifecycleState */ - ListMembershipsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.ListMembershipsRequest) + RBACRoleBindingLifecycleState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.RBACRoleBindingLifecycleState) return object; - var message = new $root.google.cloud.gkehub.v1.ListMembershipsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.gkehub.v1.RBACRoleBindingLifecycleState(); + switch (object.code) { + default: + if (typeof object.code === "number") { + message.code = object.code; + break; + } + break; + case "CODE_UNSPECIFIED": + case 0: + message.code = 0; + break; + case "CREATING": + case 1: + message.code = 1; + break; + case "READY": + case 2: + message.code = 2; + break; + case "DELETING": + case 3: + message.code = 3; + break; + case "UPDATING": + case 4: + message.code = 4; + break; + } return message; }; /** - * Creates a plain object from a ListMembershipsRequest message. Also converts values to other types if specified. + * Creates a plain object from a RBACRoleBindingLifecycleState message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @memberof google.cloud.gkehub.v1.RBACRoleBindingLifecycleState * @static - * @param {google.cloud.gkehub.v1.ListMembershipsRequest} message ListMembershipsRequest + * @param {google.cloud.gkehub.v1.RBACRoleBindingLifecycleState} message RBACRoleBindingLifecycleState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMembershipsRequest.toObject = function toObject(message, options) { + RBACRoleBindingLifecycleState.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (options.defaults) + object.code = options.enums === String ? "CODE_UNSPECIFIED" : 0; + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code[message.code] === undefined ? message.code : $root.google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code[message.code] : message.code; return object; }; /** - * Converts this ListMembershipsRequest to JSON. + * Converts this RBACRoleBindingLifecycleState to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @memberof google.cloud.gkehub.v1.RBACRoleBindingLifecycleState * @instance * @returns {Object.} JSON object */ - ListMembershipsRequest.prototype.toJSON = function toJSON() { + RBACRoleBindingLifecycleState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListMembershipsRequest + * Gets the default type url for RBACRoleBindingLifecycleState * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @memberof google.cloud.gkehub.v1.RBACRoleBindingLifecycleState * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListMembershipsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RBACRoleBindingLifecycleState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.ListMembershipsRequest"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.RBACRoleBindingLifecycleState"; }; - return ListMembershipsRequest; + /** + * Code enum. + * @name google.cloud.gkehub.v1.RBACRoleBindingLifecycleState.Code + * @enum {number} + * @property {number} CODE_UNSPECIFIED=0 CODE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value + */ + RBACRoleBindingLifecycleState.Code = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + return values; + })(); + + return RBACRoleBindingLifecycleState; })(); - v1.ListMembershipsResponse = (function() { + v1.Scope = (function() { /** - * Properties of a ListMembershipsResponse. + * Properties of a Scope. * @memberof google.cloud.gkehub.v1 - * @interface IListMembershipsResponse - * @property {Array.|null} [resources] ListMembershipsResponse resources - * @property {string|null} [nextPageToken] ListMembershipsResponse nextPageToken - * @property {Array.|null} [unreachable] ListMembershipsResponse unreachable + * @interface IScope + * @property {string|null} [name] Scope name + * @property {string|null} [uid] Scope uid + * @property {google.protobuf.ITimestamp|null} [createTime] Scope createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Scope updateTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] Scope deleteTime + * @property {google.cloud.gkehub.v1.IScopeLifecycleState|null} [state] Scope state + * @property {Object.|null} [namespaceLabels] Scope namespaceLabels + * @property {Object.|null} [labels] Scope labels */ /** - * Constructs a new ListMembershipsResponse. + * Constructs a new Scope. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a ListMembershipsResponse. - * @implements IListMembershipsResponse + * @classdesc Represents a Scope. + * @implements IScope * @constructor - * @param {google.cloud.gkehub.v1.IListMembershipsResponse=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IScope=} [properties] Properties to set */ - function ListMembershipsResponse(properties) { - this.resources = []; - this.unreachable = []; + function Scope(properties) { + this.namespaceLabels = {}; + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43487,111 +44371,215 @@ } /** - * ListMembershipsResponse resources. - * @member {Array.} resources - * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * Scope name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.Scope * @instance */ - ListMembershipsResponse.prototype.resources = $util.emptyArray; + Scope.prototype.name = ""; /** - * ListMembershipsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * Scope uid. + * @member {string} uid + * @memberof google.cloud.gkehub.v1.Scope * @instance */ - ListMembershipsResponse.prototype.nextPageToken = ""; + Scope.prototype.uid = ""; /** - * ListMembershipsResponse unreachable. - * @member {Array.} unreachable - * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * Scope createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.gkehub.v1.Scope * @instance */ - ListMembershipsResponse.prototype.unreachable = $util.emptyArray; + Scope.prototype.createTime = null; /** - * Creates a new ListMembershipsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.gkehub.v1.ListMembershipsResponse - * @static - * @param {google.cloud.gkehub.v1.IListMembershipsResponse=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.ListMembershipsResponse} ListMembershipsResponse instance + * Scope updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.gkehub.v1.Scope + * @instance */ - ListMembershipsResponse.create = function create(properties) { - return new ListMembershipsResponse(properties); - }; + Scope.prototype.updateTime = null; /** - * Encodes the specified ListMembershipsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.gkehub.v1.ListMembershipsResponse - * @static - * @param {google.cloud.gkehub.v1.IListMembershipsResponse} message ListMembershipsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Scope deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.cloud.gkehub.v1.Scope + * @instance */ - ListMembershipsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resources != null && message.resources.length) - for (var i = 0; i < message.resources.length; ++i) - $root.google.cloud.gkehub.v1.Membership.encode(message.resources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - if (message.unreachable != null && message.unreachable.length) - for (var i = 0; i < message.unreachable.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + Scope.prototype.deleteTime = null; + + /** + * Scope state. + * @member {google.cloud.gkehub.v1.IScopeLifecycleState|null|undefined} state + * @memberof google.cloud.gkehub.v1.Scope + * @instance + */ + Scope.prototype.state = null; + + /** + * Scope namespaceLabels. + * @member {Object.} namespaceLabels + * @memberof google.cloud.gkehub.v1.Scope + * @instance + */ + Scope.prototype.namespaceLabels = $util.emptyObject; + + /** + * Scope labels. + * @member {Object.} labels + * @memberof google.cloud.gkehub.v1.Scope + * @instance + */ + Scope.prototype.labels = $util.emptyObject; + + /** + * Creates a new Scope instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.Scope + * @static + * @param {google.cloud.gkehub.v1.IScope=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.Scope} Scope instance + */ + Scope.create = function create(properties) { + return new Scope(properties); + }; + + /** + * Encodes the specified Scope message. Does not implicitly {@link google.cloud.gkehub.v1.Scope.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.Scope + * @static + * @param {google.cloud.gkehub.v1.IScope} message Scope message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Scope.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + $root.google.cloud.gkehub.v1.ScopeLifecycleState.encode(message.state, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.namespaceLabels != null && Object.hasOwnProperty.call(message, "namespaceLabels")) + for (var keys = Object.keys(message.namespaceLabels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.namespaceLabels[keys[i]]).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified ListMembershipsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsResponse.verify|verify} messages. + * Encodes the specified Scope message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Scope.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @memberof google.cloud.gkehub.v1.Scope * @static - * @param {google.cloud.gkehub.v1.IListMembershipsResponse} message ListMembershipsResponse message or plain object to encode + * @param {google.cloud.gkehub.v1.IScope} message Scope message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListMembershipsResponse.encodeDelimited = function encodeDelimited(message, writer) { + Scope.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListMembershipsResponse message from the specified reader or buffer. + * Decodes a Scope message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @memberof google.cloud.gkehub.v1.Scope * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.ListMembershipsResponse} ListMembershipsResponse + * @returns {google.cloud.gkehub.v1.Scope} Scope * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMembershipsResponse.decode = function decode(reader, length, error) { + Scope.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListMembershipsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.Scope(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.resources && message.resources.length)) - message.resources = []; - message.resources.push($root.google.cloud.gkehub.v1.Membership.decode(reader, reader.uint32())); + message.name = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.uid = reader.string(); break; } case 3: { - if (!(message.unreachable && message.unreachable.length)) - message.unreachable = []; - message.unreachable.push(reader.string()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 4: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.state = $root.google.cloud.gkehub.v1.ScopeLifecycleState.decode(reader, reader.uint32()); + break; + } + case 8: { + if (message.namespaceLabels === $util.emptyObject) + message.namespaceLabels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.namespaceLabels[key] = value; + break; + } + case 9: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; break; } default: @@ -43603,169 +44591,228 @@ }; /** - * Decodes a ListMembershipsResponse message from the specified reader or buffer, length delimited. + * Decodes a Scope message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @memberof google.cloud.gkehub.v1.Scope * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.ListMembershipsResponse} ListMembershipsResponse + * @returns {google.cloud.gkehub.v1.Scope} Scope * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListMembershipsResponse.decodeDelimited = function decodeDelimited(reader) { + Scope.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListMembershipsResponse message. + * Verifies a Scope message. * @function verify - * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @memberof google.cloud.gkehub.v1.Scope * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListMembershipsResponse.verify = function verify(message) { + Scope.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resources != null && message.hasOwnProperty("resources")) { - if (!Array.isArray(message.resources)) - return "resources: array expected"; - for (var i = 0; i < message.resources.length; ++i) { - var error = $root.google.cloud.gkehub.v1.Membership.verify(message.resources[i]); - if (error) - return "resources." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.unreachable != null && message.hasOwnProperty("unreachable")) { - if (!Array.isArray(message.unreachable)) - return "unreachable: array expected"; - for (var i = 0; i < message.unreachable.length; ++i) - if (!$util.isString(message.unreachable[i])) - return "unreachable: string[] expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) { + var error = $root.google.cloud.gkehub.v1.ScopeLifecycleState.verify(message.state); + if (error) + return "state." + error; + } + if (message.namespaceLabels != null && message.hasOwnProperty("namespaceLabels")) { + if (!$util.isObject(message.namespaceLabels)) + return "namespaceLabels: object expected"; + var key = Object.keys(message.namespaceLabels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.namespaceLabels[key[i]])) + return "namespaceLabels: string{k:string} expected"; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } return null; }; /** - * Creates a ListMembershipsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a Scope message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @memberof google.cloud.gkehub.v1.Scope * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.ListMembershipsResponse} ListMembershipsResponse + * @returns {google.cloud.gkehub.v1.Scope} Scope */ - ListMembershipsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.ListMembershipsResponse) + Scope.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.Scope) return object; - var message = new $root.google.cloud.gkehub.v1.ListMembershipsResponse(); - if (object.resources) { - if (!Array.isArray(object.resources)) - throw TypeError(".google.cloud.gkehub.v1.ListMembershipsResponse.resources: array expected"); - message.resources = []; - for (var i = 0; i < object.resources.length; ++i) { - if (typeof object.resources[i] !== "object") - throw TypeError(".google.cloud.gkehub.v1.ListMembershipsResponse.resources: object expected"); - message.resources[i] = $root.google.cloud.gkehub.v1.Membership.fromObject(object.resources[i]); - } + var message = new $root.google.cloud.gkehub.v1.Scope(); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.Scope.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.unreachable) { - if (!Array.isArray(object.unreachable)) - throw TypeError(".google.cloud.gkehub.v1.ListMembershipsResponse.unreachable: array expected"); - message.unreachable = []; - for (var i = 0; i < object.unreachable.length; ++i) - message.unreachable[i] = String(object.unreachable[i]); + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.Scope.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.Scope.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + if (object.state != null) { + if (typeof object.state !== "object") + throw TypeError(".google.cloud.gkehub.v1.Scope.state: object expected"); + message.state = $root.google.cloud.gkehub.v1.ScopeLifecycleState.fromObject(object.state); + } + if (object.namespaceLabels) { + if (typeof object.namespaceLabels !== "object") + throw TypeError(".google.cloud.gkehub.v1.Scope.namespaceLabels: object expected"); + message.namespaceLabels = {}; + for (var keys = Object.keys(object.namespaceLabels), i = 0; i < keys.length; ++i) + message.namespaceLabels[keys[i]] = String(object.namespaceLabels[keys[i]]); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.gkehub.v1.Scope.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } return message; }; /** - * Creates a plain object from a ListMembershipsResponse message. Also converts values to other types if specified. + * Creates a plain object from a Scope message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @memberof google.cloud.gkehub.v1.Scope * @static - * @param {google.cloud.gkehub.v1.ListMembershipsResponse} message ListMembershipsResponse + * @param {google.cloud.gkehub.v1.Scope} message Scope * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListMembershipsResponse.toObject = function toObject(message, options) { + Scope.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.resources = []; - object.unreachable = []; + if (options.objects || options.defaults) { + object.namespaceLabels = {}; + object.labels = {}; } - if (options.defaults) - object.nextPageToken = ""; - if (message.resources && message.resources.length) { - object.resources = []; - for (var j = 0; j < message.resources.length; ++j) - object.resources[j] = $root.google.cloud.gkehub.v1.Membership.toObject(message.resources[j], options); + if (options.defaults) { + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.deleteTime = null; + object.state = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.unreachable && message.unreachable.length) { - object.unreachable = []; - for (var j = 0; j < message.unreachable.length; ++j) - object.unreachable[j] = message.unreachable[j]; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = $root.google.cloud.gkehub.v1.ScopeLifecycleState.toObject(message.state, options); + var keys2; + if (message.namespaceLabels && (keys2 = Object.keys(message.namespaceLabels)).length) { + object.namespaceLabels = {}; + for (var j = 0; j < keys2.length; ++j) + object.namespaceLabels[keys2[j]] = message.namespaceLabels[keys2[j]]; + } + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } return object; }; /** - * Converts this ListMembershipsResponse to JSON. + * Converts this Scope to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @memberof google.cloud.gkehub.v1.Scope * @instance * @returns {Object.} JSON object */ - ListMembershipsResponse.prototype.toJSON = function toJSON() { + Scope.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListMembershipsResponse + * Gets the default type url for Scope * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @memberof google.cloud.gkehub.v1.Scope * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListMembershipsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Scope.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.ListMembershipsResponse"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.Scope"; }; - return ListMembershipsResponse; + return Scope; })(); - v1.GetMembershipRequest = (function() { + v1.ScopeLifecycleState = (function() { /** - * Properties of a GetMembershipRequest. + * Properties of a ScopeLifecycleState. * @memberof google.cloud.gkehub.v1 - * @interface IGetMembershipRequest - * @property {string|null} [name] GetMembershipRequest name + * @interface IScopeLifecycleState + * @property {google.cloud.gkehub.v1.ScopeLifecycleState.Code|null} [code] ScopeLifecycleState code */ /** - * Constructs a new GetMembershipRequest. + * Constructs a new ScopeLifecycleState. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a GetMembershipRequest. - * @implements IGetMembershipRequest + * @classdesc Represents a ScopeLifecycleState. + * @implements IScopeLifecycleState * @constructor - * @param {google.cloud.gkehub.v1.IGetMembershipRequest=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IScopeLifecycleState=} [properties] Properties to set */ - function GetMembershipRequest(properties) { + function ScopeLifecycleState(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43773,77 +44820,77 @@ } /** - * GetMembershipRequest name. - * @member {string} name - * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * ScopeLifecycleState code. + * @member {google.cloud.gkehub.v1.ScopeLifecycleState.Code} code + * @memberof google.cloud.gkehub.v1.ScopeLifecycleState * @instance */ - GetMembershipRequest.prototype.name = ""; + ScopeLifecycleState.prototype.code = 0; /** - * Creates a new GetMembershipRequest instance using the specified properties. + * Creates a new ScopeLifecycleState instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @memberof google.cloud.gkehub.v1.ScopeLifecycleState * @static - * @param {google.cloud.gkehub.v1.IGetMembershipRequest=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.GetMembershipRequest} GetMembershipRequest instance + * @param {google.cloud.gkehub.v1.IScopeLifecycleState=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ScopeLifecycleState} ScopeLifecycleState instance */ - GetMembershipRequest.create = function create(properties) { - return new GetMembershipRequest(properties); + ScopeLifecycleState.create = function create(properties) { + return new ScopeLifecycleState(properties); }; /** - * Encodes the specified GetMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipRequest.verify|verify} messages. + * Encodes the specified ScopeLifecycleState message. Does not implicitly {@link google.cloud.gkehub.v1.ScopeLifecycleState.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @memberof google.cloud.gkehub.v1.ScopeLifecycleState * @static - * @param {google.cloud.gkehub.v1.IGetMembershipRequest} message GetMembershipRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IScopeLifecycleState} message ScopeLifecycleState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMembershipRequest.encode = function encode(message, writer) { + ScopeLifecycleState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); return writer; }; /** - * Encodes the specified GetMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipRequest.verify|verify} messages. + * Encodes the specified ScopeLifecycleState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ScopeLifecycleState.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @memberof google.cloud.gkehub.v1.ScopeLifecycleState * @static - * @param {google.cloud.gkehub.v1.IGetMembershipRequest} message GetMembershipRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IScopeLifecycleState} message ScopeLifecycleState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetMembershipRequest.encodeDelimited = function encodeDelimited(message, writer) { + ScopeLifecycleState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetMembershipRequest message from the specified reader or buffer. + * Decodes a ScopeLifecycleState message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @memberof google.cloud.gkehub.v1.ScopeLifecycleState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.GetMembershipRequest} GetMembershipRequest + * @returns {google.cloud.gkehub.v1.ScopeLifecycleState} ScopeLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMembershipRequest.decode = function decode(reader, length, error) { + ScopeLifecycleState.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GetMembershipRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ScopeLifecycleState(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.code = reader.int32(); break; } default: @@ -43855,125 +44902,184 @@ }; /** - * Decodes a GetMembershipRequest message from the specified reader or buffer, length delimited. + * Decodes a ScopeLifecycleState message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @memberof google.cloud.gkehub.v1.ScopeLifecycleState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.GetMembershipRequest} GetMembershipRequest + * @returns {google.cloud.gkehub.v1.ScopeLifecycleState} ScopeLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetMembershipRequest.decodeDelimited = function decodeDelimited(reader) { + ScopeLifecycleState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetMembershipRequest message. + * Verifies a ScopeLifecycleState message. * @function verify - * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @memberof google.cloud.gkehub.v1.ScopeLifecycleState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetMembershipRequest.verify = function verify(message) { + ScopeLifecycleState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; /** - * Creates a GetMembershipRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ScopeLifecycleState message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @memberof google.cloud.gkehub.v1.ScopeLifecycleState * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.GetMembershipRequest} GetMembershipRequest + * @returns {google.cloud.gkehub.v1.ScopeLifecycleState} ScopeLifecycleState */ - GetMembershipRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.GetMembershipRequest) + ScopeLifecycleState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ScopeLifecycleState) return object; - var message = new $root.google.cloud.gkehub.v1.GetMembershipRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.gkehub.v1.ScopeLifecycleState(); + switch (object.code) { + default: + if (typeof object.code === "number") { + message.code = object.code; + break; + } + break; + case "CODE_UNSPECIFIED": + case 0: + message.code = 0; + break; + case "CREATING": + case 1: + message.code = 1; + break; + case "READY": + case 2: + message.code = 2; + break; + case "DELETING": + case 3: + message.code = 3; + break; + case "UPDATING": + case 4: + message.code = 4; + break; + } return message; }; /** - * Creates a plain object from a GetMembershipRequest message. Also converts values to other types if specified. + * Creates a plain object from a ScopeLifecycleState message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @memberof google.cloud.gkehub.v1.ScopeLifecycleState * @static - * @param {google.cloud.gkehub.v1.GetMembershipRequest} message GetMembershipRequest + * @param {google.cloud.gkehub.v1.ScopeLifecycleState} message ScopeLifecycleState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetMembershipRequest.toObject = function toObject(message, options) { + ScopeLifecycleState.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.code = options.enums === String ? "CODE_UNSPECIFIED" : 0; + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.google.cloud.gkehub.v1.ScopeLifecycleState.Code[message.code] === undefined ? message.code : $root.google.cloud.gkehub.v1.ScopeLifecycleState.Code[message.code] : message.code; return object; }; /** - * Converts this GetMembershipRequest to JSON. + * Converts this ScopeLifecycleState to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @memberof google.cloud.gkehub.v1.ScopeLifecycleState * @instance * @returns {Object.} JSON object */ - GetMembershipRequest.prototype.toJSON = function toJSON() { + ScopeLifecycleState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetMembershipRequest + * Gets the default type url for ScopeLifecycleState * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @memberof google.cloud.gkehub.v1.ScopeLifecycleState * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetMembershipRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ScopeLifecycleState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.GetMembershipRequest"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.ScopeLifecycleState"; }; - return GetMembershipRequest; + /** + * Code enum. + * @name google.cloud.gkehub.v1.ScopeLifecycleState.Code + * @enum {number} + * @property {number} CODE_UNSPECIFIED=0 CODE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value + */ + ScopeLifecycleState.Code = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + return values; + })(); + + return ScopeLifecycleState; })(); - v1.CreateMembershipRequest = (function() { + v1.MembershipBinding = (function() { /** - * Properties of a CreateMembershipRequest. + * Properties of a MembershipBinding. * @memberof google.cloud.gkehub.v1 - * @interface ICreateMembershipRequest - * @property {string|null} [parent] CreateMembershipRequest parent - * @property {string|null} [membershipId] CreateMembershipRequest membershipId - * @property {google.cloud.gkehub.v1.IMembership|null} [resource] CreateMembershipRequest resource - * @property {string|null} [requestId] CreateMembershipRequest requestId + * @interface IMembershipBinding + * @property {string|null} [scope] MembershipBinding scope + * @property {string|null} [name] MembershipBinding name + * @property {string|null} [uid] MembershipBinding uid + * @property {google.protobuf.ITimestamp|null} [createTime] MembershipBinding createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] MembershipBinding updateTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] MembershipBinding deleteTime + * @property {google.cloud.gkehub.v1.IMembershipBindingLifecycleState|null} [state] MembershipBinding state + * @property {Object.|null} [labels] MembershipBinding labels */ /** - * Constructs a new CreateMembershipRequest. + * Constructs a new MembershipBinding. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a CreateMembershipRequest. - * @implements ICreateMembershipRequest + * @classdesc Represents a MembershipBinding. + * @implements IMembershipBinding * @constructor - * @param {google.cloud.gkehub.v1.ICreateMembershipRequest=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IMembershipBinding=} [properties] Properties to set */ - function CreateMembershipRequest(properties) { + function MembershipBinding(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -43981,278 +45087,433 @@ } /** - * CreateMembershipRequest parent. - * @member {string} parent - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * MembershipBinding scope. + * @member {string|null|undefined} scope + * @memberof google.cloud.gkehub.v1.MembershipBinding * @instance */ - CreateMembershipRequest.prototype.parent = ""; + MembershipBinding.prototype.scope = null; /** - * CreateMembershipRequest membershipId. - * @member {string} membershipId - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * MembershipBinding name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.MembershipBinding * @instance */ - CreateMembershipRequest.prototype.membershipId = ""; + MembershipBinding.prototype.name = ""; /** - * CreateMembershipRequest resource. - * @member {google.cloud.gkehub.v1.IMembership|null|undefined} resource - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * MembershipBinding uid. + * @member {string} uid + * @memberof google.cloud.gkehub.v1.MembershipBinding * @instance */ - CreateMembershipRequest.prototype.resource = null; + MembershipBinding.prototype.uid = ""; /** - * CreateMembershipRequest requestId. - * @member {string} requestId - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * MembershipBinding createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.gkehub.v1.MembershipBinding * @instance */ - CreateMembershipRequest.prototype.requestId = ""; + MembershipBinding.prototype.createTime = null; /** - * Creates a new CreateMembershipRequest instance using the specified properties. + * MembershipBinding updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.gkehub.v1.MembershipBinding + * @instance + */ + MembershipBinding.prototype.updateTime = null; + + /** + * MembershipBinding deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.cloud.gkehub.v1.MembershipBinding + * @instance + */ + MembershipBinding.prototype.deleteTime = null; + + /** + * MembershipBinding state. + * @member {google.cloud.gkehub.v1.IMembershipBindingLifecycleState|null|undefined} state + * @memberof google.cloud.gkehub.v1.MembershipBinding + * @instance + */ + MembershipBinding.prototype.state = null; + + /** + * MembershipBinding labels. + * @member {Object.} labels + * @memberof google.cloud.gkehub.v1.MembershipBinding + * @instance + */ + MembershipBinding.prototype.labels = $util.emptyObject; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MembershipBinding target. + * @member {"scope"|undefined} target + * @memberof google.cloud.gkehub.v1.MembershipBinding + * @instance + */ + Object.defineProperty(MembershipBinding.prototype, "target", { + get: $util.oneOfGetter($oneOfFields = ["scope"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MembershipBinding instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBinding * @static - * @param {google.cloud.gkehub.v1.ICreateMembershipRequest=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.CreateMembershipRequest} CreateMembershipRequest instance + * @param {google.cloud.gkehub.v1.IMembershipBinding=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.MembershipBinding} MembershipBinding instance */ - CreateMembershipRequest.create = function create(properties) { - return new CreateMembershipRequest(properties); + MembershipBinding.create = function create(properties) { + return new MembershipBinding(properties); }; /** - * Encodes the specified CreateMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipRequest.verify|verify} messages. + * Encodes the specified MembershipBinding message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipBinding.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBinding * @static - * @param {google.cloud.gkehub.v1.ICreateMembershipRequest} message CreateMembershipRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IMembershipBinding} message MembershipBinding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMembershipRequest.encode = function encode(message, writer) { + MembershipBinding.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.membershipId != null && Object.hasOwnProperty.call(message, "membershipId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.membershipId); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.gkehub.v1.Membership.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.uid != null && Object.hasOwnProperty.call(message, "uid")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.uid); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.scope); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + $root.google.cloud.gkehub.v1.MembershipBindingLifecycleState.encode(message.state, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 9, wireType 2 =*/74).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified CreateMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipRequest.verify|verify} messages. + * Encodes the specified MembershipBinding message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipBinding.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBinding * @static - * @param {google.cloud.gkehub.v1.ICreateMembershipRequest} message CreateMembershipRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IMembershipBinding} message MembershipBinding message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateMembershipRequest.encodeDelimited = function encodeDelimited(message, writer) { + MembershipBinding.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateMembershipRequest message from the specified reader or buffer. + * Decodes a MembershipBinding message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBinding * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.CreateMembershipRequest} CreateMembershipRequest + * @returns {google.cloud.gkehub.v1.MembershipBinding} MembershipBinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMembershipRequest.decode = function decode(reader, length, error) { + MembershipBinding.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.CreateMembershipRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.MembershipBinding(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 3: { + message.scope = reader.string(); + break; + } case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } case 2: { - message.membershipId = reader.string(); + message.uid = reader.string(); break; } - case 3: { - message.resource = $root.google.cloud.gkehub.v1.Membership.decode(reader, reader.uint32()); + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 4: { - message.requestId = reader.string(); + case 6: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateMembershipRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest - * @static + case 7: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.state = $root.google.cloud.gkehub.v1.MembershipBindingLifecycleState.decode(reader, reader.uint32()); + break; + } + case 9: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MembershipBinding message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.MembershipBinding + * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.CreateMembershipRequest} CreateMembershipRequest + * @returns {google.cloud.gkehub.v1.MembershipBinding} MembershipBinding * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateMembershipRequest.decodeDelimited = function decodeDelimited(reader) { + MembershipBinding.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateMembershipRequest message. + * Verifies a MembershipBinding message. * @function verify - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBinding * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateMembershipRequest.verify = function verify(message) { + MembershipBinding.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.membershipId != null && message.hasOwnProperty("membershipId")) - if (!$util.isString(message.membershipId)) - return "membershipId: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.gkehub.v1.Membership.verify(message.resource); + var properties = {}; + if (message.scope != null && message.hasOwnProperty("scope")) { + properties.target = 1; + if (!$util.isString(message.scope)) + return "scope: string expected"; + } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.uid != null && message.hasOwnProperty("uid")) + if (!$util.isString(message.uid)) + return "uid: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "resource." + error; + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.state != null && message.hasOwnProperty("state")) { + var error = $root.google.cloud.gkehub.v1.MembershipBindingLifecycleState.verify(message.state); + if (error) + return "state." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates a CreateMembershipRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MembershipBinding message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBinding * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.CreateMembershipRequest} CreateMembershipRequest + * @returns {google.cloud.gkehub.v1.MembershipBinding} MembershipBinding */ - CreateMembershipRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.CreateMembershipRequest) + MembershipBinding.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.MembershipBinding) return object; - var message = new $root.google.cloud.gkehub.v1.CreateMembershipRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.membershipId != null) - message.membershipId = String(object.membershipId); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.gkehub.v1.CreateMembershipRequest.resource: object expected"); - message.resource = $root.google.cloud.gkehub.v1.Membership.fromObject(object.resource); + var message = new $root.google.cloud.gkehub.v1.MembershipBinding(); + if (object.scope != null) + message.scope = String(object.scope); + if (object.name != null) + message.name = String(object.name); + if (object.uid != null) + message.uid = String(object.uid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.MembershipBinding.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.MembershipBinding.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.MembershipBinding.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + if (object.state != null) { + if (typeof object.state !== "object") + throw TypeError(".google.cloud.gkehub.v1.MembershipBinding.state: object expected"); + message.state = $root.google.cloud.gkehub.v1.MembershipBindingLifecycleState.fromObject(object.state); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.gkehub.v1.MembershipBinding.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a CreateMembershipRequest message. Also converts values to other types if specified. + * Creates a plain object from a MembershipBinding message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBinding * @static - * @param {google.cloud.gkehub.v1.CreateMembershipRequest} message CreateMembershipRequest + * @param {google.cloud.gkehub.v1.MembershipBinding} message MembershipBinding * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateMembershipRequest.toObject = function toObject(message, options) { + MembershipBinding.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { - object.parent = ""; - object.membershipId = ""; - object.resource = null; - object.requestId = ""; + object.name = ""; + object.uid = ""; + object.createTime = null; + object.updateTime = null; + object.deleteTime = null; + object.state = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.uid != null && message.hasOwnProperty("uid")) + object.uid = message.uid; + if (message.scope != null && message.hasOwnProperty("scope")) { + object.scope = message.scope; + if (options.oneofs) + object.target = "scope"; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = $root.google.cloud.gkehub.v1.MembershipBindingLifecycleState.toObject(message.state, options); + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.membershipId != null && message.hasOwnProperty("membershipId")) - object.membershipId = message.membershipId; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.gkehub.v1.Membership.toObject(message.resource, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; return object; }; /** - * Converts this CreateMembershipRequest to JSON. + * Converts this MembershipBinding to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBinding * @instance * @returns {Object.} JSON object */ - CreateMembershipRequest.prototype.toJSON = function toJSON() { + MembershipBinding.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateMembershipRequest + * Gets the default type url for MembershipBinding * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBinding * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateMembershipRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MembershipBinding.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.CreateMembershipRequest"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.MembershipBinding"; }; - return CreateMembershipRequest; + return MembershipBinding; })(); - v1.DeleteMembershipRequest = (function() { + v1.MembershipBindingLifecycleState = (function() { /** - * Properties of a DeleteMembershipRequest. + * Properties of a MembershipBindingLifecycleState. * @memberof google.cloud.gkehub.v1 - * @interface IDeleteMembershipRequest - * @property {string|null} [name] DeleteMembershipRequest name - * @property {string|null} [requestId] DeleteMembershipRequest requestId - * @property {boolean|null} [force] DeleteMembershipRequest force + * @interface IMembershipBindingLifecycleState + * @property {google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code|null} [code] MembershipBindingLifecycleState code */ /** - * Constructs a new DeleteMembershipRequest. + * Constructs a new MembershipBindingLifecycleState. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a DeleteMembershipRequest. - * @implements IDeleteMembershipRequest + * @classdesc Represents a MembershipBindingLifecycleState. + * @implements IMembershipBindingLifecycleState * @constructor - * @param {google.cloud.gkehub.v1.IDeleteMembershipRequest=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IMembershipBindingLifecycleState=} [properties] Properties to set */ - function DeleteMembershipRequest(properties) { + function MembershipBindingLifecycleState(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44260,105 +45521,77 @@ } /** - * DeleteMembershipRequest name. - * @member {string} name - * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest - * @instance - */ - DeleteMembershipRequest.prototype.name = ""; - - /** - * DeleteMembershipRequest requestId. - * @member {string} requestId - * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest - * @instance - */ - DeleteMembershipRequest.prototype.requestId = ""; - - /** - * DeleteMembershipRequest force. - * @member {boolean} force - * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * MembershipBindingLifecycleState code. + * @member {google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code} code + * @memberof google.cloud.gkehub.v1.MembershipBindingLifecycleState * @instance */ - DeleteMembershipRequest.prototype.force = false; + MembershipBindingLifecycleState.prototype.code = 0; /** - * Creates a new DeleteMembershipRequest instance using the specified properties. + * Creates a new MembershipBindingLifecycleState instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBindingLifecycleState * @static - * @param {google.cloud.gkehub.v1.IDeleteMembershipRequest=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.DeleteMembershipRequest} DeleteMembershipRequest instance + * @param {google.cloud.gkehub.v1.IMembershipBindingLifecycleState=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.MembershipBindingLifecycleState} MembershipBindingLifecycleState instance */ - DeleteMembershipRequest.create = function create(properties) { - return new DeleteMembershipRequest(properties); + MembershipBindingLifecycleState.create = function create(properties) { + return new MembershipBindingLifecycleState(properties); }; /** - * Encodes the specified DeleteMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipRequest.verify|verify} messages. + * Encodes the specified MembershipBindingLifecycleState message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipBindingLifecycleState.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBindingLifecycleState * @static - * @param {google.cloud.gkehub.v1.IDeleteMembershipRequest} message DeleteMembershipRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IMembershipBindingLifecycleState} message MembershipBindingLifecycleState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteMembershipRequest.encode = function encode(message, writer) { + MembershipBindingLifecycleState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); return writer; }; /** - * Encodes the specified DeleteMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipRequest.verify|verify} messages. + * Encodes the specified MembershipBindingLifecycleState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipBindingLifecycleState.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBindingLifecycleState * @static - * @param {google.cloud.gkehub.v1.IDeleteMembershipRequest} message DeleteMembershipRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IMembershipBindingLifecycleState} message MembershipBindingLifecycleState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteMembershipRequest.encodeDelimited = function encodeDelimited(message, writer) { + MembershipBindingLifecycleState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteMembershipRequest message from the specified reader or buffer. + * Decodes a MembershipBindingLifecycleState message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBindingLifecycleState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.DeleteMembershipRequest} DeleteMembershipRequest + * @returns {google.cloud.gkehub.v1.MembershipBindingLifecycleState} MembershipBindingLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteMembershipRequest.decode = function decode(reader, length, error) { + MembershipBindingLifecycleState.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.DeleteMembershipRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.MembershipBindingLifecycleState(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.requestId = reader.string(); - break; - } - case 3: { - message.force = reader.bool(); + message.code = reader.int32(); break; } default: @@ -44370,142 +45603,189 @@ }; /** - * Decodes a DeleteMembershipRequest message from the specified reader or buffer, length delimited. + * Decodes a MembershipBindingLifecycleState message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBindingLifecycleState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.DeleteMembershipRequest} DeleteMembershipRequest + * @returns {google.cloud.gkehub.v1.MembershipBindingLifecycleState} MembershipBindingLifecycleState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteMembershipRequest.decodeDelimited = function decodeDelimited(reader) { + MembershipBindingLifecycleState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteMembershipRequest message. + * Verifies a MembershipBindingLifecycleState message. * @function verify - * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBindingLifecycleState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteMembershipRequest.verify = function verify(message) { + MembershipBindingLifecycleState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } return null; }; /** - * Creates a DeleteMembershipRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MembershipBindingLifecycleState message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBindingLifecycleState * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.DeleteMembershipRequest} DeleteMembershipRequest + * @returns {google.cloud.gkehub.v1.MembershipBindingLifecycleState} MembershipBindingLifecycleState */ - DeleteMembershipRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.DeleteMembershipRequest) + MembershipBindingLifecycleState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.MembershipBindingLifecycleState) return object; - var message = new $root.google.cloud.gkehub.v1.DeleteMembershipRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.force != null) - message.force = Boolean(object.force); + var message = new $root.google.cloud.gkehub.v1.MembershipBindingLifecycleState(); + switch (object.code) { + default: + if (typeof object.code === "number") { + message.code = object.code; + break; + } + break; + case "CODE_UNSPECIFIED": + case 0: + message.code = 0; + break; + case "CREATING": + case 1: + message.code = 1; + break; + case "READY": + case 2: + message.code = 2; + break; + case "DELETING": + case 3: + message.code = 3; + break; + case "UPDATING": + case 4: + message.code = 4; + break; + } return message; }; /** - * Creates a plain object from a DeleteMembershipRequest message. Also converts values to other types if specified. + * Creates a plain object from a MembershipBindingLifecycleState message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBindingLifecycleState * @static - * @param {google.cloud.gkehub.v1.DeleteMembershipRequest} message DeleteMembershipRequest + * @param {google.cloud.gkehub.v1.MembershipBindingLifecycleState} message MembershipBindingLifecycleState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteMembershipRequest.toObject = function toObject(message, options) { + MembershipBindingLifecycleState.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.requestId = ""; - object.force = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; + if (options.defaults) + object.code = options.enums === String ? "CODE_UNSPECIFIED" : 0; + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code[message.code] === undefined ? message.code : $root.google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code[message.code] : message.code; return object; }; /** - * Converts this DeleteMembershipRequest to JSON. + * Converts this MembershipBindingLifecycleState to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBindingLifecycleState * @instance * @returns {Object.} JSON object */ - DeleteMembershipRequest.prototype.toJSON = function toJSON() { + MembershipBindingLifecycleState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteMembershipRequest + * Gets the default type url for MembershipBindingLifecycleState * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @memberof google.cloud.gkehub.v1.MembershipBindingLifecycleState * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteMembershipRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MembershipBindingLifecycleState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.DeleteMembershipRequest"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.MembershipBindingLifecycleState"; }; - return DeleteMembershipRequest; + /** + * Code enum. + * @name google.cloud.gkehub.v1.MembershipBindingLifecycleState.Code + * @enum {number} + * @property {number} CODE_UNSPECIFIED=0 CODE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value + */ + MembershipBindingLifecycleState.Code = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + return values; + })(); + + return MembershipBindingLifecycleState; })(); - v1.UpdateMembershipRequest = (function() { + v1.Membership = (function() { /** - * Properties of an UpdateMembershipRequest. + * Properties of a Membership. * @memberof google.cloud.gkehub.v1 - * @interface IUpdateMembershipRequest - * @property {string|null} [name] UpdateMembershipRequest name - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMembershipRequest updateMask - * @property {google.cloud.gkehub.v1.IMembership|null} [resource] UpdateMembershipRequest resource - * @property {string|null} [requestId] UpdateMembershipRequest requestId + * @interface IMembership + * @property {google.cloud.gkehub.v1.IMembershipEndpoint|null} [endpoint] Membership endpoint + * @property {string|null} [name] Membership name + * @property {Object.|null} [labels] Membership labels + * @property {string|null} [description] Membership description + * @property {google.cloud.gkehub.v1.IMembershipState|null} [state] Membership state + * @property {google.protobuf.ITimestamp|null} [createTime] Membership createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Membership updateTime + * @property {google.protobuf.ITimestamp|null} [deleteTime] Membership deleteTime + * @property {string|null} [externalId] Membership externalId + * @property {google.protobuf.ITimestamp|null} [lastConnectionTime] Membership lastConnectionTime + * @property {string|null} [uniqueId] Membership uniqueId + * @property {google.cloud.gkehub.v1.IAuthority|null} [authority] Membership authority + * @property {google.cloud.gkehub.v1.IMonitoringConfig|null} [monitoringConfig] Membership monitoringConfig */ /** - * Constructs a new UpdateMembershipRequest. + * Constructs a new Membership. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents an UpdateMembershipRequest. - * @implements IUpdateMembershipRequest + * @classdesc Represents a Membership. + * @implements IMembership * @constructor - * @param {google.cloud.gkehub.v1.IUpdateMembershipRequest=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IMembership=} [properties] Properties to set */ - function UpdateMembershipRequest(properties) { + function Membership(properties) { + this.labels = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44513,119 +45793,279 @@ } /** - * UpdateMembershipRequest name. + * Membership endpoint. + * @member {google.cloud.gkehub.v1.IMembershipEndpoint|null|undefined} endpoint + * @memberof google.cloud.gkehub.v1.Membership + * @instance + */ + Membership.prototype.endpoint = null; + + /** + * Membership name. * @member {string} name - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @memberof google.cloud.gkehub.v1.Membership * @instance */ - UpdateMembershipRequest.prototype.name = ""; + Membership.prototype.name = ""; /** - * UpdateMembershipRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * Membership labels. + * @member {Object.} labels + * @memberof google.cloud.gkehub.v1.Membership * @instance */ - UpdateMembershipRequest.prototype.updateMask = null; + Membership.prototype.labels = $util.emptyObject; /** - * UpdateMembershipRequest resource. - * @member {google.cloud.gkehub.v1.IMembership|null|undefined} resource - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * Membership description. + * @member {string} description + * @memberof google.cloud.gkehub.v1.Membership * @instance */ - UpdateMembershipRequest.prototype.resource = null; + Membership.prototype.description = ""; /** - * UpdateMembershipRequest requestId. - * @member {string} requestId - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * Membership state. + * @member {google.cloud.gkehub.v1.IMembershipState|null|undefined} state + * @memberof google.cloud.gkehub.v1.Membership * @instance */ - UpdateMembershipRequest.prototype.requestId = ""; + Membership.prototype.state = null; /** - * Creates a new UpdateMembershipRequest instance using the specified properties. - * @function create - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest - * @static - * @param {google.cloud.gkehub.v1.IUpdateMembershipRequest=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.UpdateMembershipRequest} UpdateMembershipRequest instance + * Membership createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.gkehub.v1.Membership + * @instance */ - UpdateMembershipRequest.create = function create(properties) { - return new UpdateMembershipRequest(properties); - }; + Membership.prototype.createTime = null; /** - * Encodes the specified UpdateMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest - * @static - * @param {google.cloud.gkehub.v1.IUpdateMembershipRequest} message UpdateMembershipRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Membership updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.gkehub.v1.Membership + * @instance */ - UpdateMembershipRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.gkehub.v1.Membership.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - return writer; - }; + Membership.prototype.updateTime = null; /** - * Encodes the specified UpdateMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest - * @static - * @param {google.cloud.gkehub.v1.IUpdateMembershipRequest} message UpdateMembershipRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Membership deleteTime. + * @member {google.protobuf.ITimestamp|null|undefined} deleteTime + * @memberof google.cloud.gkehub.v1.Membership + * @instance */ - UpdateMembershipRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Membership.prototype.deleteTime = null; /** - * Decodes an UpdateMembershipRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.UpdateMembershipRequest} UpdateMembershipRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Membership externalId. + * @member {string} externalId + * @memberof google.cloud.gkehub.v1.Membership + * @instance */ - UpdateMembershipRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.UpdateMembershipRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.resource = $root.google.cloud.gkehub.v1.Membership.decode(reader, reader.uint32()); - break; - } + Membership.prototype.externalId = ""; + + /** + * Membership lastConnectionTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastConnectionTime + * @memberof google.cloud.gkehub.v1.Membership + * @instance + */ + Membership.prototype.lastConnectionTime = null; + + /** + * Membership uniqueId. + * @member {string} uniqueId + * @memberof google.cloud.gkehub.v1.Membership + * @instance + */ + Membership.prototype.uniqueId = ""; + + /** + * Membership authority. + * @member {google.cloud.gkehub.v1.IAuthority|null|undefined} authority + * @memberof google.cloud.gkehub.v1.Membership + * @instance + */ + Membership.prototype.authority = null; + + /** + * Membership monitoringConfig. + * @member {google.cloud.gkehub.v1.IMonitoringConfig|null|undefined} monitoringConfig + * @memberof google.cloud.gkehub.v1.Membership + * @instance + */ + Membership.prototype.monitoringConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Membership type. + * @member {"endpoint"|undefined} type + * @memberof google.cloud.gkehub.v1.Membership + * @instance + */ + Object.defineProperty(Membership.prototype, "type", { + get: $util.oneOfGetter($oneOfFields = ["endpoint"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Membership instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.Membership + * @static + * @param {google.cloud.gkehub.v1.IMembership=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.Membership} Membership instance + */ + Membership.create = function create(properties) { + return new Membership(properties); + }; + + /** + * Encodes the specified Membership message. Does not implicitly {@link google.cloud.gkehub.v1.Membership.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.Membership + * @static + * @param {google.cloud.gkehub.v1.IMembership} message Membership message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Membership.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + $root.google.cloud.gkehub.v1.MembershipEndpoint.encode(message.endpoint, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + $root.google.cloud.gkehub.v1.MembershipState.encode(message.state, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.deleteTime != null && Object.hasOwnProperty.call(message, "deleteTime")) + $root.google.protobuf.Timestamp.encode(message.deleteTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.externalId != null && Object.hasOwnProperty.call(message, "externalId")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.externalId); + if (message.lastConnectionTime != null && Object.hasOwnProperty.call(message, "lastConnectionTime")) + $root.google.protobuf.Timestamp.encode(message.lastConnectionTime, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.uniqueId != null && Object.hasOwnProperty.call(message, "uniqueId")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.uniqueId); + if (message.authority != null && Object.hasOwnProperty.call(message, "authority")) + $root.google.cloud.gkehub.v1.Authority.encode(message.authority, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.monitoringConfig != null && Object.hasOwnProperty.call(message, "monitoringConfig")) + $root.google.cloud.gkehub.v1.MonitoringConfig.encode(message.monitoringConfig, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Membership message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Membership.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.Membership + * @static + * @param {google.cloud.gkehub.v1.IMembership} message Membership message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Membership.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Membership message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.Membership + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.Membership} Membership + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Membership.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.Membership(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { case 4: { - message.requestId = reader.string(); + message.endpoint = $root.google.cloud.gkehub.v1.MembershipEndpoint.decode(reader, reader.uint32()); + break; + } + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + case 3: { + message.description = reader.string(); + break; + } + case 5: { + message.state = $root.google.cloud.gkehub.v1.MembershipState.decode(reader, reader.uint32()); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.deleteTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.externalId = reader.string(); + break; + } + case 10: { + message.lastConnectionTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.uniqueId = reader.string(); + break; + } + case 12: { + message.authority = $root.google.cloud.gkehub.v1.Authority.decode(reader, reader.uint32()); + break; + } + case 14: { + message.monitoringConfig = $root.google.cloud.gkehub.v1.MonitoringConfig.decode(reader, reader.uint32()); break; } default: @@ -44637,163 +46077,283 @@ }; /** - * Decodes an UpdateMembershipRequest message from the specified reader or buffer, length delimited. + * Decodes a Membership message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @memberof google.cloud.gkehub.v1.Membership * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.UpdateMembershipRequest} UpdateMembershipRequest + * @returns {google.cloud.gkehub.v1.Membership} Membership * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateMembershipRequest.decodeDelimited = function decodeDelimited(reader) { + Membership.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateMembershipRequest message. + * Verifies a Membership message. * @function verify - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @memberof google.cloud.gkehub.v1.Membership * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateMembershipRequest.verify = function verify(message) { + Membership.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) { + properties.type = 1; + { + var error = $root.google.cloud.gkehub.v1.MembershipEndpoint.verify(message.endpoint); + if (error) + return "endpoint." + error; + } + } if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.state != null && message.hasOwnProperty("state")) { + var error = $root.google.cloud.gkehub.v1.MembershipState.verify(message.state); if (error) - return "updateMask." + error; + return "state." + error; } - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.gkehub.v1.Membership.verify(message.resource); + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "resource." + error; + return "createTime." + error; } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.deleteTime); + if (error) + return "deleteTime." + error; + } + if (message.externalId != null && message.hasOwnProperty("externalId")) + if (!$util.isString(message.externalId)) + return "externalId: string expected"; + if (message.lastConnectionTime != null && message.hasOwnProperty("lastConnectionTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastConnectionTime); + if (error) + return "lastConnectionTime." + error; + } + if (message.uniqueId != null && message.hasOwnProperty("uniqueId")) + if (!$util.isString(message.uniqueId)) + return "uniqueId: string expected"; + if (message.authority != null && message.hasOwnProperty("authority")) { + var error = $root.google.cloud.gkehub.v1.Authority.verify(message.authority); + if (error) + return "authority." + error; + } + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) { + var error = $root.google.cloud.gkehub.v1.MonitoringConfig.verify(message.monitoringConfig); + if (error) + return "monitoringConfig." + error; + } + return null; + }; /** - * Creates an UpdateMembershipRequest message from a plain object. Also converts values to their respective internal types. + * Creates a Membership message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @memberof google.cloud.gkehub.v1.Membership * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.UpdateMembershipRequest} UpdateMembershipRequest + * @returns {google.cloud.gkehub.v1.Membership} Membership */ - UpdateMembershipRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.UpdateMembershipRequest) + Membership.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.Membership) return object; - var message = new $root.google.cloud.gkehub.v1.UpdateMembershipRequest(); + var message = new $root.google.cloud.gkehub.v1.Membership(); + if (object.endpoint != null) { + if (typeof object.endpoint !== "object") + throw TypeError(".google.cloud.gkehub.v1.Membership.endpoint: object expected"); + message.endpoint = $root.google.cloud.gkehub.v1.MembershipEndpoint.fromObject(object.endpoint); + } if (object.name != null) message.name = String(object.name); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.gkehub.v1.UpdateMembershipRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.gkehub.v1.Membership.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); } - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.gkehub.v1.UpdateMembershipRequest.resource: object expected"); - message.resource = $root.google.cloud.gkehub.v1.Membership.fromObject(object.resource); + if (object.description != null) + message.description = String(object.description); + if (object.state != null) { + if (typeof object.state !== "object") + throw TypeError(".google.cloud.gkehub.v1.Membership.state: object expected"); + message.state = $root.google.cloud.gkehub.v1.MembershipState.fromObject(object.state); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.Membership.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.Membership.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.deleteTime != null) { + if (typeof object.deleteTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.Membership.deleteTime: object expected"); + message.deleteTime = $root.google.protobuf.Timestamp.fromObject(object.deleteTime); + } + if (object.externalId != null) + message.externalId = String(object.externalId); + if (object.lastConnectionTime != null) { + if (typeof object.lastConnectionTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.Membership.lastConnectionTime: object expected"); + message.lastConnectionTime = $root.google.protobuf.Timestamp.fromObject(object.lastConnectionTime); + } + if (object.uniqueId != null) + message.uniqueId = String(object.uniqueId); + if (object.authority != null) { + if (typeof object.authority !== "object") + throw TypeError(".google.cloud.gkehub.v1.Membership.authority: object expected"); + message.authority = $root.google.cloud.gkehub.v1.Authority.fromObject(object.authority); + } + if (object.monitoringConfig != null) { + if (typeof object.monitoringConfig !== "object") + throw TypeError(".google.cloud.gkehub.v1.Membership.monitoringConfig: object expected"); + message.monitoringConfig = $root.google.cloud.gkehub.v1.MonitoringConfig.fromObject(object.monitoringConfig); } - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from an UpdateMembershipRequest message. Also converts values to other types if specified. + * Creates a plain object from a Membership message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @memberof google.cloud.gkehub.v1.Membership * @static - * @param {google.cloud.gkehub.v1.UpdateMembershipRequest} message UpdateMembershipRequest + * @param {google.cloud.gkehub.v1.Membership} message Membership * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateMembershipRequest.toObject = function toObject(message, options) { + Membership.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.labels = {}; if (options.defaults) { object.name = ""; - object.updateMask = null; - object.resource = null; - object.requestId = ""; + object.description = ""; + object.state = null; + object.createTime = null; + object.updateTime = null; + object.deleteTime = null; + object.externalId = ""; + object.lastConnectionTime = null; + object.uniqueId = ""; + object.authority = null; + object.monitoringConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.gkehub.v1.Membership.toObject(message.resource, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) { + object.endpoint = $root.google.cloud.gkehub.v1.MembershipEndpoint.toObject(message.endpoint, options); + if (options.oneofs) + object.type = "endpoint"; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = $root.google.cloud.gkehub.v1.MembershipState.toObject(message.state, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.deleteTime != null && message.hasOwnProperty("deleteTime")) + object.deleteTime = $root.google.protobuf.Timestamp.toObject(message.deleteTime, options); + if (message.externalId != null && message.hasOwnProperty("externalId")) + object.externalId = message.externalId; + if (message.lastConnectionTime != null && message.hasOwnProperty("lastConnectionTime")) + object.lastConnectionTime = $root.google.protobuf.Timestamp.toObject(message.lastConnectionTime, options); + if (message.uniqueId != null && message.hasOwnProperty("uniqueId")) + object.uniqueId = message.uniqueId; + if (message.authority != null && message.hasOwnProperty("authority")) + object.authority = $root.google.cloud.gkehub.v1.Authority.toObject(message.authority, options); + if (message.monitoringConfig != null && message.hasOwnProperty("monitoringConfig")) + object.monitoringConfig = $root.google.cloud.gkehub.v1.MonitoringConfig.toObject(message.monitoringConfig, options); return object; }; /** - * Converts this UpdateMembershipRequest to JSON. + * Converts this Membership to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @memberof google.cloud.gkehub.v1.Membership * @instance * @returns {Object.} JSON object */ - UpdateMembershipRequest.prototype.toJSON = function toJSON() { + Membership.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateMembershipRequest + * Gets the default type url for Membership * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @memberof google.cloud.gkehub.v1.Membership * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateMembershipRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Membership.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.UpdateMembershipRequest"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.Membership"; }; - return UpdateMembershipRequest; + return Membership; })(); - v1.GenerateConnectManifestRequest = (function() { + v1.MembershipEndpoint = (function() { /** - * Properties of a GenerateConnectManifestRequest. + * Properties of a MembershipEndpoint. * @memberof google.cloud.gkehub.v1 - * @interface IGenerateConnectManifestRequest - * @property {string|null} [name] GenerateConnectManifestRequest name - * @property {string|null} [namespace] GenerateConnectManifestRequest namespace - * @property {Uint8Array|null} [proxy] GenerateConnectManifestRequest proxy - * @property {string|null} [version] GenerateConnectManifestRequest version - * @property {boolean|null} [isUpgrade] GenerateConnectManifestRequest isUpgrade - * @property {string|null} [registry] GenerateConnectManifestRequest registry - * @property {Uint8Array|null} [imagePullSecretContent] GenerateConnectManifestRequest imagePullSecretContent + * @interface IMembershipEndpoint + * @property {google.cloud.gkehub.v1.IGkeCluster|null} [gkeCluster] MembershipEndpoint gkeCluster + * @property {google.cloud.gkehub.v1.IKubernetesMetadata|null} [kubernetesMetadata] MembershipEndpoint kubernetesMetadata + * @property {google.cloud.gkehub.v1.IKubernetesResource|null} [kubernetesResource] MembershipEndpoint kubernetesResource + * @property {boolean|null} [googleManaged] MembershipEndpoint googleManaged */ /** - * Constructs a new GenerateConnectManifestRequest. + * Constructs a new MembershipEndpoint. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a GenerateConnectManifestRequest. - * @implements IGenerateConnectManifestRequest + * @classdesc Represents a MembershipEndpoint. + * @implements IMembershipEndpoint * @constructor - * @param {google.cloud.gkehub.v1.IGenerateConnectManifestRequest=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IMembershipEndpoint=} [properties] Properties to set */ - function GenerateConnectManifestRequest(properties) { + function MembershipEndpoint(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -44801,161 +46361,119 @@ } /** - * GenerateConnectManifestRequest name. - * @member {string} name - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * MembershipEndpoint gkeCluster. + * @member {google.cloud.gkehub.v1.IGkeCluster|null|undefined} gkeCluster + * @memberof google.cloud.gkehub.v1.MembershipEndpoint * @instance */ - GenerateConnectManifestRequest.prototype.name = ""; + MembershipEndpoint.prototype.gkeCluster = null; /** - * GenerateConnectManifestRequest namespace. - * @member {string} namespace - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * MembershipEndpoint kubernetesMetadata. + * @member {google.cloud.gkehub.v1.IKubernetesMetadata|null|undefined} kubernetesMetadata + * @memberof google.cloud.gkehub.v1.MembershipEndpoint * @instance */ - GenerateConnectManifestRequest.prototype.namespace = ""; + MembershipEndpoint.prototype.kubernetesMetadata = null; /** - * GenerateConnectManifestRequest proxy. - * @member {Uint8Array} proxy - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * MembershipEndpoint kubernetesResource. + * @member {google.cloud.gkehub.v1.IKubernetesResource|null|undefined} kubernetesResource + * @memberof google.cloud.gkehub.v1.MembershipEndpoint * @instance */ - GenerateConnectManifestRequest.prototype.proxy = $util.newBuffer([]); + MembershipEndpoint.prototype.kubernetesResource = null; /** - * GenerateConnectManifestRequest version. - * @member {string} version - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * MembershipEndpoint googleManaged. + * @member {boolean} googleManaged + * @memberof google.cloud.gkehub.v1.MembershipEndpoint * @instance */ - GenerateConnectManifestRequest.prototype.version = ""; + MembershipEndpoint.prototype.googleManaged = false; /** - * GenerateConnectManifestRequest isUpgrade. - * @member {boolean} isUpgrade - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest - * @instance + * Creates a new MembershipEndpoint instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * @static + * @param {google.cloud.gkehub.v1.IMembershipEndpoint=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.MembershipEndpoint} MembershipEndpoint instance */ - GenerateConnectManifestRequest.prototype.isUpgrade = false; + MembershipEndpoint.create = function create(properties) { + return new MembershipEndpoint(properties); + }; /** - * GenerateConnectManifestRequest registry. - * @member {string} registry - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest - * @instance - */ - GenerateConnectManifestRequest.prototype.registry = ""; - - /** - * GenerateConnectManifestRequest imagePullSecretContent. - * @member {Uint8Array} imagePullSecretContent - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest - * @instance - */ - GenerateConnectManifestRequest.prototype.imagePullSecretContent = $util.newBuffer([]); - - /** - * Creates a new GenerateConnectManifestRequest instance using the specified properties. - * @function create - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest - * @static - * @param {google.cloud.gkehub.v1.IGenerateConnectManifestRequest=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.GenerateConnectManifestRequest} GenerateConnectManifestRequest instance - */ - GenerateConnectManifestRequest.create = function create(properties) { - return new GenerateConnectManifestRequest(properties); - }; - - /** - * Encodes the specified GenerateConnectManifestRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestRequest.verify|verify} messages. + * Encodes the specified MembershipEndpoint message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipEndpoint.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @memberof google.cloud.gkehub.v1.MembershipEndpoint * @static - * @param {google.cloud.gkehub.v1.IGenerateConnectManifestRequest} message GenerateConnectManifestRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IMembershipEndpoint} message MembershipEndpoint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateConnectManifestRequest.encode = function encode(message, writer) { + MembershipEndpoint.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.namespace); - if (message.proxy != null && Object.hasOwnProperty.call(message, "proxy")) - writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proxy); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.version); - if (message.isUpgrade != null && Object.hasOwnProperty.call(message, "isUpgrade")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isUpgrade); - if (message.registry != null && Object.hasOwnProperty.call(message, "registry")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.registry); - if (message.imagePullSecretContent != null && Object.hasOwnProperty.call(message, "imagePullSecretContent")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.imagePullSecretContent); + if (message.gkeCluster != null && Object.hasOwnProperty.call(message, "gkeCluster")) + $root.google.cloud.gkehub.v1.GkeCluster.encode(message.gkeCluster, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.kubernetesMetadata != null && Object.hasOwnProperty.call(message, "kubernetesMetadata")) + $root.google.cloud.gkehub.v1.KubernetesMetadata.encode(message.kubernetesMetadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.kubernetesResource != null && Object.hasOwnProperty.call(message, "kubernetesResource")) + $root.google.cloud.gkehub.v1.KubernetesResource.encode(message.kubernetesResource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.googleManaged != null && Object.hasOwnProperty.call(message, "googleManaged")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.googleManaged); return writer; }; /** - * Encodes the specified GenerateConnectManifestRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestRequest.verify|verify} messages. + * Encodes the specified MembershipEndpoint message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipEndpoint.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @memberof google.cloud.gkehub.v1.MembershipEndpoint * @static - * @param {google.cloud.gkehub.v1.IGenerateConnectManifestRequest} message GenerateConnectManifestRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IMembershipEndpoint} message MembershipEndpoint message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateConnectManifestRequest.encodeDelimited = function encodeDelimited(message, writer) { + MembershipEndpoint.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GenerateConnectManifestRequest message from the specified reader or buffer. + * Decodes a MembershipEndpoint message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @memberof google.cloud.gkehub.v1.MembershipEndpoint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.GenerateConnectManifestRequest} GenerateConnectManifestRequest + * @returns {google.cloud.gkehub.v1.MembershipEndpoint} MembershipEndpoint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GenerateConnectManifestRequest.decode = function decode(reader, length, error) { + MembershipEndpoint.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GenerateConnectManifestRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.MembershipEndpoint(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.gkeCluster = $root.google.cloud.gkehub.v1.GkeCluster.decode(reader, reader.uint32()); break; } case 2: { - message.namespace = reader.string(); + message.kubernetesMetadata = $root.google.cloud.gkehub.v1.KubernetesMetadata.decode(reader, reader.uint32()); break; } case 3: { - message.proxy = reader.bytes(); - break; - } - case 4: { - message.version = reader.string(); - break; - } - case 5: { - message.isUpgrade = reader.bool(); - break; - } - case 6: { - message.registry = reader.string(); + message.kubernetesResource = $root.google.cloud.gkehub.v1.KubernetesResource.decode(reader, reader.uint32()); break; } - case 7: { - message.imagePullSecretContent = reader.bytes(); + case 8: { + message.googleManaged = reader.bool(); break; } default: @@ -44967,190 +46485,167 @@ }; /** - * Decodes a GenerateConnectManifestRequest message from the specified reader or buffer, length delimited. + * Decodes a MembershipEndpoint message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @memberof google.cloud.gkehub.v1.MembershipEndpoint * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.GenerateConnectManifestRequest} GenerateConnectManifestRequest + * @returns {google.cloud.gkehub.v1.MembershipEndpoint} MembershipEndpoint * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GenerateConnectManifestRequest.decodeDelimited = function decodeDelimited(reader) { + MembershipEndpoint.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GenerateConnectManifestRequest message. + * Verifies a MembershipEndpoint message. * @function verify - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @memberof google.cloud.gkehub.v1.MembershipEndpoint * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GenerateConnectManifestRequest.verify = function verify(message) { + MembershipEndpoint.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.namespace != null && message.hasOwnProperty("namespace")) - if (!$util.isString(message.namespace)) - return "namespace: string expected"; - if (message.proxy != null && message.hasOwnProperty("proxy")) - if (!(message.proxy && typeof message.proxy.length === "number" || $util.isString(message.proxy))) - return "proxy: buffer expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.isUpgrade != null && message.hasOwnProperty("isUpgrade")) - if (typeof message.isUpgrade !== "boolean") - return "isUpgrade: boolean expected"; - if (message.registry != null && message.hasOwnProperty("registry")) - if (!$util.isString(message.registry)) - return "registry: string expected"; - if (message.imagePullSecretContent != null && message.hasOwnProperty("imagePullSecretContent")) - if (!(message.imagePullSecretContent && typeof message.imagePullSecretContent.length === "number" || $util.isString(message.imagePullSecretContent))) - return "imagePullSecretContent: buffer expected"; + if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) { + var error = $root.google.cloud.gkehub.v1.GkeCluster.verify(message.gkeCluster); + if (error) + return "gkeCluster." + error; + } + if (message.kubernetesMetadata != null && message.hasOwnProperty("kubernetesMetadata")) { + var error = $root.google.cloud.gkehub.v1.KubernetesMetadata.verify(message.kubernetesMetadata); + if (error) + return "kubernetesMetadata." + error; + } + if (message.kubernetesResource != null && message.hasOwnProperty("kubernetesResource")) { + var error = $root.google.cloud.gkehub.v1.KubernetesResource.verify(message.kubernetesResource); + if (error) + return "kubernetesResource." + error; + } + if (message.googleManaged != null && message.hasOwnProperty("googleManaged")) + if (typeof message.googleManaged !== "boolean") + return "googleManaged: boolean expected"; return null; }; /** - * Creates a GenerateConnectManifestRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MembershipEndpoint message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @memberof google.cloud.gkehub.v1.MembershipEndpoint * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.GenerateConnectManifestRequest} GenerateConnectManifestRequest + * @returns {google.cloud.gkehub.v1.MembershipEndpoint} MembershipEndpoint */ - GenerateConnectManifestRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.GenerateConnectManifestRequest) + MembershipEndpoint.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.MembershipEndpoint) return object; - var message = new $root.google.cloud.gkehub.v1.GenerateConnectManifestRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.namespace != null) - message.namespace = String(object.namespace); - if (object.proxy != null) - if (typeof object.proxy === "string") - $util.base64.decode(object.proxy, message.proxy = $util.newBuffer($util.base64.length(object.proxy)), 0); - else if (object.proxy.length >= 0) - message.proxy = object.proxy; - if (object.version != null) - message.version = String(object.version); - if (object.isUpgrade != null) - message.isUpgrade = Boolean(object.isUpgrade); - if (object.registry != null) - message.registry = String(object.registry); - if (object.imagePullSecretContent != null) - if (typeof object.imagePullSecretContent === "string") - $util.base64.decode(object.imagePullSecretContent, message.imagePullSecretContent = $util.newBuffer($util.base64.length(object.imagePullSecretContent)), 0); - else if (object.imagePullSecretContent.length >= 0) - message.imagePullSecretContent = object.imagePullSecretContent; + var message = new $root.google.cloud.gkehub.v1.MembershipEndpoint(); + if (object.gkeCluster != null) { + if (typeof object.gkeCluster !== "object") + throw TypeError(".google.cloud.gkehub.v1.MembershipEndpoint.gkeCluster: object expected"); + message.gkeCluster = $root.google.cloud.gkehub.v1.GkeCluster.fromObject(object.gkeCluster); + } + if (object.kubernetesMetadata != null) { + if (typeof object.kubernetesMetadata !== "object") + throw TypeError(".google.cloud.gkehub.v1.MembershipEndpoint.kubernetesMetadata: object expected"); + message.kubernetesMetadata = $root.google.cloud.gkehub.v1.KubernetesMetadata.fromObject(object.kubernetesMetadata); + } + if (object.kubernetesResource != null) { + if (typeof object.kubernetesResource !== "object") + throw TypeError(".google.cloud.gkehub.v1.MembershipEndpoint.kubernetesResource: object expected"); + message.kubernetesResource = $root.google.cloud.gkehub.v1.KubernetesResource.fromObject(object.kubernetesResource); + } + if (object.googleManaged != null) + message.googleManaged = Boolean(object.googleManaged); return message; }; /** - * Creates a plain object from a GenerateConnectManifestRequest message. Also converts values to other types if specified. + * Creates a plain object from a MembershipEndpoint message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @memberof google.cloud.gkehub.v1.MembershipEndpoint * @static - * @param {google.cloud.gkehub.v1.GenerateConnectManifestRequest} message GenerateConnectManifestRequest + * @param {google.cloud.gkehub.v1.MembershipEndpoint} message MembershipEndpoint * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerateConnectManifestRequest.toObject = function toObject(message, options) { + MembershipEndpoint.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.namespace = ""; - if (options.bytes === String) - object.proxy = ""; - else { - object.proxy = []; - if (options.bytes !== Array) - object.proxy = $util.newBuffer(object.proxy); - } - object.version = ""; - object.isUpgrade = false; - object.registry = ""; - if (options.bytes === String) - object.imagePullSecretContent = ""; - else { - object.imagePullSecretContent = []; - if (options.bytes !== Array) - object.imagePullSecretContent = $util.newBuffer(object.imagePullSecretContent); - } + object.gkeCluster = null; + object.kubernetesMetadata = null; + object.kubernetesResource = null; + object.googleManaged = false; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.namespace != null && message.hasOwnProperty("namespace")) - object.namespace = message.namespace; - if (message.proxy != null && message.hasOwnProperty("proxy")) - object.proxy = options.bytes === String ? $util.base64.encode(message.proxy, 0, message.proxy.length) : options.bytes === Array ? Array.prototype.slice.call(message.proxy) : message.proxy; - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.isUpgrade != null && message.hasOwnProperty("isUpgrade")) - object.isUpgrade = message.isUpgrade; - if (message.registry != null && message.hasOwnProperty("registry")) - object.registry = message.registry; - if (message.imagePullSecretContent != null && message.hasOwnProperty("imagePullSecretContent")) - object.imagePullSecretContent = options.bytes === String ? $util.base64.encode(message.imagePullSecretContent, 0, message.imagePullSecretContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.imagePullSecretContent) : message.imagePullSecretContent; + if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) + object.gkeCluster = $root.google.cloud.gkehub.v1.GkeCluster.toObject(message.gkeCluster, options); + if (message.kubernetesMetadata != null && message.hasOwnProperty("kubernetesMetadata")) + object.kubernetesMetadata = $root.google.cloud.gkehub.v1.KubernetesMetadata.toObject(message.kubernetesMetadata, options); + if (message.kubernetesResource != null && message.hasOwnProperty("kubernetesResource")) + object.kubernetesResource = $root.google.cloud.gkehub.v1.KubernetesResource.toObject(message.kubernetesResource, options); + if (message.googleManaged != null && message.hasOwnProperty("googleManaged")) + object.googleManaged = message.googleManaged; return object; }; /** - * Converts this GenerateConnectManifestRequest to JSON. + * Converts this MembershipEndpoint to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @memberof google.cloud.gkehub.v1.MembershipEndpoint * @instance * @returns {Object.} JSON object */ - GenerateConnectManifestRequest.prototype.toJSON = function toJSON() { + MembershipEndpoint.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GenerateConnectManifestRequest + * Gets the default type url for MembershipEndpoint * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @memberof google.cloud.gkehub.v1.MembershipEndpoint * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GenerateConnectManifestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MembershipEndpoint.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.GenerateConnectManifestRequest"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.MembershipEndpoint"; }; - return GenerateConnectManifestRequest; + return MembershipEndpoint; })(); - v1.GenerateConnectManifestResponse = (function() { + v1.KubernetesResource = (function() { /** - * Properties of a GenerateConnectManifestResponse. + * Properties of a KubernetesResource. * @memberof google.cloud.gkehub.v1 - * @interface IGenerateConnectManifestResponse - * @property {Array.|null} [manifest] GenerateConnectManifestResponse manifest + * @interface IKubernetesResource + * @property {string|null} [membershipCrManifest] KubernetesResource membershipCrManifest + * @property {Array.|null} [membershipResources] KubernetesResource membershipResources + * @property {Array.|null} [connectResources] KubernetesResource connectResources + * @property {google.cloud.gkehub.v1.IResourceOptions|null} [resourceOptions] KubernetesResource resourceOptions */ /** - * Constructs a new GenerateConnectManifestResponse. + * Constructs a new KubernetesResource. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a GenerateConnectManifestResponse. - * @implements IGenerateConnectManifestResponse + * @classdesc Represents a KubernetesResource. + * @implements IKubernetesResource * @constructor - * @param {google.cloud.gkehub.v1.IGenerateConnectManifestResponse=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IKubernetesResource=} [properties] Properties to set */ - function GenerateConnectManifestResponse(properties) { - this.manifest = []; + function KubernetesResource(properties) { + this.membershipResources = []; + this.connectResources = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45158,80 +46653,125 @@ } /** - * GenerateConnectManifestResponse manifest. - * @member {Array.} manifest - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * KubernetesResource membershipCrManifest. + * @member {string} membershipCrManifest + * @memberof google.cloud.gkehub.v1.KubernetesResource * @instance */ - GenerateConnectManifestResponse.prototype.manifest = $util.emptyArray; + KubernetesResource.prototype.membershipCrManifest = ""; /** - * Creates a new GenerateConnectManifestResponse instance using the specified properties. + * KubernetesResource membershipResources. + * @member {Array.} membershipResources + * @memberof google.cloud.gkehub.v1.KubernetesResource + * @instance + */ + KubernetesResource.prototype.membershipResources = $util.emptyArray; + + /** + * KubernetesResource connectResources. + * @member {Array.} connectResources + * @memberof google.cloud.gkehub.v1.KubernetesResource + * @instance + */ + KubernetesResource.prototype.connectResources = $util.emptyArray; + + /** + * KubernetesResource resourceOptions. + * @member {google.cloud.gkehub.v1.IResourceOptions|null|undefined} resourceOptions + * @memberof google.cloud.gkehub.v1.KubernetesResource + * @instance + */ + KubernetesResource.prototype.resourceOptions = null; + + /** + * Creates a new KubernetesResource instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @memberof google.cloud.gkehub.v1.KubernetesResource * @static - * @param {google.cloud.gkehub.v1.IGenerateConnectManifestResponse=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.GenerateConnectManifestResponse} GenerateConnectManifestResponse instance + * @param {google.cloud.gkehub.v1.IKubernetesResource=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.KubernetesResource} KubernetesResource instance */ - GenerateConnectManifestResponse.create = function create(properties) { - return new GenerateConnectManifestResponse(properties); + KubernetesResource.create = function create(properties) { + return new KubernetesResource(properties); }; /** - * Encodes the specified GenerateConnectManifestResponse message. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestResponse.verify|verify} messages. + * Encodes the specified KubernetesResource message. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesResource.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @memberof google.cloud.gkehub.v1.KubernetesResource * @static - * @param {google.cloud.gkehub.v1.IGenerateConnectManifestResponse} message GenerateConnectManifestResponse message or plain object to encode + * @param {google.cloud.gkehub.v1.IKubernetesResource} message KubernetesResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateConnectManifestResponse.encode = function encode(message, writer) { + KubernetesResource.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.manifest != null && message.manifest.length) - for (var i = 0; i < message.manifest.length; ++i) - $root.google.cloud.gkehub.v1.ConnectAgentResource.encode(message.manifest[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.membershipCrManifest != null && Object.hasOwnProperty.call(message, "membershipCrManifest")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.membershipCrManifest); + if (message.membershipResources != null && message.membershipResources.length) + for (var i = 0; i < message.membershipResources.length; ++i) + $root.google.cloud.gkehub.v1.ResourceManifest.encode(message.membershipResources[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.connectResources != null && message.connectResources.length) + for (var i = 0; i < message.connectResources.length; ++i) + $root.google.cloud.gkehub.v1.ResourceManifest.encode(message.connectResources[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.resourceOptions != null && Object.hasOwnProperty.call(message, "resourceOptions")) + $root.google.cloud.gkehub.v1.ResourceOptions.encode(message.resourceOptions, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified GenerateConnectManifestResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestResponse.verify|verify} messages. + * Encodes the specified KubernetesResource message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesResource.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @memberof google.cloud.gkehub.v1.KubernetesResource * @static - * @param {google.cloud.gkehub.v1.IGenerateConnectManifestResponse} message GenerateConnectManifestResponse message or plain object to encode + * @param {google.cloud.gkehub.v1.IKubernetesResource} message KubernetesResource message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GenerateConnectManifestResponse.encodeDelimited = function encodeDelimited(message, writer) { + KubernetesResource.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GenerateConnectManifestResponse message from the specified reader or buffer. + * Decodes a KubernetesResource message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @memberof google.cloud.gkehub.v1.KubernetesResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.GenerateConnectManifestResponse} GenerateConnectManifestResponse + * @returns {google.cloud.gkehub.v1.KubernetesResource} KubernetesResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GenerateConnectManifestResponse.decode = function decode(reader, length, error) { + KubernetesResource.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GenerateConnectManifestResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.KubernetesResource(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.manifest && message.manifest.length)) - message.manifest = []; - message.manifest.push($root.google.cloud.gkehub.v1.ConnectAgentResource.decode(reader, reader.uint32())); + message.membershipCrManifest = reader.string(); + break; + } + case 2: { + if (!(message.membershipResources && message.membershipResources.length)) + message.membershipResources = []; + message.membershipResources.push($root.google.cloud.gkehub.v1.ResourceManifest.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.connectResources && message.connectResources.length)) + message.connectResources = []; + message.connectResources.push($root.google.cloud.gkehub.v1.ResourceManifest.decode(reader, reader.uint32())); + break; + } + case 4: { + message.resourceOptions = $root.google.cloud.gkehub.v1.ResourceOptions.decode(reader, reader.uint32()); break; } default: @@ -45243,140 +46783,191 @@ }; /** - * Decodes a GenerateConnectManifestResponse message from the specified reader or buffer, length delimited. + * Decodes a KubernetesResource message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @memberof google.cloud.gkehub.v1.KubernetesResource * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.GenerateConnectManifestResponse} GenerateConnectManifestResponse + * @returns {google.cloud.gkehub.v1.KubernetesResource} KubernetesResource * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GenerateConnectManifestResponse.decodeDelimited = function decodeDelimited(reader) { + KubernetesResource.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GenerateConnectManifestResponse message. + * Verifies a KubernetesResource message. * @function verify - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @memberof google.cloud.gkehub.v1.KubernetesResource * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GenerateConnectManifestResponse.verify = function verify(message) { + KubernetesResource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.manifest != null && message.hasOwnProperty("manifest")) { - if (!Array.isArray(message.manifest)) - return "manifest: array expected"; - for (var i = 0; i < message.manifest.length; ++i) { - var error = $root.google.cloud.gkehub.v1.ConnectAgentResource.verify(message.manifest[i]); + if (message.membershipCrManifest != null && message.hasOwnProperty("membershipCrManifest")) + if (!$util.isString(message.membershipCrManifest)) + return "membershipCrManifest: string expected"; + if (message.membershipResources != null && message.hasOwnProperty("membershipResources")) { + if (!Array.isArray(message.membershipResources)) + return "membershipResources: array expected"; + for (var i = 0; i < message.membershipResources.length; ++i) { + var error = $root.google.cloud.gkehub.v1.ResourceManifest.verify(message.membershipResources[i]); if (error) - return "manifest." + error; + return "membershipResources." + error; + } + } + if (message.connectResources != null && message.hasOwnProperty("connectResources")) { + if (!Array.isArray(message.connectResources)) + return "connectResources: array expected"; + for (var i = 0; i < message.connectResources.length; ++i) { + var error = $root.google.cloud.gkehub.v1.ResourceManifest.verify(message.connectResources[i]); + if (error) + return "connectResources." + error; } } + if (message.resourceOptions != null && message.hasOwnProperty("resourceOptions")) { + var error = $root.google.cloud.gkehub.v1.ResourceOptions.verify(message.resourceOptions); + if (error) + return "resourceOptions." + error; + } return null; }; /** - * Creates a GenerateConnectManifestResponse message from a plain object. Also converts values to their respective internal types. + * Creates a KubernetesResource message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @memberof google.cloud.gkehub.v1.KubernetesResource * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.GenerateConnectManifestResponse} GenerateConnectManifestResponse + * @returns {google.cloud.gkehub.v1.KubernetesResource} KubernetesResource */ - GenerateConnectManifestResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.GenerateConnectManifestResponse) + KubernetesResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.KubernetesResource) return object; - var message = new $root.google.cloud.gkehub.v1.GenerateConnectManifestResponse(); - if (object.manifest) { - if (!Array.isArray(object.manifest)) - throw TypeError(".google.cloud.gkehub.v1.GenerateConnectManifestResponse.manifest: array expected"); - message.manifest = []; - for (var i = 0; i < object.manifest.length; ++i) { - if (typeof object.manifest[i] !== "object") - throw TypeError(".google.cloud.gkehub.v1.GenerateConnectManifestResponse.manifest: object expected"); - message.manifest[i] = $root.google.cloud.gkehub.v1.ConnectAgentResource.fromObject(object.manifest[i]); + var message = new $root.google.cloud.gkehub.v1.KubernetesResource(); + if (object.membershipCrManifest != null) + message.membershipCrManifest = String(object.membershipCrManifest); + if (object.membershipResources) { + if (!Array.isArray(object.membershipResources)) + throw TypeError(".google.cloud.gkehub.v1.KubernetesResource.membershipResources: array expected"); + message.membershipResources = []; + for (var i = 0; i < object.membershipResources.length; ++i) { + if (typeof object.membershipResources[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.KubernetesResource.membershipResources: object expected"); + message.membershipResources[i] = $root.google.cloud.gkehub.v1.ResourceManifest.fromObject(object.membershipResources[i]); + } + } + if (object.connectResources) { + if (!Array.isArray(object.connectResources)) + throw TypeError(".google.cloud.gkehub.v1.KubernetesResource.connectResources: array expected"); + message.connectResources = []; + for (var i = 0; i < object.connectResources.length; ++i) { + if (typeof object.connectResources[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.KubernetesResource.connectResources: object expected"); + message.connectResources[i] = $root.google.cloud.gkehub.v1.ResourceManifest.fromObject(object.connectResources[i]); } } + if (object.resourceOptions != null) { + if (typeof object.resourceOptions !== "object") + throw TypeError(".google.cloud.gkehub.v1.KubernetesResource.resourceOptions: object expected"); + message.resourceOptions = $root.google.cloud.gkehub.v1.ResourceOptions.fromObject(object.resourceOptions); + } return message; }; /** - * Creates a plain object from a GenerateConnectManifestResponse message. Also converts values to other types if specified. + * Creates a plain object from a KubernetesResource message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @memberof google.cloud.gkehub.v1.KubernetesResource * @static - * @param {google.cloud.gkehub.v1.GenerateConnectManifestResponse} message GenerateConnectManifestResponse + * @param {google.cloud.gkehub.v1.KubernetesResource} message KubernetesResource * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GenerateConnectManifestResponse.toObject = function toObject(message, options) { + KubernetesResource.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.manifest = []; - if (message.manifest && message.manifest.length) { - object.manifest = []; - for (var j = 0; j < message.manifest.length; ++j) - object.manifest[j] = $root.google.cloud.gkehub.v1.ConnectAgentResource.toObject(message.manifest[j], options); + if (options.arrays || options.defaults) { + object.membershipResources = []; + object.connectResources = []; } - return object; - }; - - /** - * Converts this GenerateConnectManifestResponse to JSON. - * @function toJSON - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse - * @instance - * @returns {Object.} JSON object - */ - GenerateConnectManifestResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + if (options.defaults) { + object.membershipCrManifest = ""; + object.resourceOptions = null; + } + if (message.membershipCrManifest != null && message.hasOwnProperty("membershipCrManifest")) + object.membershipCrManifest = message.membershipCrManifest; + if (message.membershipResources && message.membershipResources.length) { + object.membershipResources = []; + for (var j = 0; j < message.membershipResources.length; ++j) + object.membershipResources[j] = $root.google.cloud.gkehub.v1.ResourceManifest.toObject(message.membershipResources[j], options); + } + if (message.connectResources && message.connectResources.length) { + object.connectResources = []; + for (var j = 0; j < message.connectResources.length; ++j) + object.connectResources[j] = $root.google.cloud.gkehub.v1.ResourceManifest.toObject(message.connectResources[j], options); + } + if (message.resourceOptions != null && message.hasOwnProperty("resourceOptions")) + object.resourceOptions = $root.google.cloud.gkehub.v1.ResourceOptions.toObject(message.resourceOptions, options); + return object; }; /** - * Gets the default type url for GenerateConnectManifestResponse + * Converts this KubernetesResource to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.KubernetesResource + * @instance + * @returns {Object.} JSON object + */ + KubernetesResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for KubernetesResource * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @memberof google.cloud.gkehub.v1.KubernetesResource * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GenerateConnectManifestResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + KubernetesResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.GenerateConnectManifestResponse"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.KubernetesResource"; }; - return GenerateConnectManifestResponse; + return KubernetesResource; })(); - v1.ConnectAgentResource = (function() { + v1.ResourceOptions = (function() { /** - * Properties of a ConnectAgentResource. + * Properties of a ResourceOptions. * @memberof google.cloud.gkehub.v1 - * @interface IConnectAgentResource - * @property {google.cloud.gkehub.v1.ITypeMeta|null} [type] ConnectAgentResource type - * @property {string|null} [manifest] ConnectAgentResource manifest + * @interface IResourceOptions + * @property {string|null} [connectVersion] ResourceOptions connectVersion + * @property {boolean|null} [v1beta1Crd] ResourceOptions v1beta1Crd + * @property {string|null} [k8sVersion] ResourceOptions k8sVersion + * @property {string|null} [k8sGitVersion] ResourceOptions k8sGitVersion */ /** - * Constructs a new ConnectAgentResource. + * Constructs a new ResourceOptions. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a ConnectAgentResource. - * @implements IConnectAgentResource + * @classdesc Represents a ResourceOptions. + * @implements IResourceOptions * @constructor - * @param {google.cloud.gkehub.v1.IConnectAgentResource=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IResourceOptions=} [properties] Properties to set */ - function ConnectAgentResource(properties) { + function ResourceOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45384,91 +46975,119 @@ } /** - * ConnectAgentResource type. - * @member {google.cloud.gkehub.v1.ITypeMeta|null|undefined} type - * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * ResourceOptions connectVersion. + * @member {string} connectVersion + * @memberof google.cloud.gkehub.v1.ResourceOptions * @instance */ - ConnectAgentResource.prototype.type = null; + ResourceOptions.prototype.connectVersion = ""; /** - * ConnectAgentResource manifest. - * @member {string} manifest - * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * ResourceOptions v1beta1Crd. + * @member {boolean} v1beta1Crd + * @memberof google.cloud.gkehub.v1.ResourceOptions * @instance */ - ConnectAgentResource.prototype.manifest = ""; + ResourceOptions.prototype.v1beta1Crd = false; /** - * Creates a new ConnectAgentResource instance using the specified properties. + * ResourceOptions k8sVersion. + * @member {string} k8sVersion + * @memberof google.cloud.gkehub.v1.ResourceOptions + * @instance + */ + ResourceOptions.prototype.k8sVersion = ""; + + /** + * ResourceOptions k8sGitVersion. + * @member {string} k8sGitVersion + * @memberof google.cloud.gkehub.v1.ResourceOptions + * @instance + */ + ResourceOptions.prototype.k8sGitVersion = ""; + + /** + * Creates a new ResourceOptions instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @memberof google.cloud.gkehub.v1.ResourceOptions * @static - * @param {google.cloud.gkehub.v1.IConnectAgentResource=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.ConnectAgentResource} ConnectAgentResource instance + * @param {google.cloud.gkehub.v1.IResourceOptions=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ResourceOptions} ResourceOptions instance */ - ConnectAgentResource.create = function create(properties) { - return new ConnectAgentResource(properties); + ResourceOptions.create = function create(properties) { + return new ResourceOptions(properties); }; /** - * Encodes the specified ConnectAgentResource message. Does not implicitly {@link google.cloud.gkehub.v1.ConnectAgentResource.verify|verify} messages. + * Encodes the specified ResourceOptions message. Does not implicitly {@link google.cloud.gkehub.v1.ResourceOptions.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @memberof google.cloud.gkehub.v1.ResourceOptions * @static - * @param {google.cloud.gkehub.v1.IConnectAgentResource} message ConnectAgentResource message or plain object to encode + * @param {google.cloud.gkehub.v1.IResourceOptions} message ResourceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConnectAgentResource.encode = function encode(message, writer) { + ResourceOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - $root.google.cloud.gkehub.v1.TypeMeta.encode(message.type, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.manifest != null && Object.hasOwnProperty.call(message, "manifest")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.manifest); + if (message.connectVersion != null && Object.hasOwnProperty.call(message, "connectVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.connectVersion); + if (message.v1beta1Crd != null && Object.hasOwnProperty.call(message, "v1beta1Crd")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.v1beta1Crd); + if (message.k8sVersion != null && Object.hasOwnProperty.call(message, "k8sVersion")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.k8sVersion); + if (message.k8sGitVersion != null && Object.hasOwnProperty.call(message, "k8sGitVersion")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.k8sGitVersion); return writer; }; /** - * Encodes the specified ConnectAgentResource message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ConnectAgentResource.verify|verify} messages. + * Encodes the specified ResourceOptions message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ResourceOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @memberof google.cloud.gkehub.v1.ResourceOptions * @static - * @param {google.cloud.gkehub.v1.IConnectAgentResource} message ConnectAgentResource message or plain object to encode + * @param {google.cloud.gkehub.v1.IResourceOptions} message ResourceOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ConnectAgentResource.encodeDelimited = function encodeDelimited(message, writer) { + ResourceOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ConnectAgentResource message from the specified reader or buffer. + * Decodes a ResourceOptions message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @memberof google.cloud.gkehub.v1.ResourceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.ConnectAgentResource} ConnectAgentResource + * @returns {google.cloud.gkehub.v1.ResourceOptions} ResourceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConnectAgentResource.decode = function decode(reader, length, error) { + ResourceOptions.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ConnectAgentResource(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ResourceOptions(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.type = $root.google.cloud.gkehub.v1.TypeMeta.decode(reader, reader.uint32()); + message.connectVersion = reader.string(); break; } case 2: { - message.manifest = reader.string(); + message.v1beta1Crd = reader.bool(); + break; + } + case 3: { + message.k8sVersion = reader.string(); + break; + } + case 4: { + message.k8sGitVersion = reader.string(); break; } default: @@ -45480,137 +47099,148 @@ }; /** - * Decodes a ConnectAgentResource message from the specified reader or buffer, length delimited. + * Decodes a ResourceOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @memberof google.cloud.gkehub.v1.ResourceOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.ConnectAgentResource} ConnectAgentResource + * @returns {google.cloud.gkehub.v1.ResourceOptions} ResourceOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ConnectAgentResource.decodeDelimited = function decodeDelimited(reader) { + ResourceOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ConnectAgentResource message. + * Verifies a ResourceOptions message. * @function verify - * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @memberof google.cloud.gkehub.v1.ResourceOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ConnectAgentResource.verify = function verify(message) { + ResourceOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) { - var error = $root.google.cloud.gkehub.v1.TypeMeta.verify(message.type); - if (error) - return "type." + error; - } - if (message.manifest != null && message.hasOwnProperty("manifest")) - if (!$util.isString(message.manifest)) - return "manifest: string expected"; + if (message.connectVersion != null && message.hasOwnProperty("connectVersion")) + if (!$util.isString(message.connectVersion)) + return "connectVersion: string expected"; + if (message.v1beta1Crd != null && message.hasOwnProperty("v1beta1Crd")) + if (typeof message.v1beta1Crd !== "boolean") + return "v1beta1Crd: boolean expected"; + if (message.k8sVersion != null && message.hasOwnProperty("k8sVersion")) + if (!$util.isString(message.k8sVersion)) + return "k8sVersion: string expected"; + if (message.k8sGitVersion != null && message.hasOwnProperty("k8sGitVersion")) + if (!$util.isString(message.k8sGitVersion)) + return "k8sGitVersion: string expected"; return null; }; /** - * Creates a ConnectAgentResource message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @memberof google.cloud.gkehub.v1.ResourceOptions * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.ConnectAgentResource} ConnectAgentResource + * @returns {google.cloud.gkehub.v1.ResourceOptions} ResourceOptions */ - ConnectAgentResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.ConnectAgentResource) + ResourceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ResourceOptions) return object; - var message = new $root.google.cloud.gkehub.v1.ConnectAgentResource(); - if (object.type != null) { - if (typeof object.type !== "object") - throw TypeError(".google.cloud.gkehub.v1.ConnectAgentResource.type: object expected"); - message.type = $root.google.cloud.gkehub.v1.TypeMeta.fromObject(object.type); - } - if (object.manifest != null) - message.manifest = String(object.manifest); + var message = new $root.google.cloud.gkehub.v1.ResourceOptions(); + if (object.connectVersion != null) + message.connectVersion = String(object.connectVersion); + if (object.v1beta1Crd != null) + message.v1beta1Crd = Boolean(object.v1beta1Crd); + if (object.k8sVersion != null) + message.k8sVersion = String(object.k8sVersion); + if (object.k8sGitVersion != null) + message.k8sGitVersion = String(object.k8sGitVersion); return message; }; /** - * Creates a plain object from a ConnectAgentResource message. Also converts values to other types if specified. + * Creates a plain object from a ResourceOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @memberof google.cloud.gkehub.v1.ResourceOptions * @static - * @param {google.cloud.gkehub.v1.ConnectAgentResource} message ConnectAgentResource + * @param {google.cloud.gkehub.v1.ResourceOptions} message ResourceOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ConnectAgentResource.toObject = function toObject(message, options) { + ResourceOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.type = null; - object.manifest = ""; + object.connectVersion = ""; + object.v1beta1Crd = false; + object.k8sVersion = ""; + object.k8sGitVersion = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = $root.google.cloud.gkehub.v1.TypeMeta.toObject(message.type, options); - if (message.manifest != null && message.hasOwnProperty("manifest")) - object.manifest = message.manifest; + if (message.connectVersion != null && message.hasOwnProperty("connectVersion")) + object.connectVersion = message.connectVersion; + if (message.v1beta1Crd != null && message.hasOwnProperty("v1beta1Crd")) + object.v1beta1Crd = message.v1beta1Crd; + if (message.k8sVersion != null && message.hasOwnProperty("k8sVersion")) + object.k8sVersion = message.k8sVersion; + if (message.k8sGitVersion != null && message.hasOwnProperty("k8sGitVersion")) + object.k8sGitVersion = message.k8sGitVersion; return object; }; /** - * Converts this ConnectAgentResource to JSON. + * Converts this ResourceOptions to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @memberof google.cloud.gkehub.v1.ResourceOptions * @instance * @returns {Object.} JSON object */ - ConnectAgentResource.prototype.toJSON = function toJSON() { + ResourceOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ConnectAgentResource + * Gets the default type url for ResourceOptions * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @memberof google.cloud.gkehub.v1.ResourceOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ConnectAgentResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.ConnectAgentResource"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.ResourceOptions"; }; - return ConnectAgentResource; + return ResourceOptions; })(); - v1.TypeMeta = (function() { + v1.ResourceManifest = (function() { /** - * Properties of a TypeMeta. + * Properties of a ResourceManifest. * @memberof google.cloud.gkehub.v1 - * @interface ITypeMeta - * @property {string|null} [kind] TypeMeta kind - * @property {string|null} [apiVersion] TypeMeta apiVersion + * @interface IResourceManifest + * @property {string|null} [manifest] ResourceManifest manifest + * @property {boolean|null} [clusterScoped] ResourceManifest clusterScoped */ /** - * Constructs a new TypeMeta. + * Constructs a new ResourceManifest. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a TypeMeta. - * @implements ITypeMeta + * @classdesc Represents a ResourceManifest. + * @implements IResourceManifest * @constructor - * @param {google.cloud.gkehub.v1.ITypeMeta=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IResourceManifest=} [properties] Properties to set */ - function TypeMeta(properties) { + function ResourceManifest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45618,91 +47248,91 @@ } /** - * TypeMeta kind. - * @member {string} kind - * @memberof google.cloud.gkehub.v1.TypeMeta + * ResourceManifest manifest. + * @member {string} manifest + * @memberof google.cloud.gkehub.v1.ResourceManifest * @instance */ - TypeMeta.prototype.kind = ""; + ResourceManifest.prototype.manifest = ""; /** - * TypeMeta apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.gkehub.v1.TypeMeta + * ResourceManifest clusterScoped. + * @member {boolean} clusterScoped + * @memberof google.cloud.gkehub.v1.ResourceManifest * @instance */ - TypeMeta.prototype.apiVersion = ""; + ResourceManifest.prototype.clusterScoped = false; /** - * Creates a new TypeMeta instance using the specified properties. + * Creates a new ResourceManifest instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.TypeMeta + * @memberof google.cloud.gkehub.v1.ResourceManifest * @static - * @param {google.cloud.gkehub.v1.ITypeMeta=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.TypeMeta} TypeMeta instance + * @param {google.cloud.gkehub.v1.IResourceManifest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ResourceManifest} ResourceManifest instance */ - TypeMeta.create = function create(properties) { - return new TypeMeta(properties); + ResourceManifest.create = function create(properties) { + return new ResourceManifest(properties); }; /** - * Encodes the specified TypeMeta message. Does not implicitly {@link google.cloud.gkehub.v1.TypeMeta.verify|verify} messages. + * Encodes the specified ResourceManifest message. Does not implicitly {@link google.cloud.gkehub.v1.ResourceManifest.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.TypeMeta + * @memberof google.cloud.gkehub.v1.ResourceManifest * @static - * @param {google.cloud.gkehub.v1.ITypeMeta} message TypeMeta message or plain object to encode + * @param {google.cloud.gkehub.v1.IResourceManifest} message ResourceManifest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TypeMeta.encode = function encode(message, writer) { + ResourceManifest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.apiVersion); + if (message.manifest != null && Object.hasOwnProperty.call(message, "manifest")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.manifest); + if (message.clusterScoped != null && Object.hasOwnProperty.call(message, "clusterScoped")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.clusterScoped); return writer; }; /** - * Encodes the specified TypeMeta message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.TypeMeta.verify|verify} messages. + * Encodes the specified ResourceManifest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ResourceManifest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.TypeMeta + * @memberof google.cloud.gkehub.v1.ResourceManifest * @static - * @param {google.cloud.gkehub.v1.ITypeMeta} message TypeMeta message or plain object to encode + * @param {google.cloud.gkehub.v1.IResourceManifest} message ResourceManifest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TypeMeta.encodeDelimited = function encodeDelimited(message, writer) { + ResourceManifest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TypeMeta message from the specified reader or buffer. + * Decodes a ResourceManifest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.TypeMeta + * @memberof google.cloud.gkehub.v1.ResourceManifest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.TypeMeta} TypeMeta + * @returns {google.cloud.gkehub.v1.ResourceManifest} ResourceManifest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TypeMeta.decode = function decode(reader, length, error) { + ResourceManifest.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.TypeMeta(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ResourceManifest(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.kind = reader.string(); + message.manifest = reader.string(); break; } case 2: { - message.apiVersion = reader.string(); + message.clusterScoped = reader.bool(); break; } default: @@ -45714,135 +47344,132 @@ }; /** - * Decodes a TypeMeta message from the specified reader or buffer, length delimited. + * Decodes a ResourceManifest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.TypeMeta + * @memberof google.cloud.gkehub.v1.ResourceManifest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.TypeMeta} TypeMeta + * @returns {google.cloud.gkehub.v1.ResourceManifest} ResourceManifest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TypeMeta.decodeDelimited = function decodeDelimited(reader) { + ResourceManifest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TypeMeta message. + * Verifies a ResourceManifest message. * @function verify - * @memberof google.cloud.gkehub.v1.TypeMeta + * @memberof google.cloud.gkehub.v1.ResourceManifest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TypeMeta.verify = function verify(message) { + ResourceManifest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; + if (message.manifest != null && message.hasOwnProperty("manifest")) + if (!$util.isString(message.manifest)) + return "manifest: string expected"; + if (message.clusterScoped != null && message.hasOwnProperty("clusterScoped")) + if (typeof message.clusterScoped !== "boolean") + return "clusterScoped: boolean expected"; return null; }; /** - * Creates a TypeMeta message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceManifest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.TypeMeta + * @memberof google.cloud.gkehub.v1.ResourceManifest * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.TypeMeta} TypeMeta + * @returns {google.cloud.gkehub.v1.ResourceManifest} ResourceManifest */ - TypeMeta.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.TypeMeta) + ResourceManifest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ResourceManifest) return object; - var message = new $root.google.cloud.gkehub.v1.TypeMeta(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); + var message = new $root.google.cloud.gkehub.v1.ResourceManifest(); + if (object.manifest != null) + message.manifest = String(object.manifest); + if (object.clusterScoped != null) + message.clusterScoped = Boolean(object.clusterScoped); return message; }; /** - * Creates a plain object from a TypeMeta message. Also converts values to other types if specified. + * Creates a plain object from a ResourceManifest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.TypeMeta + * @memberof google.cloud.gkehub.v1.ResourceManifest * @static - * @param {google.cloud.gkehub.v1.TypeMeta} message TypeMeta + * @param {google.cloud.gkehub.v1.ResourceManifest} message ResourceManifest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TypeMeta.toObject = function toObject(message, options) { + ResourceManifest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kind = ""; - object.apiVersion = ""; + object.manifest = ""; + object.clusterScoped = false; } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; + if (message.manifest != null && message.hasOwnProperty("manifest")) + object.manifest = message.manifest; + if (message.clusterScoped != null && message.hasOwnProperty("clusterScoped")) + object.clusterScoped = message.clusterScoped; return object; }; /** - * Converts this TypeMeta to JSON. + * Converts this ResourceManifest to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.TypeMeta + * @memberof google.cloud.gkehub.v1.ResourceManifest * @instance * @returns {Object.} JSON object */ - TypeMeta.prototype.toJSON = function toJSON() { + ResourceManifest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TypeMeta + * Gets the default type url for ResourceManifest * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.TypeMeta + * @memberof google.cloud.gkehub.v1.ResourceManifest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TypeMeta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceManifest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.TypeMeta"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.ResourceManifest"; }; - return TypeMeta; + return ResourceManifest; })(); - v1.ListFeaturesRequest = (function() { + v1.GkeCluster = (function() { /** - * Properties of a ListFeaturesRequest. + * Properties of a GkeCluster. * @memberof google.cloud.gkehub.v1 - * @interface IListFeaturesRequest - * @property {string|null} [parent] ListFeaturesRequest parent - * @property {number|null} [pageSize] ListFeaturesRequest pageSize - * @property {string|null} [pageToken] ListFeaturesRequest pageToken - * @property {string|null} [filter] ListFeaturesRequest filter - * @property {string|null} [orderBy] ListFeaturesRequest orderBy + * @interface IGkeCluster + * @property {string|null} [resourceLink] GkeCluster resourceLink + * @property {boolean|null} [clusterMissing] GkeCluster clusterMissing */ /** - * Constructs a new ListFeaturesRequest. + * Constructs a new GkeCluster. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a ListFeaturesRequest. - * @implements IListFeaturesRequest + * @classdesc Represents a GkeCluster. + * @implements IGkeCluster * @constructor - * @param {google.cloud.gkehub.v1.IListFeaturesRequest=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IGkeCluster=} [properties] Properties to set */ - function ListFeaturesRequest(properties) { + function GkeCluster(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -45850,133 +47477,91 @@ } /** - * ListFeaturesRequest parent. - * @member {string} parent - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest - * @instance - */ - ListFeaturesRequest.prototype.parent = ""; - - /** - * ListFeaturesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest - * @instance - */ - ListFeaturesRequest.prototype.pageSize = 0; - - /** - * ListFeaturesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest - * @instance - */ - ListFeaturesRequest.prototype.pageToken = ""; - - /** - * ListFeaturesRequest filter. - * @member {string} filter - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * GkeCluster resourceLink. + * @member {string} resourceLink + * @memberof google.cloud.gkehub.v1.GkeCluster * @instance */ - ListFeaturesRequest.prototype.filter = ""; + GkeCluster.prototype.resourceLink = ""; /** - * ListFeaturesRequest orderBy. - * @member {string} orderBy - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * GkeCluster clusterMissing. + * @member {boolean} clusterMissing + * @memberof google.cloud.gkehub.v1.GkeCluster * @instance */ - ListFeaturesRequest.prototype.orderBy = ""; + GkeCluster.prototype.clusterMissing = false; /** - * Creates a new ListFeaturesRequest instance using the specified properties. + * Creates a new GkeCluster instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @memberof google.cloud.gkehub.v1.GkeCluster * @static - * @param {google.cloud.gkehub.v1.IListFeaturesRequest=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.ListFeaturesRequest} ListFeaturesRequest instance + * @param {google.cloud.gkehub.v1.IGkeCluster=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.GkeCluster} GkeCluster instance */ - ListFeaturesRequest.create = function create(properties) { - return new ListFeaturesRequest(properties); + GkeCluster.create = function create(properties) { + return new GkeCluster(properties); }; /** - * Encodes the specified ListFeaturesRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesRequest.verify|verify} messages. + * Encodes the specified GkeCluster message. Does not implicitly {@link google.cloud.gkehub.v1.GkeCluster.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @memberof google.cloud.gkehub.v1.GkeCluster * @static - * @param {google.cloud.gkehub.v1.IListFeaturesRequest} message ListFeaturesRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IGkeCluster} message GkeCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFeaturesRequest.encode = function encode(message, writer) { + GkeCluster.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); - if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.resourceLink != null && Object.hasOwnProperty.call(message, "resourceLink")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceLink); + if (message.clusterMissing != null && Object.hasOwnProperty.call(message, "clusterMissing")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.clusterMissing); return writer; }; /** - * Encodes the specified ListFeaturesRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesRequest.verify|verify} messages. + * Encodes the specified GkeCluster message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GkeCluster.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @memberof google.cloud.gkehub.v1.GkeCluster * @static - * @param {google.cloud.gkehub.v1.IListFeaturesRequest} message ListFeaturesRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IGkeCluster} message GkeCluster message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFeaturesRequest.encodeDelimited = function encodeDelimited(message, writer) { + GkeCluster.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFeaturesRequest message from the specified reader or buffer. + * Decodes a GkeCluster message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @memberof google.cloud.gkehub.v1.GkeCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.ListFeaturesRequest} ListFeaturesRequest + * @returns {google.cloud.gkehub.v1.GkeCluster} GkeCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFeaturesRequest.decode = function decode(reader, length, error) { + GkeCluster.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListFeaturesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GkeCluster(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.resourceLink = reader.string(); break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); - break; - } - case 5: { - message.orderBy = reader.string(); + message.clusterMissing = reader.bool(); break; } default: @@ -45988,157 +47573,136 @@ }; /** - * Decodes a ListFeaturesRequest message from the specified reader or buffer, length delimited. + * Decodes a GkeCluster message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @memberof google.cloud.gkehub.v1.GkeCluster * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.ListFeaturesRequest} ListFeaturesRequest + * @returns {google.cloud.gkehub.v1.GkeCluster} GkeCluster * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFeaturesRequest.decodeDelimited = function decodeDelimited(reader) { + GkeCluster.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFeaturesRequest message. + * Verifies a GkeCluster message. * @function verify - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @memberof google.cloud.gkehub.v1.GkeCluster * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFeaturesRequest.verify = function verify(message) { + GkeCluster.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - if (!$util.isString(message.orderBy)) - return "orderBy: string expected"; + if (message.resourceLink != null && message.hasOwnProperty("resourceLink")) + if (!$util.isString(message.resourceLink)) + return "resourceLink: string expected"; + if (message.clusterMissing != null && message.hasOwnProperty("clusterMissing")) + if (typeof message.clusterMissing !== "boolean") + return "clusterMissing: boolean expected"; return null; }; /** - * Creates a ListFeaturesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GkeCluster message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @memberof google.cloud.gkehub.v1.GkeCluster * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.ListFeaturesRequest} ListFeaturesRequest + * @returns {google.cloud.gkehub.v1.GkeCluster} GkeCluster */ - ListFeaturesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.ListFeaturesRequest) + GkeCluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.GkeCluster) return object; - var message = new $root.google.cloud.gkehub.v1.ListFeaturesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - if (object.orderBy != null) - message.orderBy = String(object.orderBy); + var message = new $root.google.cloud.gkehub.v1.GkeCluster(); + if (object.resourceLink != null) + message.resourceLink = String(object.resourceLink); + if (object.clusterMissing != null) + message.clusterMissing = Boolean(object.clusterMissing); return message; }; /** - * Creates a plain object from a ListFeaturesRequest message. Also converts values to other types if specified. + * Creates a plain object from a GkeCluster message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @memberof google.cloud.gkehub.v1.GkeCluster * @static - * @param {google.cloud.gkehub.v1.ListFeaturesRequest} message ListFeaturesRequest + * @param {google.cloud.gkehub.v1.GkeCluster} message GkeCluster * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFeaturesRequest.toObject = function toObject(message, options) { + GkeCluster.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - object.orderBy = ""; + object.resourceLink = ""; + object.clusterMissing = false; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - if (message.orderBy != null && message.hasOwnProperty("orderBy")) - object.orderBy = message.orderBy; + if (message.resourceLink != null && message.hasOwnProperty("resourceLink")) + object.resourceLink = message.resourceLink; + if (message.clusterMissing != null && message.hasOwnProperty("clusterMissing")) + object.clusterMissing = message.clusterMissing; return object; }; /** - * Converts this ListFeaturesRequest to JSON. + * Converts this GkeCluster to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @memberof google.cloud.gkehub.v1.GkeCluster * @instance * @returns {Object.} JSON object */ - ListFeaturesRequest.prototype.toJSON = function toJSON() { + GkeCluster.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListFeaturesRequest + * Gets the default type url for GkeCluster * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @memberof google.cloud.gkehub.v1.GkeCluster * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListFeaturesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GkeCluster.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.ListFeaturesRequest"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.GkeCluster"; }; - return ListFeaturesRequest; + return GkeCluster; })(); - v1.ListFeaturesResponse = (function() { + v1.KubernetesMetadata = (function() { /** - * Properties of a ListFeaturesResponse. + * Properties of a KubernetesMetadata. * @memberof google.cloud.gkehub.v1 - * @interface IListFeaturesResponse - * @property {Array.|null} [resources] ListFeaturesResponse resources - * @property {string|null} [nextPageToken] ListFeaturesResponse nextPageToken + * @interface IKubernetesMetadata + * @property {string|null} [kubernetesApiServerVersion] KubernetesMetadata kubernetesApiServerVersion + * @property {string|null} [nodeProviderId] KubernetesMetadata nodeProviderId + * @property {number|null} [nodeCount] KubernetesMetadata nodeCount + * @property {number|null} [vcpuCount] KubernetesMetadata vcpuCount + * @property {number|null} [memoryMb] KubernetesMetadata memoryMb + * @property {google.protobuf.ITimestamp|null} [updateTime] KubernetesMetadata updateTime */ /** - * Constructs a new ListFeaturesResponse. + * Constructs a new KubernetesMetadata. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a ListFeaturesResponse. - * @implements IListFeaturesResponse + * @classdesc Represents a KubernetesMetadata. + * @implements IKubernetesMetadata * @constructor - * @param {google.cloud.gkehub.v1.IListFeaturesResponse=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IKubernetesMetadata=} [properties] Properties to set */ - function ListFeaturesResponse(properties) { - this.resources = []; + function KubernetesMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46146,94 +47710,147 @@ } /** - * ListFeaturesResponse resources. - * @member {Array.} resources - * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * KubernetesMetadata kubernetesApiServerVersion. + * @member {string} kubernetesApiServerVersion + * @memberof google.cloud.gkehub.v1.KubernetesMetadata * @instance */ - ListFeaturesResponse.prototype.resources = $util.emptyArray; + KubernetesMetadata.prototype.kubernetesApiServerVersion = ""; /** - * ListFeaturesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * KubernetesMetadata nodeProviderId. + * @member {string} nodeProviderId + * @memberof google.cloud.gkehub.v1.KubernetesMetadata * @instance */ - ListFeaturesResponse.prototype.nextPageToken = ""; + KubernetesMetadata.prototype.nodeProviderId = ""; /** - * Creates a new ListFeaturesResponse instance using the specified properties. + * KubernetesMetadata nodeCount. + * @member {number} nodeCount + * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @instance + */ + KubernetesMetadata.prototype.nodeCount = 0; + + /** + * KubernetesMetadata vcpuCount. + * @member {number} vcpuCount + * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @instance + */ + KubernetesMetadata.prototype.vcpuCount = 0; + + /** + * KubernetesMetadata memoryMb. + * @member {number} memoryMb + * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @instance + */ + KubernetesMetadata.prototype.memoryMb = 0; + + /** + * KubernetesMetadata updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.gkehub.v1.KubernetesMetadata + * @instance + */ + KubernetesMetadata.prototype.updateTime = null; + + /** + * Creates a new KubernetesMetadata instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @memberof google.cloud.gkehub.v1.KubernetesMetadata * @static - * @param {google.cloud.gkehub.v1.IListFeaturesResponse=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.ListFeaturesResponse} ListFeaturesResponse instance + * @param {google.cloud.gkehub.v1.IKubernetesMetadata=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.KubernetesMetadata} KubernetesMetadata instance */ - ListFeaturesResponse.create = function create(properties) { - return new ListFeaturesResponse(properties); + KubernetesMetadata.create = function create(properties) { + return new KubernetesMetadata(properties); }; /** - * Encodes the specified ListFeaturesResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesResponse.verify|verify} messages. + * Encodes the specified KubernetesMetadata message. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @memberof google.cloud.gkehub.v1.KubernetesMetadata * @static - * @param {google.cloud.gkehub.v1.IListFeaturesResponse} message ListFeaturesResponse message or plain object to encode + * @param {google.cloud.gkehub.v1.IKubernetesMetadata} message KubernetesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFeaturesResponse.encode = function encode(message, writer) { + KubernetesMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resources != null && message.resources.length) - for (var i = 0; i < message.resources.length; ++i) - $root.google.cloud.gkehub.v1.Feature.encode(message.resources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListFeaturesResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + if (message.kubernetesApiServerVersion != null && Object.hasOwnProperty.call(message, "kubernetesApiServerVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kubernetesApiServerVersion); + if (message.nodeProviderId != null && Object.hasOwnProperty.call(message, "nodeProviderId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nodeProviderId); + if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nodeCount); + if (message.vcpuCount != null && Object.hasOwnProperty.call(message, "vcpuCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.vcpuCount); + if (message.memoryMb != null && Object.hasOwnProperty.call(message, "memoryMb")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.memoryMb); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 100, wireType 2 =*/802).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified KubernetesMetadata message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.KubernetesMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.KubernetesMetadata * @static - * @param {google.cloud.gkehub.v1.IListFeaturesResponse} message ListFeaturesResponse message or plain object to encode + * @param {google.cloud.gkehub.v1.IKubernetesMetadata} message KubernetesMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListFeaturesResponse.encodeDelimited = function encodeDelimited(message, writer) { + KubernetesMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListFeaturesResponse message from the specified reader or buffer. + * Decodes a KubernetesMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @memberof google.cloud.gkehub.v1.KubernetesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.ListFeaturesResponse} ListFeaturesResponse + * @returns {google.cloud.gkehub.v1.KubernetesMetadata} KubernetesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFeaturesResponse.decode = function decode(reader, length, error) { + KubernetesMetadata.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListFeaturesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.KubernetesMetadata(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.resources && message.resources.length)) - message.resources = []; - message.resources.push($root.google.cloud.gkehub.v1.Feature.decode(reader, reader.uint32())); + message.kubernetesApiServerVersion = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.nodeProviderId = reader.string(); + break; + } + case 3: { + message.nodeCount = reader.int32(); + break; + } + case 4: { + message.vcpuCount = reader.int32(); + break; + } + case 5: { + message.memoryMb = reader.int32(); + break; + } + case 100: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } default: @@ -46245,148 +47862,172 @@ }; /** - * Decodes a ListFeaturesResponse message from the specified reader or buffer, length delimited. + * Decodes a KubernetesMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @memberof google.cloud.gkehub.v1.KubernetesMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.ListFeaturesResponse} ListFeaturesResponse + * @returns {google.cloud.gkehub.v1.KubernetesMetadata} KubernetesMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListFeaturesResponse.decodeDelimited = function decodeDelimited(reader) { + KubernetesMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListFeaturesResponse message. + * Verifies a KubernetesMetadata message. * @function verify - * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @memberof google.cloud.gkehub.v1.KubernetesMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListFeaturesResponse.verify = function verify(message) { + KubernetesMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resources != null && message.hasOwnProperty("resources")) { - if (!Array.isArray(message.resources)) - return "resources: array expected"; - for (var i = 0; i < message.resources.length; ++i) { - var error = $root.google.cloud.gkehub.v1.Feature.verify(message.resources[i]); - if (error) - return "resources." + error; - } + if (message.kubernetesApiServerVersion != null && message.hasOwnProperty("kubernetesApiServerVersion")) + if (!$util.isString(message.kubernetesApiServerVersion)) + return "kubernetesApiServerVersion: string expected"; + if (message.nodeProviderId != null && message.hasOwnProperty("nodeProviderId")) + if (!$util.isString(message.nodeProviderId)) + return "nodeProviderId: string expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount)) + return "nodeCount: integer expected"; + if (message.vcpuCount != null && message.hasOwnProperty("vcpuCount")) + if (!$util.isInteger(message.vcpuCount)) + return "vcpuCount: integer expected"; + if (message.memoryMb != null && message.hasOwnProperty("memoryMb")) + if (!$util.isInteger(message.memoryMb)) + return "memoryMb: integer expected"; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListFeaturesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a KubernetesMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @memberof google.cloud.gkehub.v1.KubernetesMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.ListFeaturesResponse} ListFeaturesResponse + * @returns {google.cloud.gkehub.v1.KubernetesMetadata} KubernetesMetadata */ - ListFeaturesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.ListFeaturesResponse) + KubernetesMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.KubernetesMetadata) return object; - var message = new $root.google.cloud.gkehub.v1.ListFeaturesResponse(); - if (object.resources) { - if (!Array.isArray(object.resources)) - throw TypeError(".google.cloud.gkehub.v1.ListFeaturesResponse.resources: array expected"); - message.resources = []; - for (var i = 0; i < object.resources.length; ++i) { - if (typeof object.resources[i] !== "object") - throw TypeError(".google.cloud.gkehub.v1.ListFeaturesResponse.resources: object expected"); - message.resources[i] = $root.google.cloud.gkehub.v1.Feature.fromObject(object.resources[i]); - } + var message = new $root.google.cloud.gkehub.v1.KubernetesMetadata(); + if (object.kubernetesApiServerVersion != null) + message.kubernetesApiServerVersion = String(object.kubernetesApiServerVersion); + if (object.nodeProviderId != null) + message.nodeProviderId = String(object.nodeProviderId); + if (object.nodeCount != null) + message.nodeCount = object.nodeCount | 0; + if (object.vcpuCount != null) + message.vcpuCount = object.vcpuCount | 0; + if (object.memoryMb != null) + message.memoryMb = object.memoryMb | 0; + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.KubernetesMetadata.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListFeaturesResponse message. Also converts values to other types if specified. + * Creates a plain object from a KubernetesMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @memberof google.cloud.gkehub.v1.KubernetesMetadata * @static - * @param {google.cloud.gkehub.v1.ListFeaturesResponse} message ListFeaturesResponse + * @param {google.cloud.gkehub.v1.KubernetesMetadata} message KubernetesMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListFeaturesResponse.toObject = function toObject(message, options) { + KubernetesMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.resources = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.resources && message.resources.length) { - object.resources = []; - for (var j = 0; j < message.resources.length; ++j) - object.resources[j] = $root.google.cloud.gkehub.v1.Feature.toObject(message.resources[j], options); + if (options.defaults) { + object.kubernetesApiServerVersion = ""; + object.nodeProviderId = ""; + object.nodeCount = 0; + object.vcpuCount = 0; + object.memoryMb = 0; + object.updateTime = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.kubernetesApiServerVersion != null && message.hasOwnProperty("kubernetesApiServerVersion")) + object.kubernetesApiServerVersion = message.kubernetesApiServerVersion; + if (message.nodeProviderId != null && message.hasOwnProperty("nodeProviderId")) + object.nodeProviderId = message.nodeProviderId; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + object.nodeCount = message.nodeCount; + if (message.vcpuCount != null && message.hasOwnProperty("vcpuCount")) + object.vcpuCount = message.vcpuCount; + if (message.memoryMb != null && message.hasOwnProperty("memoryMb")) + object.memoryMb = message.memoryMb; + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); return object; }; /** - * Converts this ListFeaturesResponse to JSON. + * Converts this KubernetesMetadata to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @memberof google.cloud.gkehub.v1.KubernetesMetadata * @instance * @returns {Object.} JSON object */ - ListFeaturesResponse.prototype.toJSON = function toJSON() { + KubernetesMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListFeaturesResponse + * Gets the default type url for KubernetesMetadata * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @memberof google.cloud.gkehub.v1.KubernetesMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListFeaturesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + KubernetesMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.ListFeaturesResponse"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.KubernetesMetadata"; }; - return ListFeaturesResponse; + return KubernetesMetadata; })(); - v1.GetFeatureRequest = (function() { + v1.MonitoringConfig = (function() { /** - * Properties of a GetFeatureRequest. + * Properties of a MonitoringConfig. * @memberof google.cloud.gkehub.v1 - * @interface IGetFeatureRequest - * @property {string|null} [name] GetFeatureRequest name + * @interface IMonitoringConfig + * @property {string|null} [projectId] MonitoringConfig projectId + * @property {string|null} [location] MonitoringConfig location + * @property {string|null} [cluster] MonitoringConfig cluster + * @property {string|null} [kubernetesMetricsPrefix] MonitoringConfig kubernetesMetricsPrefix + * @property {string|null} [clusterHash] MonitoringConfig clusterHash */ /** - * Constructs a new GetFeatureRequest. + * Constructs a new MonitoringConfig. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a GetFeatureRequest. - * @implements IGetFeatureRequest + * @classdesc Represents a MonitoringConfig. + * @implements IMonitoringConfig * @constructor - * @param {google.cloud.gkehub.v1.IGetFeatureRequest=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IMonitoringConfig=} [properties] Properties to set */ - function GetFeatureRequest(properties) { + function MonitoringConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46394,77 +48035,133 @@ } /** - * GetFeatureRequest name. - * @member {string} name - * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * MonitoringConfig projectId. + * @member {string} projectId + * @memberof google.cloud.gkehub.v1.MonitoringConfig * @instance */ - GetFeatureRequest.prototype.name = ""; + MonitoringConfig.prototype.projectId = ""; /** - * Creates a new GetFeatureRequest instance using the specified properties. - * @function create - * @memberof google.cloud.gkehub.v1.GetFeatureRequest - * @static - * @param {google.cloud.gkehub.v1.IGetFeatureRequest=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.GetFeatureRequest} GetFeatureRequest instance + * MonitoringConfig location. + * @member {string} location + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @instance */ - GetFeatureRequest.create = function create(properties) { - return new GetFeatureRequest(properties); - }; + MonitoringConfig.prototype.location = ""; /** - * Encodes the specified GetFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetFeatureRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.gkehub.v1.GetFeatureRequest - * @static - * @param {google.cloud.gkehub.v1.IGetFeatureRequest} message GetFeatureRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * MonitoringConfig cluster. + * @member {string} cluster + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @instance */ - GetFeatureRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; + MonitoringConfig.prototype.cluster = ""; /** - * Encodes the specified GetFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetFeatureRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * MonitoringConfig kubernetesMetricsPrefix. + * @member {string} kubernetesMetricsPrefix + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.kubernetesMetricsPrefix = ""; + + /** + * MonitoringConfig clusterHash. + * @member {string} clusterHash + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.clusterHash = ""; + + /** + * Creates a new MonitoringConfig instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.MonitoringConfig * @static - * @param {google.cloud.gkehub.v1.IGetFeatureRequest} message GetFeatureRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IMonitoringConfig=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.MonitoringConfig} MonitoringConfig instance + */ + MonitoringConfig.create = function create(properties) { + return new MonitoringConfig(properties); + }; + + /** + * Encodes the specified MonitoringConfig message. Does not implicitly {@link google.cloud.gkehub.v1.MonitoringConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {google.cloud.gkehub.v1.IMonitoringConfig} message MonitoringConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetFeatureRequest.encodeDelimited = function encodeDelimited(message, writer) { + MonitoringConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.projectId); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.cluster); + if (message.kubernetesMetricsPrefix != null && Object.hasOwnProperty.call(message, "kubernetesMetricsPrefix")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.kubernetesMetricsPrefix); + if (message.clusterHash != null && Object.hasOwnProperty.call(message, "clusterHash")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.clusterHash); + return writer; + }; + + /** + * Encodes the specified MonitoringConfig message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MonitoringConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {google.cloud.gkehub.v1.IMonitoringConfig} message MonitoringConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MonitoringConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetFeatureRequest message from the specified reader or buffer. + * Decodes a MonitoringConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @memberof google.cloud.gkehub.v1.MonitoringConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.GetFeatureRequest} GetFeatureRequest + * @returns {google.cloud.gkehub.v1.MonitoringConfig} MonitoringConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFeatureRequest.decode = function decode(reader, length, error) { + MonitoringConfig.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GetFeatureRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.MonitoringConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.projectId = reader.string(); + break; + } + case 2: { + message.location = reader.string(); + break; + } + case 3: { + message.cluster = reader.string(); + break; + } + case 4: { + message.kubernetesMetricsPrefix = reader.string(); + break; + } + case 5: { + message.clusterHash = reader.string(); break; } default: @@ -46476,125 +48173,155 @@ }; /** - * Decodes a GetFeatureRequest message from the specified reader or buffer, length delimited. + * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @memberof google.cloud.gkehub.v1.MonitoringConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.GetFeatureRequest} GetFeatureRequest + * @returns {google.cloud.gkehub.v1.MonitoringConfig} MonitoringConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetFeatureRequest.decodeDelimited = function decodeDelimited(reader) { + MonitoringConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetFeatureRequest message. + * Verifies a MonitoringConfig message. * @function verify - * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @memberof google.cloud.gkehub.v1.MonitoringConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetFeatureRequest.verify = function verify(message) { + MonitoringConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.cluster != null && message.hasOwnProperty("cluster")) + if (!$util.isString(message.cluster)) + return "cluster: string expected"; + if (message.kubernetesMetricsPrefix != null && message.hasOwnProperty("kubernetesMetricsPrefix")) + if (!$util.isString(message.kubernetesMetricsPrefix)) + return "kubernetesMetricsPrefix: string expected"; + if (message.clusterHash != null && message.hasOwnProperty("clusterHash")) + if (!$util.isString(message.clusterHash)) + return "clusterHash: string expected"; return null; }; /** - * Creates a GetFeatureRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MonitoringConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @memberof google.cloud.gkehub.v1.MonitoringConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.GetFeatureRequest} GetFeatureRequest + * @returns {google.cloud.gkehub.v1.MonitoringConfig} MonitoringConfig */ - GetFeatureRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.GetFeatureRequest) + MonitoringConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.MonitoringConfig) return object; - var message = new $root.google.cloud.gkehub.v1.GetFeatureRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.gkehub.v1.MonitoringConfig(); + if (object.projectId != null) + message.projectId = String(object.projectId); + if (object.location != null) + message.location = String(object.location); + if (object.cluster != null) + message.cluster = String(object.cluster); + if (object.kubernetesMetricsPrefix != null) + message.kubernetesMetricsPrefix = String(object.kubernetesMetricsPrefix); + if (object.clusterHash != null) + message.clusterHash = String(object.clusterHash); return message; }; /** - * Creates a plain object from a GetFeatureRequest message. Also converts values to other types if specified. + * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @memberof google.cloud.gkehub.v1.MonitoringConfig * @static - * @param {google.cloud.gkehub.v1.GetFeatureRequest} message GetFeatureRequest + * @param {google.cloud.gkehub.v1.MonitoringConfig} message MonitoringConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetFeatureRequest.toObject = function toObject(message, options) { + MonitoringConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.projectId = ""; + object.location = ""; + object.cluster = ""; + object.kubernetesMetricsPrefix = ""; + object.clusterHash = ""; + } + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = message.cluster; + if (message.kubernetesMetricsPrefix != null && message.hasOwnProperty("kubernetesMetricsPrefix")) + object.kubernetesMetricsPrefix = message.kubernetesMetricsPrefix; + if (message.clusterHash != null && message.hasOwnProperty("clusterHash")) + object.clusterHash = message.clusterHash; return object; }; /** - * Converts this GetFeatureRequest to JSON. + * Converts this MonitoringConfig to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @memberof google.cloud.gkehub.v1.MonitoringConfig * @instance * @returns {Object.} JSON object */ - GetFeatureRequest.prototype.toJSON = function toJSON() { + MonitoringConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetFeatureRequest + * Gets the default type url for MonitoringConfig * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @memberof google.cloud.gkehub.v1.MonitoringConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetFeatureRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.GetFeatureRequest"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.MonitoringConfig"; }; - return GetFeatureRequest; + return MonitoringConfig; })(); - v1.CreateFeatureRequest = (function() { + v1.MembershipState = (function() { /** - * Properties of a CreateFeatureRequest. + * Properties of a MembershipState. * @memberof google.cloud.gkehub.v1 - * @interface ICreateFeatureRequest - * @property {string|null} [parent] CreateFeatureRequest parent - * @property {string|null} [featureId] CreateFeatureRequest featureId - * @property {google.cloud.gkehub.v1.IFeature|null} [resource] CreateFeatureRequest resource - * @property {string|null} [requestId] CreateFeatureRequest requestId + * @interface IMembershipState + * @property {google.cloud.gkehub.v1.MembershipState.Code|null} [code] MembershipState code */ /** - * Constructs a new CreateFeatureRequest. + * Constructs a new MembershipState. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a CreateFeatureRequest. - * @implements ICreateFeatureRequest + * @classdesc Represents a MembershipState. + * @implements IMembershipState * @constructor - * @param {google.cloud.gkehub.v1.ICreateFeatureRequest=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IMembershipState=} [properties] Properties to set */ - function CreateFeatureRequest(properties) { + function MembershipState(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46602,119 +48329,77 @@ } /** - * CreateFeatureRequest parent. - * @member {string} parent - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest - * @instance - */ - CreateFeatureRequest.prototype.parent = ""; - - /** - * CreateFeatureRequest featureId. - * @member {string} featureId - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest - * @instance - */ - CreateFeatureRequest.prototype.featureId = ""; - - /** - * CreateFeatureRequest resource. - * @member {google.cloud.gkehub.v1.IFeature|null|undefined} resource - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest - * @instance - */ - CreateFeatureRequest.prototype.resource = null; - - /** - * CreateFeatureRequest requestId. - * @member {string} requestId - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * MembershipState code. + * @member {google.cloud.gkehub.v1.MembershipState.Code} code + * @memberof google.cloud.gkehub.v1.MembershipState * @instance */ - CreateFeatureRequest.prototype.requestId = ""; + MembershipState.prototype.code = 0; /** - * Creates a new CreateFeatureRequest instance using the specified properties. + * Creates a new MembershipState instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @memberof google.cloud.gkehub.v1.MembershipState * @static - * @param {google.cloud.gkehub.v1.ICreateFeatureRequest=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.CreateFeatureRequest} CreateFeatureRequest instance + * @param {google.cloud.gkehub.v1.IMembershipState=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.MembershipState} MembershipState instance */ - CreateFeatureRequest.create = function create(properties) { - return new CreateFeatureRequest(properties); + MembershipState.create = function create(properties) { + return new MembershipState(properties); }; /** - * Encodes the specified CreateFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateFeatureRequest.verify|verify} messages. + * Encodes the specified MembershipState message. Does not implicitly {@link google.cloud.gkehub.v1.MembershipState.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @memberof google.cloud.gkehub.v1.MembershipState * @static - * @param {google.cloud.gkehub.v1.ICreateFeatureRequest} message CreateFeatureRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IMembershipState} message MembershipState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFeatureRequest.encode = function encode(message, writer) { + MembershipState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.featureId != null && Object.hasOwnProperty.call(message, "featureId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.featureId); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.gkehub.v1.Feature.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + if (message.code != null && Object.hasOwnProperty.call(message, "code")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code); return writer; }; /** - * Encodes the specified CreateFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateFeatureRequest.verify|verify} messages. + * Encodes the specified MembershipState message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.MembershipState.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @memberof google.cloud.gkehub.v1.MembershipState * @static - * @param {google.cloud.gkehub.v1.ICreateFeatureRequest} message CreateFeatureRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IMembershipState} message MembershipState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateFeatureRequest.encodeDelimited = function encodeDelimited(message, writer) { + MembershipState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateFeatureRequest message from the specified reader or buffer. + * Decodes a MembershipState message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @memberof google.cloud.gkehub.v1.MembershipState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.CreateFeatureRequest} CreateFeatureRequest + * @returns {google.cloud.gkehub.v1.MembershipState} MembershipState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFeatureRequest.decode = function decode(reader, length, error) { + MembershipState.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.CreateFeatureRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.MembershipState(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.featureId = reader.string(); - break; - } - case 3: { - message.resource = $root.google.cloud.gkehub.v1.Feature.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); + message.code = reader.int32(); break; } default: @@ -46726,154 +48411,186 @@ }; /** - * Decodes a CreateFeatureRequest message from the specified reader or buffer, length delimited. + * Decodes a MembershipState message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @memberof google.cloud.gkehub.v1.MembershipState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.CreateFeatureRequest} CreateFeatureRequest + * @returns {google.cloud.gkehub.v1.MembershipState} MembershipState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateFeatureRequest.decodeDelimited = function decodeDelimited(reader) { + MembershipState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateFeatureRequest message. + * Verifies a MembershipState message. * @function verify - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @memberof google.cloud.gkehub.v1.MembershipState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateFeatureRequest.verify = function verify(message) { + MembershipState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.featureId != null && message.hasOwnProperty("featureId")) - if (!$util.isString(message.featureId)) - return "featureId: string expected"; - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.gkehub.v1.Feature.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.code != null && message.hasOwnProperty("code")) + switch (message.code) { + default: + return "code: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } return null; }; /** - * Creates a CreateFeatureRequest message from a plain object. Also converts values to their respective internal types. + * Creates a MembershipState message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @memberof google.cloud.gkehub.v1.MembershipState * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.CreateFeatureRequest} CreateFeatureRequest + * @returns {google.cloud.gkehub.v1.MembershipState} MembershipState */ - CreateFeatureRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.CreateFeatureRequest) + MembershipState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.MembershipState) return object; - var message = new $root.google.cloud.gkehub.v1.CreateFeatureRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.featureId != null) - message.featureId = String(object.featureId); - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.gkehub.v1.CreateFeatureRequest.resource: object expected"); - message.resource = $root.google.cloud.gkehub.v1.Feature.fromObject(object.resource); + var message = new $root.google.cloud.gkehub.v1.MembershipState(); + switch (object.code) { + default: + if (typeof object.code === "number") { + message.code = object.code; + break; + } + break; + case "CODE_UNSPECIFIED": + case 0: + message.code = 0; + break; + case "CREATING": + case 1: + message.code = 1; + break; + case "READY": + case 2: + message.code = 2; + break; + case "DELETING": + case 3: + message.code = 3; + break; + case "UPDATING": + case 4: + message.code = 4; + break; + case "SERVICE_UPDATING": + case 5: + message.code = 5; + break; } - if (object.requestId != null) - message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a CreateFeatureRequest message. Also converts values to other types if specified. + * Creates a plain object from a MembershipState message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @memberof google.cloud.gkehub.v1.MembershipState * @static - * @param {google.cloud.gkehub.v1.CreateFeatureRequest} message CreateFeatureRequest + * @param {google.cloud.gkehub.v1.MembershipState} message MembershipState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateFeatureRequest.toObject = function toObject(message, options) { + MembershipState.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.featureId = ""; - object.resource = null; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.featureId != null && message.hasOwnProperty("featureId")) - object.featureId = message.featureId; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.gkehub.v1.Feature.toObject(message.resource, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (options.defaults) + object.code = options.enums === String ? "CODE_UNSPECIFIED" : 0; + if (message.code != null && message.hasOwnProperty("code")) + object.code = options.enums === String ? $root.google.cloud.gkehub.v1.MembershipState.Code[message.code] === undefined ? message.code : $root.google.cloud.gkehub.v1.MembershipState.Code[message.code] : message.code; return object; }; /** - * Converts this CreateFeatureRequest to JSON. + * Converts this MembershipState to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @memberof google.cloud.gkehub.v1.MembershipState * @instance * @returns {Object.} JSON object */ - CreateFeatureRequest.prototype.toJSON = function toJSON() { + MembershipState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateFeatureRequest + * Gets the default type url for MembershipState * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @memberof google.cloud.gkehub.v1.MembershipState * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateFeatureRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MembershipState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.CreateFeatureRequest"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.MembershipState"; }; - return CreateFeatureRequest; + /** + * Code enum. + * @name google.cloud.gkehub.v1.MembershipState.Code + * @enum {number} + * @property {number} CODE_UNSPECIFIED=0 CODE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} READY=2 READY value + * @property {number} DELETING=3 DELETING value + * @property {number} UPDATING=4 UPDATING value + * @property {number} SERVICE_UPDATING=5 SERVICE_UPDATING value + */ + MembershipState.Code = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "READY"] = 2; + values[valuesById[3] = "DELETING"] = 3; + values[valuesById[4] = "UPDATING"] = 4; + values[valuesById[5] = "SERVICE_UPDATING"] = 5; + return values; + })(); + + return MembershipState; })(); - v1.DeleteFeatureRequest = (function() { + v1.Authority = (function() { /** - * Properties of a DeleteFeatureRequest. + * Properties of an Authority. * @memberof google.cloud.gkehub.v1 - * @interface IDeleteFeatureRequest - * @property {string|null} [name] DeleteFeatureRequest name - * @property {boolean|null} [force] DeleteFeatureRequest force - * @property {string|null} [requestId] DeleteFeatureRequest requestId + * @interface IAuthority + * @property {string|null} [issuer] Authority issuer + * @property {string|null} [workloadIdentityPool] Authority workloadIdentityPool + * @property {string|null} [identityProvider] Authority identityProvider + * @property {Uint8Array|null} [oidcJwks] Authority oidcJwks */ /** - * Constructs a new DeleteFeatureRequest. + * Constructs a new Authority. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents a DeleteFeatureRequest. - * @implements IDeleteFeatureRequest + * @classdesc Represents an Authority. + * @implements IAuthority * @constructor - * @param {google.cloud.gkehub.v1.IDeleteFeatureRequest=} [properties] Properties to set + * @param {google.cloud.gkehub.v1.IAuthority=} [properties] Properties to set */ - function DeleteFeatureRequest(properties) { + function Authority(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -46881,105 +48598,119 @@ } /** - * DeleteFeatureRequest name. - * @member {string} name - * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * Authority issuer. + * @member {string} issuer + * @memberof google.cloud.gkehub.v1.Authority * @instance */ - DeleteFeatureRequest.prototype.name = ""; + Authority.prototype.issuer = ""; /** - * DeleteFeatureRequest force. - * @member {boolean} force - * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * Authority workloadIdentityPool. + * @member {string} workloadIdentityPool + * @memberof google.cloud.gkehub.v1.Authority * @instance */ - DeleteFeatureRequest.prototype.force = false; + Authority.prototype.workloadIdentityPool = ""; /** - * DeleteFeatureRequest requestId. - * @member {string} requestId - * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * Authority identityProvider. + * @member {string} identityProvider + * @memberof google.cloud.gkehub.v1.Authority * @instance */ - DeleteFeatureRequest.prototype.requestId = ""; + Authority.prototype.identityProvider = ""; /** - * Creates a new DeleteFeatureRequest instance using the specified properties. - * @function create - * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest - * @static - * @param {google.cloud.gkehub.v1.IDeleteFeatureRequest=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.DeleteFeatureRequest} DeleteFeatureRequest instance + * Authority oidcJwks. + * @member {Uint8Array} oidcJwks + * @memberof google.cloud.gkehub.v1.Authority + * @instance */ - DeleteFeatureRequest.create = function create(properties) { - return new DeleteFeatureRequest(properties); + Authority.prototype.oidcJwks = $util.newBuffer([]); + + /** + * Creates a new Authority instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.Authority + * @static + * @param {google.cloud.gkehub.v1.IAuthority=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.Authority} Authority instance + */ + Authority.create = function create(properties) { + return new Authority(properties); }; /** - * Encodes the specified DeleteFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteFeatureRequest.verify|verify} messages. + * Encodes the specified Authority message. Does not implicitly {@link google.cloud.gkehub.v1.Authority.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @memberof google.cloud.gkehub.v1.Authority * @static - * @param {google.cloud.gkehub.v1.IDeleteFeatureRequest} message DeleteFeatureRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IAuthority} message Authority message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFeatureRequest.encode = function encode(message, writer) { + Authority.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + if (message.issuer != null && Object.hasOwnProperty.call(message, "issuer")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issuer); + if (message.workloadIdentityPool != null && Object.hasOwnProperty.call(message, "workloadIdentityPool")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.workloadIdentityPool); + if (message.identityProvider != null && Object.hasOwnProperty.call(message, "identityProvider")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identityProvider); + if (message.oidcJwks != null && Object.hasOwnProperty.call(message, "oidcJwks")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.oidcJwks); return writer; }; /** - * Encodes the specified DeleteFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteFeatureRequest.verify|verify} messages. + * Encodes the specified Authority message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.Authority.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @memberof google.cloud.gkehub.v1.Authority * @static - * @param {google.cloud.gkehub.v1.IDeleteFeatureRequest} message DeleteFeatureRequest message or plain object to encode + * @param {google.cloud.gkehub.v1.IAuthority} message Authority message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteFeatureRequest.encodeDelimited = function encodeDelimited(message, writer) { + Authority.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteFeatureRequest message from the specified reader or buffer. + * Decodes an Authority message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @memberof google.cloud.gkehub.v1.Authority * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.DeleteFeatureRequest} DeleteFeatureRequest + * @returns {google.cloud.gkehub.v1.Authority} Authority * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFeatureRequest.decode = function decode(reader, length, error) { + Authority.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.DeleteFeatureRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.Authority(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.issuer = reader.string(); break; } case 2: { - message.force = reader.bool(); + message.workloadIdentityPool = reader.string(); break; } case 3: { - message.requestId = reader.string(); + message.identityProvider = reader.string(); + break; + } + case 4: { + message.oidcJwks = reader.bytes(); break; } default: @@ -46991,797 +48722,16866 @@ }; /** - * Decodes a DeleteFeatureRequest message from the specified reader or buffer, length delimited. + * Decodes an Authority message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @memberof google.cloud.gkehub.v1.Authority * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.DeleteFeatureRequest} DeleteFeatureRequest + * @returns {google.cloud.gkehub.v1.Authority} Authority * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteFeatureRequest.decodeDelimited = function decodeDelimited(reader) { + Authority.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteFeatureRequest message. + * Verifies an Authority message. * @function verify - * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @memberof google.cloud.gkehub.v1.Authority * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteFeatureRequest.verify = function verify(message) { + Authority.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; + if (message.issuer != null && message.hasOwnProperty("issuer")) + if (!$util.isString(message.issuer)) + return "issuer: string expected"; + if (message.workloadIdentityPool != null && message.hasOwnProperty("workloadIdentityPool")) + if (!$util.isString(message.workloadIdentityPool)) + return "workloadIdentityPool: string expected"; + if (message.identityProvider != null && message.hasOwnProperty("identityProvider")) + if (!$util.isString(message.identityProvider)) + return "identityProvider: string expected"; + if (message.oidcJwks != null && message.hasOwnProperty("oidcJwks")) + if (!(message.oidcJwks && typeof message.oidcJwks.length === "number" || $util.isString(message.oidcJwks))) + return "oidcJwks: buffer expected"; return null; }; /** - * Creates a DeleteFeatureRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Authority message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @memberof google.cloud.gkehub.v1.Authority * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.DeleteFeatureRequest} DeleteFeatureRequest + * @returns {google.cloud.gkehub.v1.Authority} Authority */ - DeleteFeatureRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.DeleteFeatureRequest) + Authority.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.Authority) return object; - var message = new $root.google.cloud.gkehub.v1.DeleteFeatureRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.force != null) - message.force = Boolean(object.force); - if (object.requestId != null) - message.requestId = String(object.requestId); + var message = new $root.google.cloud.gkehub.v1.Authority(); + if (object.issuer != null) + message.issuer = String(object.issuer); + if (object.workloadIdentityPool != null) + message.workloadIdentityPool = String(object.workloadIdentityPool); + if (object.identityProvider != null) + message.identityProvider = String(object.identityProvider); + if (object.oidcJwks != null) + if (typeof object.oidcJwks === "string") + $util.base64.decode(object.oidcJwks, message.oidcJwks = $util.newBuffer($util.base64.length(object.oidcJwks)), 0); + else if (object.oidcJwks.length >= 0) + message.oidcJwks = object.oidcJwks; return message; }; /** - * Creates a plain object from a DeleteFeatureRequest message. Also converts values to other types if specified. + * Creates a plain object from an Authority message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @memberof google.cloud.gkehub.v1.Authority * @static - * @param {google.cloud.gkehub.v1.DeleteFeatureRequest} message DeleteFeatureRequest + * @param {google.cloud.gkehub.v1.Authority} message Authority * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteFeatureRequest.toObject = function toObject(message, options) { + Authority.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.force = false; - object.requestId = ""; + object.issuer = ""; + object.workloadIdentityPool = ""; + object.identityProvider = ""; + if (options.bytes === String) + object.oidcJwks = ""; + else { + object.oidcJwks = []; + if (options.bytes !== Array) + object.oidcJwks = $util.newBuffer(object.oidcJwks); + } } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; + if (message.issuer != null && message.hasOwnProperty("issuer")) + object.issuer = message.issuer; + if (message.workloadIdentityPool != null && message.hasOwnProperty("workloadIdentityPool")) + object.workloadIdentityPool = message.workloadIdentityPool; + if (message.identityProvider != null && message.hasOwnProperty("identityProvider")) + object.identityProvider = message.identityProvider; + if (message.oidcJwks != null && message.hasOwnProperty("oidcJwks")) + object.oidcJwks = options.bytes === String ? $util.base64.encode(message.oidcJwks, 0, message.oidcJwks.length) : options.bytes === Array ? Array.prototype.slice.call(message.oidcJwks) : message.oidcJwks; return object; }; /** - * Converts this DeleteFeatureRequest to JSON. + * Converts this Authority to JSON. * @function toJSON - * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @memberof google.cloud.gkehub.v1.Authority * @instance * @returns {Object.} JSON object */ - DeleteFeatureRequest.prototype.toJSON = function toJSON() { + Authority.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteFeatureRequest + * Gets the default type url for Authority * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @memberof google.cloud.gkehub.v1.Authority * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteFeatureRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Authority.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.v1.DeleteFeatureRequest"; + return typeUrlPrefix + "/google.cloud.gkehub.v1.Authority"; }; - return DeleteFeatureRequest; + return Authority; })(); - v1.UpdateFeatureRequest = (function() { - - /** - * Properties of an UpdateFeatureRequest. - * @memberof google.cloud.gkehub.v1 - * @interface IUpdateFeatureRequest - * @property {string|null} [name] UpdateFeatureRequest name - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFeatureRequest updateMask - * @property {google.cloud.gkehub.v1.IFeature|null} [resource] UpdateFeatureRequest resource - * @property {string|null} [requestId] UpdateFeatureRequest requestId - */ + v1.GkeHub = (function() { /** - * Constructs a new UpdateFeatureRequest. + * Constructs a new GkeHub service. * @memberof google.cloud.gkehub.v1 - * @classdesc Represents an UpdateFeatureRequest. - * @implements IUpdateFeatureRequest + * @classdesc Represents a GkeHub + * @extends $protobuf.rpc.Service * @constructor - * @param {google.cloud.gkehub.v1.IUpdateFeatureRequest=} [properties] Properties to set + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited */ - function UpdateFeatureRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + function GkeHub(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); } - /** - * UpdateFeatureRequest name. - * @member {string} name - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest - * @instance - */ - UpdateFeatureRequest.prototype.name = ""; + (GkeHub.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = GkeHub; /** - * UpdateFeatureRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest - * @instance + * Creates new GkeHub service using the specified rpc implementation. + * @function create + * @memberof google.cloud.gkehub.v1.GkeHub + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {GkeHub} RPC service. Useful where requests and/or responses are streamed. */ - UpdateFeatureRequest.prototype.updateMask = null; + GkeHub.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * UpdateFeatureRequest resource. - * @member {google.cloud.gkehub.v1.IFeature|null|undefined} resource - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest - * @instance + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listMemberships}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef ListMembershipsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.ListMembershipsResponse} [response] ListMembershipsResponse */ - UpdateFeatureRequest.prototype.resource = null; /** - * UpdateFeatureRequest requestId. - * @member {string} requestId - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * Calls ListMemberships. + * @function listMemberships + * @memberof google.cloud.gkehub.v1.GkeHub * @instance - */ - UpdateFeatureRequest.prototype.requestId = ""; + * @param {google.cloud.gkehub.v1.IListMembershipsRequest} request ListMembershipsRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.ListMembershipsCallback} callback Node-style callback called with the error, if any, and ListMembershipsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.listMemberships = function listMemberships(request, callback) { + return this.rpcCall(listMemberships, $root.google.cloud.gkehub.v1.ListMembershipsRequest, $root.google.cloud.gkehub.v1.ListMembershipsResponse, request, callback); + }, "name", { value: "ListMemberships" }); /** - * Creates a new UpdateFeatureRequest instance using the specified properties. - * @function create - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest - * @static - * @param {google.cloud.gkehub.v1.IUpdateFeatureRequest=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.UpdateFeatureRequest} UpdateFeatureRequest instance + * Calls ListMemberships. + * @function listMemberships + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListMembershipsRequest} request ListMembershipsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateFeatureRequest.create = function create(properties) { - return new UpdateFeatureRequest(properties); - }; /** - * Encodes the specified UpdateFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateFeatureRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest - * @static - * @param {google.cloud.gkehub.v1.IUpdateFeatureRequest} message UpdateFeatureRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listBoundMemberships}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef ListBoundMembershipsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.ListBoundMembershipsResponse} [response] ListBoundMembershipsResponse */ - UpdateFeatureRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - $root.google.cloud.gkehub.v1.Feature.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); - return writer; - }; /** - * Encodes the specified UpdateFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateFeatureRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest - * @static - * @param {google.cloud.gkehub.v1.IUpdateFeatureRequest} message UpdateFeatureRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls ListBoundMemberships. + * @function listBoundMemberships + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListBoundMembershipsRequest} request ListBoundMembershipsRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.ListBoundMembershipsCallback} callback Node-style callback called with the error, if any, and ListBoundMembershipsResponse + * @returns {undefined} + * @variation 1 */ - UpdateFeatureRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + Object.defineProperty(GkeHub.prototype.listBoundMemberships = function listBoundMemberships(request, callback) { + return this.rpcCall(listBoundMemberships, $root.google.cloud.gkehub.v1.ListBoundMembershipsRequest, $root.google.cloud.gkehub.v1.ListBoundMembershipsResponse, request, callback); + }, "name", { value: "ListBoundMemberships" }); /** - * Decodes an UpdateFeatureRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.UpdateFeatureRequest} UpdateFeatureRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls ListBoundMemberships. + * @function listBoundMemberships + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListBoundMembershipsRequest} request ListBoundMembershipsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateFeatureRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.UpdateFeatureRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.resource = $root.google.cloud.gkehub.v1.Feature.decode(reader, reader.uint32()); - break; - } - case 4: { - message.requestId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an UpdateFeatureRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.UpdateFeatureRequest} UpdateFeatureRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listFeatures}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef ListFeaturesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.ListFeaturesResponse} [response] ListFeaturesResponse */ - UpdateFeatureRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies an UpdateFeatureRequest message. - * @function verify - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls ListFeatures. + * @function listFeatures + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListFeaturesRequest} request ListFeaturesRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.ListFeaturesCallback} callback Node-style callback called with the error, if any, and ListFeaturesResponse + * @returns {undefined} + * @variation 1 */ - UpdateFeatureRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.resource != null && message.hasOwnProperty("resource")) { - var error = $root.google.cloud.gkehub.v1.Feature.verify(message.resource); - if (error) - return "resource." + error; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - return null; - }; + Object.defineProperty(GkeHub.prototype.listFeatures = function listFeatures(request, callback) { + return this.rpcCall(listFeatures, $root.google.cloud.gkehub.v1.ListFeaturesRequest, $root.google.cloud.gkehub.v1.ListFeaturesResponse, request, callback); + }, "name", { value: "ListFeatures" }); /** - * Creates an UpdateFeatureRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.UpdateFeatureRequest} UpdateFeatureRequest + * Calls ListFeatures. + * @function listFeatures + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListFeaturesRequest} request ListFeaturesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - UpdateFeatureRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.UpdateFeatureRequest) - return object; - var message = new $root.google.cloud.gkehub.v1.UpdateFeatureRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.gkehub.v1.UpdateFeatureRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.resource != null) { - if (typeof object.resource !== "object") - throw TypeError(".google.cloud.gkehub.v1.UpdateFeatureRequest.resource: object expected"); - message.resource = $root.google.cloud.gkehub.v1.Feature.fromObject(object.resource); - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; - }; /** - * Creates a plain object from an UpdateFeatureRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest - * @static - * @param {google.cloud.gkehub.v1.UpdateFeatureRequest} message UpdateFeatureRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getMembership}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef GetMembershipCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.Membership} [response] Membership */ - UpdateFeatureRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.updateMask = null; - object.resource = null; - object.requestId = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = $root.google.cloud.gkehub.v1.Feature.toObject(message.resource, options); - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - return object; - }; /** - * Converts this UpdateFeatureRequest to JSON. - * @function toJSON - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * Calls GetMembership. + * @function getMembership + * @memberof google.cloud.gkehub.v1.GkeHub * @instance - * @returns {Object.} JSON object + * @param {google.cloud.gkehub.v1.IGetMembershipRequest} request GetMembershipRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.GetMembershipCallback} callback Node-style callback called with the error, if any, and Membership + * @returns {undefined} + * @variation 1 */ - UpdateFeatureRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + Object.defineProperty(GkeHub.prototype.getMembership = function getMembership(request, callback) { + return this.rpcCall(getMembership, $root.google.cloud.gkehub.v1.GetMembershipRequest, $root.google.cloud.gkehub.v1.Membership, request, callback); + }, "name", { value: "GetMembership" }); /** - * Gets the default type url for UpdateFeatureRequest - * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateFeatureRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.gkehub.v1.UpdateFeatureRequest"; - }; + * Calls GetMembership. + * @function getMembership + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetMembershipRequest} request GetMembershipRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return UpdateFeatureRequest; - })(); + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getFeature}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef GetFeatureCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.Feature} [response] Feature + */ - v1.OperationMetadata = (function() { + /** + * Calls GetFeature. + * @function getFeature + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetFeatureRequest} request GetFeatureRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.GetFeatureCallback} callback Node-style callback called with the error, if any, and Feature + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.getFeature = function getFeature(request, callback) { + return this.rpcCall(getFeature, $root.google.cloud.gkehub.v1.GetFeatureRequest, $root.google.cloud.gkehub.v1.Feature, request, callback); + }, "name", { value: "GetFeature" }); /** - * Properties of an OperationMetadata. - * @memberof google.cloud.gkehub.v1 - * @interface IOperationMetadata - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - * @property {string|null} [target] OperationMetadata target - * @property {string|null} [verb] OperationMetadata verb - * @property {string|null} [statusDetail] OperationMetadata statusDetail - * @property {boolean|null} [cancelRequested] OperationMetadata cancelRequested - * @property {string|null} [apiVersion] OperationMetadata apiVersion + * Calls GetFeature. + * @function getFeature + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetFeatureRequest} request GetFeatureRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.gkehub.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.gkehub.v1.IOperationMetadata=} [properties] Properties to set + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createMembership}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef CreateMembershipCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - function OperationMetadata(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.gkehub.v1.OperationMetadata + * Calls CreateMembership. + * @function createMembership + * @memberof google.cloud.gkehub.v1.GkeHub * @instance + * @param {google.cloud.gkehub.v1.ICreateMembershipRequest} request CreateMembershipRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.CreateMembershipCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - OperationMetadata.prototype.createTime = null; + Object.defineProperty(GkeHub.prototype.createMembership = function createMembership(request, callback) { + return this.rpcCall(createMembership, $root.google.cloud.gkehub.v1.CreateMembershipRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateMembership" }); /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.gkehub.v1.OperationMetadata + * Calls CreateMembership. + * @function createMembership + * @memberof google.cloud.gkehub.v1.GkeHub * @instance + * @param {google.cloud.gkehub.v1.ICreateMembershipRequest} request CreateMembershipRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - OperationMetadata.prototype.endTime = null; /** - * OperationMetadata target. - * @member {string} target - * @memberof google.cloud.gkehub.v1.OperationMetadata - * @instance + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createFeature}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef CreateFeatureCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - OperationMetadata.prototype.target = ""; /** - * OperationMetadata verb. - * @member {string} verb - * @memberof google.cloud.gkehub.v1.OperationMetadata + * Calls CreateFeature. + * @function createFeature + * @memberof google.cloud.gkehub.v1.GkeHub * @instance + * @param {google.cloud.gkehub.v1.ICreateFeatureRequest} request CreateFeatureRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.CreateFeatureCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - OperationMetadata.prototype.verb = ""; + Object.defineProperty(GkeHub.prototype.createFeature = function createFeature(request, callback) { + return this.rpcCall(createFeature, $root.google.cloud.gkehub.v1.CreateFeatureRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateFeature" }); /** - * OperationMetadata statusDetail. - * @member {string} statusDetail - * @memberof google.cloud.gkehub.v1.OperationMetadata + * Calls CreateFeature. + * @function createFeature + * @memberof google.cloud.gkehub.v1.GkeHub * @instance + * @param {google.cloud.gkehub.v1.ICreateFeatureRequest} request CreateFeatureRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - OperationMetadata.prototype.statusDetail = ""; /** - * OperationMetadata cancelRequested. - * @member {boolean} cancelRequested - * @memberof google.cloud.gkehub.v1.OperationMetadata + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteMembership}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef DeleteMembershipCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteMembership. + * @function deleteMembership + * @memberof google.cloud.gkehub.v1.GkeHub * @instance + * @param {google.cloud.gkehub.v1.IDeleteMembershipRequest} request DeleteMembershipRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.DeleteMembershipCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - OperationMetadata.prototype.cancelRequested = false; + Object.defineProperty(GkeHub.prototype.deleteMembership = function deleteMembership(request, callback) { + return this.rpcCall(deleteMembership, $root.google.cloud.gkehub.v1.DeleteMembershipRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteMembership" }); /** - * OperationMetadata apiVersion. - * @member {string} apiVersion - * @memberof google.cloud.gkehub.v1.OperationMetadata + * Calls DeleteMembership. + * @function deleteMembership + * @memberof google.cloud.gkehub.v1.GkeHub * @instance + * @param {google.cloud.gkehub.v1.IDeleteMembershipRequest} request DeleteMembershipRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - OperationMetadata.prototype.apiVersion = ""; /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.gkehub.v1.OperationMetadata - * @static - * @param {google.cloud.gkehub.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.gkehub.v1.OperationMetadata} OperationMetadata instance + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteFeature}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef DeleteFeatureCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.gkehub.v1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.gkehub.v1.OperationMetadata - * @static - * @param {google.cloud.gkehub.v1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeleteFeature. + * @function deleteFeature + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteFeatureRequest} request DeleteFeatureRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.DeleteFeatureCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - OperationMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); - if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); - if (message.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusDetail); - if (message.cancelRequested != null && Object.hasOwnProperty.call(message, "cancelRequested")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.cancelRequested); - if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); - return writer; - }; + Object.defineProperty(GkeHub.prototype.deleteFeature = function deleteFeature(request, callback) { + return this.rpcCall(deleteFeature, $root.google.cloud.gkehub.v1.DeleteFeatureRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteFeature" }); /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.gkehub.v1.OperationMetadata - * @static - * @param {google.cloud.gkehub.v1.IOperationMetadata} message OperationMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer + * Calls DeleteFeature. + * @function deleteFeature + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteFeatureRequest} request DeleteFeatureRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; /** - * Decodes an OperationMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.gkehub.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.v1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateMembership}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef UpdateMembershipCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - OperationMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.OperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.target = reader.string(); - break; - } - case 4: { - message.verb = reader.string(); - break; - } - case 5: { - message.statusDetail = reader.string(); - break; - } - case 6: { - message.cancelRequested = reader.bool(); - break; - } - case 7: { - message.apiVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; /** - * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.gkehub.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.v1.OperationMetadata} OperationMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls UpdateMembership. + * @function updateMembership + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateMembershipRequest} request UpdateMembershipRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.UpdateMembershipCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - OperationMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + Object.defineProperty(GkeHub.prototype.updateMembership = function updateMembership(request, callback) { + return this.rpcCall(updateMembership, $root.google.cloud.gkehub.v1.UpdateMembershipRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateMembership" }); /** - * Verifies an OperationMetadata message. - * @function verify - * @memberof google.cloud.gkehub.v1.OperationMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * Calls UpdateMembership. + * @function updateMembership + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateMembershipRequest} request UpdateMembershipRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - OperationMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.target != null && message.hasOwnProperty("target")) - if (!$util.isString(message.target)) - return "target: string expected"; - if (message.verb != null && message.hasOwnProperty("verb")) - if (!$util.isString(message.verb)) - return "verb: string expected"; - if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) - if (!$util.isString(message.statusDetail)) - return "statusDetail: string expected"; - if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) - if (typeof message.cancelRequested !== "boolean") - return "cancelRequested: boolean expected"; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - if (!$util.isString(message.apiVersion)) - return "apiVersion: string expected"; - return null; - }; /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.gkehub.v1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.v1.OperationMetadata} OperationMetadata + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateFeature}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef UpdateFeatureCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.v1.OperationMetadata) - return object; - var message = new $root.google.cloud.gkehub.v1.OperationMetadata(); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.gkehub.v1.OperationMetadata.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.gkehub.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.target != null) - message.target = String(object.target); - if (object.verb != null) - message.verb = String(object.verb); - if (object.statusDetail != null) - message.statusDetail = String(object.statusDetail); - if (object.cancelRequested != null) - message.cancelRequested = Boolean(object.cancelRequested); - if (object.apiVersion != null) - message.apiVersion = String(object.apiVersion); - return message; - }; /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.gkehub.v1.OperationMetadata - * @static - * @param {google.cloud.gkehub.v1.OperationMetadata} message OperationMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object + * Calls UpdateFeature. + * @function updateFeature + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateFeatureRequest} request UpdateFeatureRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.UpdateFeatureCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 */ - OperationMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.createTime = null; - object.endTime = null; - object.target = ""; - object.verb = ""; - object.statusDetail = ""; - object.cancelRequested = false; - object.apiVersion = ""; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = message.target; - if (message.verb != null && message.hasOwnProperty("verb")) - object.verb = message.verb; - if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) - object.statusDetail = message.statusDetail; - if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) - object.cancelRequested = message.cancelRequested; - if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) - object.apiVersion = message.apiVersion; - return object; - }; + Object.defineProperty(GkeHub.prototype.updateFeature = function updateFeature(request, callback) { + return this.rpcCall(updateFeature, $root.google.cloud.gkehub.v1.UpdateFeatureRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateFeature" }); /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.gkehub.v1.OperationMetadata + * Calls UpdateFeature. + * @function updateFeature + * @memberof google.cloud.gkehub.v1.GkeHub * @instance - * @returns {Object.} JSON object + * @param {google.cloud.gkehub.v1.IUpdateFeatureRequest} request UpdateFeatureRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - OperationMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; /** - * Gets the default type url for OperationMetadata - * @function getTypeUrl - * @memberof google.cloud.gkehub.v1.OperationMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|generateConnectManifest}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef GenerateConnectManifestCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.GenerateConnectManifestResponse} [response] GenerateConnectManifestResponse */ - OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.gkehub.v1.OperationMetadata"; - }; - return OperationMetadata; - })(); + /** + * Calls GenerateConnectManifest. + * @function generateConnectManifest + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGenerateConnectManifestRequest} request GenerateConnectManifestRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.GenerateConnectManifestCallback} callback Node-style callback called with the error, if any, and GenerateConnectManifestResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.generateConnectManifest = function generateConnectManifest(request, callback) { + return this.rpcCall(generateConnectManifest, $root.google.cloud.gkehub.v1.GenerateConnectManifestRequest, $root.google.cloud.gkehub.v1.GenerateConnectManifestResponse, request, callback); + }, "name", { value: "GenerateConnectManifest" }); + + /** + * Calls GenerateConnectManifest. + * @function generateConnectManifest + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGenerateConnectManifestRequest} request GenerateConnectManifestRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createFleet}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef CreateFleetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateFleet. + * @function createFleet + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.ICreateFleetRequest} request CreateFleetRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.CreateFleetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.createFleet = function createFleet(request, callback) { + return this.rpcCall(createFleet, $root.google.cloud.gkehub.v1.CreateFleetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateFleet" }); + + /** + * Calls CreateFleet. + * @function createFleet + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.ICreateFleetRequest} request CreateFleetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getFleet}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef GetFleetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.Fleet} [response] Fleet + */ + + /** + * Calls GetFleet. + * @function getFleet + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetFleetRequest} request GetFleetRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.GetFleetCallback} callback Node-style callback called with the error, if any, and Fleet + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.getFleet = function getFleet(request, callback) { + return this.rpcCall(getFleet, $root.google.cloud.gkehub.v1.GetFleetRequest, $root.google.cloud.gkehub.v1.Fleet, request, callback); + }, "name", { value: "GetFleet" }); + + /** + * Calls GetFleet. + * @function getFleet + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetFleetRequest} request GetFleetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateFleet}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef UpdateFleetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateFleet. + * @function updateFleet + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateFleetRequest} request UpdateFleetRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.UpdateFleetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.updateFleet = function updateFleet(request, callback) { + return this.rpcCall(updateFleet, $root.google.cloud.gkehub.v1.UpdateFleetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateFleet" }); + + /** + * Calls UpdateFleet. + * @function updateFleet + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateFleetRequest} request UpdateFleetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteFleet}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef DeleteFleetCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteFleet. + * @function deleteFleet + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteFleetRequest} request DeleteFleetRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.DeleteFleetCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.deleteFleet = function deleteFleet(request, callback) { + return this.rpcCall(deleteFleet, $root.google.cloud.gkehub.v1.DeleteFleetRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteFleet" }); + + /** + * Calls DeleteFleet. + * @function deleteFleet + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteFleetRequest} request DeleteFleetRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listFleets}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef ListFleetsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.ListFleetsResponse} [response] ListFleetsResponse + */ + + /** + * Calls ListFleets. + * @function listFleets + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListFleetsRequest} request ListFleetsRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.ListFleetsCallback} callback Node-style callback called with the error, if any, and ListFleetsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.listFleets = function listFleets(request, callback) { + return this.rpcCall(listFleets, $root.google.cloud.gkehub.v1.ListFleetsRequest, $root.google.cloud.gkehub.v1.ListFleetsResponse, request, callback); + }, "name", { value: "ListFleets" }); + + /** + * Calls ListFleets. + * @function listFleets + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListFleetsRequest} request ListFleetsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getScopeNamespace}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef GetScopeNamespaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.Namespace} [response] Namespace + */ + + /** + * Calls GetScopeNamespace. + * @function getScopeNamespace + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetScopeNamespaceRequest} request GetScopeNamespaceRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.GetScopeNamespaceCallback} callback Node-style callback called with the error, if any, and Namespace + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.getScopeNamespace = function getScopeNamespace(request, callback) { + return this.rpcCall(getScopeNamespace, $root.google.cloud.gkehub.v1.GetScopeNamespaceRequest, $root.google.cloud.gkehub.v1.Namespace, request, callback); + }, "name", { value: "GetScopeNamespace" }); + + /** + * Calls GetScopeNamespace. + * @function getScopeNamespace + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetScopeNamespaceRequest} request GetScopeNamespaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createScopeNamespace}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef CreateScopeNamespaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateScopeNamespace. + * @function createScopeNamespace + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.ICreateScopeNamespaceRequest} request CreateScopeNamespaceRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.CreateScopeNamespaceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.createScopeNamespace = function createScopeNamespace(request, callback) { + return this.rpcCall(createScopeNamespace, $root.google.cloud.gkehub.v1.CreateScopeNamespaceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateScopeNamespace" }); + + /** + * Calls CreateScopeNamespace. + * @function createScopeNamespace + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.ICreateScopeNamespaceRequest} request CreateScopeNamespaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateScopeNamespace}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef UpdateScopeNamespaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateScopeNamespace. + * @function updateScopeNamespace + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest} request UpdateScopeNamespaceRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.UpdateScopeNamespaceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.updateScopeNamespace = function updateScopeNamespace(request, callback) { + return this.rpcCall(updateScopeNamespace, $root.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateScopeNamespace" }); + + /** + * Calls UpdateScopeNamespace. + * @function updateScopeNamespace + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest} request UpdateScopeNamespaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteScopeNamespace}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef DeleteScopeNamespaceCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteScopeNamespace. + * @function deleteScopeNamespace + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest} request DeleteScopeNamespaceRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.DeleteScopeNamespaceCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.deleteScopeNamespace = function deleteScopeNamespace(request, callback) { + return this.rpcCall(deleteScopeNamespace, $root.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteScopeNamespace" }); + + /** + * Calls DeleteScopeNamespace. + * @function deleteScopeNamespace + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest} request DeleteScopeNamespaceRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listScopeNamespaces}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef ListScopeNamespacesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.ListScopeNamespacesResponse} [response] ListScopeNamespacesResponse + */ + + /** + * Calls ListScopeNamespaces. + * @function listScopeNamespaces + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListScopeNamespacesRequest} request ListScopeNamespacesRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.ListScopeNamespacesCallback} callback Node-style callback called with the error, if any, and ListScopeNamespacesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.listScopeNamespaces = function listScopeNamespaces(request, callback) { + return this.rpcCall(listScopeNamespaces, $root.google.cloud.gkehub.v1.ListScopeNamespacesRequest, $root.google.cloud.gkehub.v1.ListScopeNamespacesResponse, request, callback); + }, "name", { value: "ListScopeNamespaces" }); + + /** + * Calls ListScopeNamespaces. + * @function listScopeNamespaces + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListScopeNamespacesRequest} request ListScopeNamespacesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getScopeRBACRoleBinding}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef GetScopeRBACRoleBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.RBACRoleBinding} [response] RBACRoleBinding + */ + + /** + * Calls GetScopeRBACRoleBinding. + * @function getScopeRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest} request GetScopeRBACRoleBindingRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.GetScopeRBACRoleBindingCallback} callback Node-style callback called with the error, if any, and RBACRoleBinding + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.getScopeRBACRoleBinding = function getScopeRBACRoleBinding(request, callback) { + return this.rpcCall(getScopeRBACRoleBinding, $root.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest, $root.google.cloud.gkehub.v1.RBACRoleBinding, request, callback); + }, "name", { value: "GetScopeRBACRoleBinding" }); + + /** + * Calls GetScopeRBACRoleBinding. + * @function getScopeRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest} request GetScopeRBACRoleBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createScopeRBACRoleBinding}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef CreateScopeRBACRoleBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateScopeRBACRoleBinding. + * @function createScopeRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest} request CreateScopeRBACRoleBindingRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.CreateScopeRBACRoleBindingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.createScopeRBACRoleBinding = function createScopeRBACRoleBinding(request, callback) { + return this.rpcCall(createScopeRBACRoleBinding, $root.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateScopeRBACRoleBinding" }); + + /** + * Calls CreateScopeRBACRoleBinding. + * @function createScopeRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest} request CreateScopeRBACRoleBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateScopeRBACRoleBinding}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef UpdateScopeRBACRoleBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateScopeRBACRoleBinding. + * @function updateScopeRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest} request UpdateScopeRBACRoleBindingRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.UpdateScopeRBACRoleBindingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.updateScopeRBACRoleBinding = function updateScopeRBACRoleBinding(request, callback) { + return this.rpcCall(updateScopeRBACRoleBinding, $root.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateScopeRBACRoleBinding" }); + + /** + * Calls UpdateScopeRBACRoleBinding. + * @function updateScopeRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest} request UpdateScopeRBACRoleBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteScopeRBACRoleBinding}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef DeleteScopeRBACRoleBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteScopeRBACRoleBinding. + * @function deleteScopeRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest} request DeleteScopeRBACRoleBindingRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.DeleteScopeRBACRoleBindingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.deleteScopeRBACRoleBinding = function deleteScopeRBACRoleBinding(request, callback) { + return this.rpcCall(deleteScopeRBACRoleBinding, $root.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteScopeRBACRoleBinding" }); + + /** + * Calls DeleteScopeRBACRoleBinding. + * @function deleteScopeRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest} request DeleteScopeRBACRoleBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listScopeRBACRoleBindings}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef ListScopeRBACRoleBindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse} [response] ListScopeRBACRoleBindingsResponse + */ + + /** + * Calls ListScopeRBACRoleBindings. + * @function listScopeRBACRoleBindings + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest} request ListScopeRBACRoleBindingsRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.ListScopeRBACRoleBindingsCallback} callback Node-style callback called with the error, if any, and ListScopeRBACRoleBindingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.listScopeRBACRoleBindings = function listScopeRBACRoleBindings(request, callback) { + return this.rpcCall(listScopeRBACRoleBindings, $root.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest, $root.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse, request, callback); + }, "name", { value: "ListScopeRBACRoleBindings" }); + + /** + * Calls ListScopeRBACRoleBindings. + * @function listScopeRBACRoleBindings + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest} request ListScopeRBACRoleBindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getScope}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef GetScopeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.Scope} [response] Scope + */ + + /** + * Calls GetScope. + * @function getScope + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetScopeRequest} request GetScopeRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.GetScopeCallback} callback Node-style callback called with the error, if any, and Scope + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.getScope = function getScope(request, callback) { + return this.rpcCall(getScope, $root.google.cloud.gkehub.v1.GetScopeRequest, $root.google.cloud.gkehub.v1.Scope, request, callback); + }, "name", { value: "GetScope" }); + + /** + * Calls GetScope. + * @function getScope + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetScopeRequest} request GetScopeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createScope}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef CreateScopeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateScope. + * @function createScope + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.ICreateScopeRequest} request CreateScopeRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.CreateScopeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.createScope = function createScope(request, callback) { + return this.rpcCall(createScope, $root.google.cloud.gkehub.v1.CreateScopeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateScope" }); + + /** + * Calls CreateScope. + * @function createScope + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.ICreateScopeRequest} request CreateScopeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateScope}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef UpdateScopeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateScope. + * @function updateScope + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateScopeRequest} request UpdateScopeRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.UpdateScopeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.updateScope = function updateScope(request, callback) { + return this.rpcCall(updateScope, $root.google.cloud.gkehub.v1.UpdateScopeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateScope" }); + + /** + * Calls UpdateScope. + * @function updateScope + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateScopeRequest} request UpdateScopeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteScope}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef DeleteScopeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteScope. + * @function deleteScope + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteScopeRequest} request DeleteScopeRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.DeleteScopeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.deleteScope = function deleteScope(request, callback) { + return this.rpcCall(deleteScope, $root.google.cloud.gkehub.v1.DeleteScopeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteScope" }); + + /** + * Calls DeleteScope. + * @function deleteScope + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteScopeRequest} request DeleteScopeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listScopes}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef ListScopesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.ListScopesResponse} [response] ListScopesResponse + */ + + /** + * Calls ListScopes. + * @function listScopes + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListScopesRequest} request ListScopesRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.ListScopesCallback} callback Node-style callback called with the error, if any, and ListScopesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.listScopes = function listScopes(request, callback) { + return this.rpcCall(listScopes, $root.google.cloud.gkehub.v1.ListScopesRequest, $root.google.cloud.gkehub.v1.ListScopesResponse, request, callback); + }, "name", { value: "ListScopes" }); + + /** + * Calls ListScopes. + * @function listScopes + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListScopesRequest} request ListScopesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listPermittedScopes}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef ListPermittedScopesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.ListPermittedScopesResponse} [response] ListPermittedScopesResponse + */ + + /** + * Calls ListPermittedScopes. + * @function listPermittedScopes + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListPermittedScopesRequest} request ListPermittedScopesRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.ListPermittedScopesCallback} callback Node-style callback called with the error, if any, and ListPermittedScopesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.listPermittedScopes = function listPermittedScopes(request, callback) { + return this.rpcCall(listPermittedScopes, $root.google.cloud.gkehub.v1.ListPermittedScopesRequest, $root.google.cloud.gkehub.v1.ListPermittedScopesResponse, request, callback); + }, "name", { value: "ListPermittedScopes" }); + + /** + * Calls ListPermittedScopes. + * @function listPermittedScopes + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListPermittedScopesRequest} request ListPermittedScopesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getMembershipBinding}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef GetMembershipBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.MembershipBinding} [response] MembershipBinding + */ + + /** + * Calls GetMembershipBinding. + * @function getMembershipBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetMembershipBindingRequest} request GetMembershipBindingRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.GetMembershipBindingCallback} callback Node-style callback called with the error, if any, and MembershipBinding + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.getMembershipBinding = function getMembershipBinding(request, callback) { + return this.rpcCall(getMembershipBinding, $root.google.cloud.gkehub.v1.GetMembershipBindingRequest, $root.google.cloud.gkehub.v1.MembershipBinding, request, callback); + }, "name", { value: "GetMembershipBinding" }); + + /** + * Calls GetMembershipBinding. + * @function getMembershipBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetMembershipBindingRequest} request GetMembershipBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createMembershipBinding}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef CreateMembershipBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateMembershipBinding. + * @function createMembershipBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.ICreateMembershipBindingRequest} request CreateMembershipBindingRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.CreateMembershipBindingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.createMembershipBinding = function createMembershipBinding(request, callback) { + return this.rpcCall(createMembershipBinding, $root.google.cloud.gkehub.v1.CreateMembershipBindingRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateMembershipBinding" }); + + /** + * Calls CreateMembershipBinding. + * @function createMembershipBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.ICreateMembershipBindingRequest} request CreateMembershipBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateMembershipBinding}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef UpdateMembershipBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateMembershipBinding. + * @function updateMembershipBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateMembershipBindingRequest} request UpdateMembershipBindingRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.UpdateMembershipBindingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.updateMembershipBinding = function updateMembershipBinding(request, callback) { + return this.rpcCall(updateMembershipBinding, $root.google.cloud.gkehub.v1.UpdateMembershipBindingRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateMembershipBinding" }); + + /** + * Calls UpdateMembershipBinding. + * @function updateMembershipBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateMembershipBindingRequest} request UpdateMembershipBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteMembershipBinding}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef DeleteMembershipBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteMembershipBinding. + * @function deleteMembershipBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteMembershipBindingRequest} request DeleteMembershipBindingRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.DeleteMembershipBindingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.deleteMembershipBinding = function deleteMembershipBinding(request, callback) { + return this.rpcCall(deleteMembershipBinding, $root.google.cloud.gkehub.v1.DeleteMembershipBindingRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteMembershipBinding" }); + + /** + * Calls DeleteMembershipBinding. + * @function deleteMembershipBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteMembershipBindingRequest} request DeleteMembershipBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listMembershipBindings}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef ListMembershipBindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.ListMembershipBindingsResponse} [response] ListMembershipBindingsResponse + */ + + /** + * Calls ListMembershipBindings. + * @function listMembershipBindings + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListMembershipBindingsRequest} request ListMembershipBindingsRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.ListMembershipBindingsCallback} callback Node-style callback called with the error, if any, and ListMembershipBindingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.listMembershipBindings = function listMembershipBindings(request, callback) { + return this.rpcCall(listMembershipBindings, $root.google.cloud.gkehub.v1.ListMembershipBindingsRequest, $root.google.cloud.gkehub.v1.ListMembershipBindingsResponse, request, callback); + }, "name", { value: "ListMembershipBindings" }); + + /** + * Calls ListMembershipBindings. + * @function listMembershipBindings + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListMembershipBindingsRequest} request ListMembershipBindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|getMembershipRBACRoleBinding}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef GetMembershipRBACRoleBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.RBACRoleBinding} [response] RBACRoleBinding + */ + + /** + * Calls GetMembershipRBACRoleBinding. + * @function getMembershipRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest} request GetMembershipRBACRoleBindingRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.GetMembershipRBACRoleBindingCallback} callback Node-style callback called with the error, if any, and RBACRoleBinding + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.getMembershipRBACRoleBinding = function getMembershipRBACRoleBinding(request, callback) { + return this.rpcCall(getMembershipRBACRoleBinding, $root.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest, $root.google.cloud.gkehub.v1.RBACRoleBinding, request, callback); + }, "name", { value: "GetMembershipRBACRoleBinding" }); + + /** + * Calls GetMembershipRBACRoleBinding. + * @function getMembershipRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest} request GetMembershipRBACRoleBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|createMembershipRBACRoleBinding}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef CreateMembershipRBACRoleBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateMembershipRBACRoleBinding. + * @function createMembershipRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest} request CreateMembershipRBACRoleBindingRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.CreateMembershipRBACRoleBindingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.createMembershipRBACRoleBinding = function createMembershipRBACRoleBinding(request, callback) { + return this.rpcCall(createMembershipRBACRoleBinding, $root.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateMembershipRBACRoleBinding" }); + + /** + * Calls CreateMembershipRBACRoleBinding. + * @function createMembershipRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest} request CreateMembershipRBACRoleBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|updateMembershipRBACRoleBinding}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef UpdateMembershipRBACRoleBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateMembershipRBACRoleBinding. + * @function updateMembershipRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest} request UpdateMembershipRBACRoleBindingRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.UpdateMembershipRBACRoleBindingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.updateMembershipRBACRoleBinding = function updateMembershipRBACRoleBinding(request, callback) { + return this.rpcCall(updateMembershipRBACRoleBinding, $root.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateMembershipRBACRoleBinding" }); + + /** + * Calls UpdateMembershipRBACRoleBinding. + * @function updateMembershipRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest} request UpdateMembershipRBACRoleBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|deleteMembershipRBACRoleBinding}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef DeleteMembershipRBACRoleBindingCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteMembershipRBACRoleBinding. + * @function deleteMembershipRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest} request DeleteMembershipRBACRoleBindingRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.DeleteMembershipRBACRoleBindingCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.deleteMembershipRBACRoleBinding = function deleteMembershipRBACRoleBinding(request, callback) { + return this.rpcCall(deleteMembershipRBACRoleBinding, $root.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteMembershipRBACRoleBinding" }); + + /** + * Calls DeleteMembershipRBACRoleBinding. + * @function deleteMembershipRBACRoleBinding + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest} request DeleteMembershipRBACRoleBindingRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|listMembershipRBACRoleBindings}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef ListMembershipRBACRoleBindingsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse} [response] ListMembershipRBACRoleBindingsResponse + */ + + /** + * Calls ListMembershipRBACRoleBindings. + * @function listMembershipRBACRoleBindings + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest} request ListMembershipRBACRoleBindingsRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.ListMembershipRBACRoleBindingsCallback} callback Node-style callback called with the error, if any, and ListMembershipRBACRoleBindingsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.listMembershipRBACRoleBindings = function listMembershipRBACRoleBindings(request, callback) { + return this.rpcCall(listMembershipRBACRoleBindings, $root.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest, $root.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse, request, callback); + }, "name", { value: "ListMembershipRBACRoleBindings" }); + + /** + * Calls ListMembershipRBACRoleBindings. + * @function listMembershipRBACRoleBindings + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest} request ListMembershipRBACRoleBindingsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.gkehub.v1.GkeHub|generateMembershipRBACRoleBindingYAML}. + * @memberof google.cloud.gkehub.v1.GkeHub + * @typedef GenerateMembershipRBACRoleBindingYAMLCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse} [response] GenerateMembershipRBACRoleBindingYAMLResponse + */ + + /** + * Calls GenerateMembershipRBACRoleBindingYAML. + * @function generateMembershipRBACRoleBindingYAML + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest} request GenerateMembershipRBACRoleBindingYAMLRequest message or plain object + * @param {google.cloud.gkehub.v1.GkeHub.GenerateMembershipRBACRoleBindingYAMLCallback} callback Node-style callback called with the error, if any, and GenerateMembershipRBACRoleBindingYAMLResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(GkeHub.prototype.generateMembershipRBACRoleBindingYAML = function generateMembershipRBACRoleBindingYAML(request, callback) { + return this.rpcCall(generateMembershipRBACRoleBindingYAML, $root.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest, $root.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse, request, callback); + }, "name", { value: "GenerateMembershipRBACRoleBindingYAML" }); + + /** + * Calls GenerateMembershipRBACRoleBindingYAML. + * @function generateMembershipRBACRoleBindingYAML + * @memberof google.cloud.gkehub.v1.GkeHub + * @instance + * @param {google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest} request GenerateMembershipRBACRoleBindingYAMLRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return GkeHub; + })(); + + v1.GetScopeNamespaceRequest = (function() { + + /** + * Properties of a GetScopeNamespaceRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IGetScopeNamespaceRequest + * @property {string|null} [name] GetScopeNamespaceRequest name + */ + + /** + * Constructs a new GetScopeNamespaceRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a GetScopeNamespaceRequest. + * @implements IGetScopeNamespaceRequest + * @constructor + * @param {google.cloud.gkehub.v1.IGetScopeNamespaceRequest=} [properties] Properties to set + */ + function GetScopeNamespaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetScopeNamespaceRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.GetScopeNamespaceRequest + * @instance + */ + GetScopeNamespaceRequest.prototype.name = ""; + + /** + * Creates a new GetScopeNamespaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.GetScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.IGetScopeNamespaceRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.GetScopeNamespaceRequest} GetScopeNamespaceRequest instance + */ + GetScopeNamespaceRequest.create = function create(properties) { + return new GetScopeNamespaceRequest(properties); + }; + + /** + * Encodes the specified GetScopeNamespaceRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetScopeNamespaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.GetScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.IGetScopeNamespaceRequest} message GetScopeNamespaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetScopeNamespaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetScopeNamespaceRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetScopeNamespaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.GetScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.IGetScopeNamespaceRequest} message GetScopeNamespaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetScopeNamespaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetScopeNamespaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.GetScopeNamespaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.GetScopeNamespaceRequest} GetScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetScopeNamespaceRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GetScopeNamespaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetScopeNamespaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.GetScopeNamespaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.GetScopeNamespaceRequest} GetScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetScopeNamespaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetScopeNamespaceRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.GetScopeNamespaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetScopeNamespaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetScopeNamespaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.GetScopeNamespaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.GetScopeNamespaceRequest} GetScopeNamespaceRequest + */ + GetScopeNamespaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.GetScopeNamespaceRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.GetScopeNamespaceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetScopeNamespaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.GetScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.GetScopeNamespaceRequest} message GetScopeNamespaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetScopeNamespaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetScopeNamespaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.GetScopeNamespaceRequest + * @instance + * @returns {Object.} JSON object + */ + GetScopeNamespaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetScopeNamespaceRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.GetScopeNamespaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetScopeNamespaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.GetScopeNamespaceRequest"; + }; + + return GetScopeNamespaceRequest; + })(); + + v1.CreateScopeNamespaceRequest = (function() { + + /** + * Properties of a CreateScopeNamespaceRequest. + * @memberof google.cloud.gkehub.v1 + * @interface ICreateScopeNamespaceRequest + * @property {string|null} [parent] CreateScopeNamespaceRequest parent + * @property {string|null} [scopeNamespaceId] CreateScopeNamespaceRequest scopeNamespaceId + * @property {google.cloud.gkehub.v1.INamespace|null} [scopeNamespace] CreateScopeNamespaceRequest scopeNamespace + */ + + /** + * Constructs a new CreateScopeNamespaceRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a CreateScopeNamespaceRequest. + * @implements ICreateScopeNamespaceRequest + * @constructor + * @param {google.cloud.gkehub.v1.ICreateScopeNamespaceRequest=} [properties] Properties to set + */ + function CreateScopeNamespaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateScopeNamespaceRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.CreateScopeNamespaceRequest + * @instance + */ + CreateScopeNamespaceRequest.prototype.parent = ""; + + /** + * CreateScopeNamespaceRequest scopeNamespaceId. + * @member {string} scopeNamespaceId + * @memberof google.cloud.gkehub.v1.CreateScopeNamespaceRequest + * @instance + */ + CreateScopeNamespaceRequest.prototype.scopeNamespaceId = ""; + + /** + * CreateScopeNamespaceRequest scopeNamespace. + * @member {google.cloud.gkehub.v1.INamespace|null|undefined} scopeNamespace + * @memberof google.cloud.gkehub.v1.CreateScopeNamespaceRequest + * @instance + */ + CreateScopeNamespaceRequest.prototype.scopeNamespace = null; + + /** + * Creates a new CreateScopeNamespaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.CreateScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateScopeNamespaceRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.CreateScopeNamespaceRequest} CreateScopeNamespaceRequest instance + */ + CreateScopeNamespaceRequest.create = function create(properties) { + return new CreateScopeNamespaceRequest(properties); + }; + + /** + * Encodes the specified CreateScopeNamespaceRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateScopeNamespaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.CreateScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateScopeNamespaceRequest} message CreateScopeNamespaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateScopeNamespaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.scopeNamespaceId != null && Object.hasOwnProperty.call(message, "scopeNamespaceId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.scopeNamespaceId); + if (message.scopeNamespace != null && Object.hasOwnProperty.call(message, "scopeNamespace")) + $root.google.cloud.gkehub.v1.Namespace.encode(message.scopeNamespace, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateScopeNamespaceRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateScopeNamespaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.CreateScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateScopeNamespaceRequest} message CreateScopeNamespaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateScopeNamespaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateScopeNamespaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.CreateScopeNamespaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.CreateScopeNamespaceRequest} CreateScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateScopeNamespaceRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.CreateScopeNamespaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.scopeNamespaceId = reader.string(); + break; + } + case 3: { + message.scopeNamespace = $root.google.cloud.gkehub.v1.Namespace.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateScopeNamespaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.CreateScopeNamespaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.CreateScopeNamespaceRequest} CreateScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateScopeNamespaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateScopeNamespaceRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.CreateScopeNamespaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateScopeNamespaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.scopeNamespaceId != null && message.hasOwnProperty("scopeNamespaceId")) + if (!$util.isString(message.scopeNamespaceId)) + return "scopeNamespaceId: string expected"; + if (message.scopeNamespace != null && message.hasOwnProperty("scopeNamespace")) { + var error = $root.google.cloud.gkehub.v1.Namespace.verify(message.scopeNamespace); + if (error) + return "scopeNamespace." + error; + } + return null; + }; + + /** + * Creates a CreateScopeNamespaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.CreateScopeNamespaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.CreateScopeNamespaceRequest} CreateScopeNamespaceRequest + */ + CreateScopeNamespaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.CreateScopeNamespaceRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.CreateScopeNamespaceRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.scopeNamespaceId != null) + message.scopeNamespaceId = String(object.scopeNamespaceId); + if (object.scopeNamespace != null) { + if (typeof object.scopeNamespace !== "object") + throw TypeError(".google.cloud.gkehub.v1.CreateScopeNamespaceRequest.scopeNamespace: object expected"); + message.scopeNamespace = $root.google.cloud.gkehub.v1.Namespace.fromObject(object.scopeNamespace); + } + return message; + }; + + /** + * Creates a plain object from a CreateScopeNamespaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.CreateScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.CreateScopeNamespaceRequest} message CreateScopeNamespaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateScopeNamespaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.scopeNamespaceId = ""; + object.scopeNamespace = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.scopeNamespaceId != null && message.hasOwnProperty("scopeNamespaceId")) + object.scopeNamespaceId = message.scopeNamespaceId; + if (message.scopeNamespace != null && message.hasOwnProperty("scopeNamespace")) + object.scopeNamespace = $root.google.cloud.gkehub.v1.Namespace.toObject(message.scopeNamespace, options); + return object; + }; + + /** + * Converts this CreateScopeNamespaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.CreateScopeNamespaceRequest + * @instance + * @returns {Object.} JSON object + */ + CreateScopeNamespaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateScopeNamespaceRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.CreateScopeNamespaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateScopeNamespaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.CreateScopeNamespaceRequest"; + }; + + return CreateScopeNamespaceRequest; + })(); + + v1.UpdateScopeNamespaceRequest = (function() { + + /** + * Properties of an UpdateScopeNamespaceRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IUpdateScopeNamespaceRequest + * @property {google.cloud.gkehub.v1.INamespace|null} [scopeNamespace] UpdateScopeNamespaceRequest scopeNamespace + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateScopeNamespaceRequest updateMask + */ + + /** + * Constructs a new UpdateScopeNamespaceRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents an UpdateScopeNamespaceRequest. + * @implements IUpdateScopeNamespaceRequest + * @constructor + * @param {google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest=} [properties] Properties to set + */ + function UpdateScopeNamespaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateScopeNamespaceRequest scopeNamespace. + * @member {google.cloud.gkehub.v1.INamespace|null|undefined} scopeNamespace + * @memberof google.cloud.gkehub.v1.UpdateScopeNamespaceRequest + * @instance + */ + UpdateScopeNamespaceRequest.prototype.scopeNamespace = null; + + /** + * UpdateScopeNamespaceRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.gkehub.v1.UpdateScopeNamespaceRequest + * @instance + */ + UpdateScopeNamespaceRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateScopeNamespaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.UpdateScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.UpdateScopeNamespaceRequest} UpdateScopeNamespaceRequest instance + */ + UpdateScopeNamespaceRequest.create = function create(properties) { + return new UpdateScopeNamespaceRequest(properties); + }; + + /** + * Encodes the specified UpdateScopeNamespaceRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateScopeNamespaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.UpdateScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest} message UpdateScopeNamespaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateScopeNamespaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scopeNamespace != null && Object.hasOwnProperty.call(message, "scopeNamespace")) + $root.google.cloud.gkehub.v1.Namespace.encode(message.scopeNamespace, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateScopeNamespaceRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateScopeNamespaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest} message UpdateScopeNamespaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateScopeNamespaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateScopeNamespaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.UpdateScopeNamespaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.UpdateScopeNamespaceRequest} UpdateScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateScopeNamespaceRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.scopeNamespace = $root.google.cloud.gkehub.v1.Namespace.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateScopeNamespaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateScopeNamespaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.UpdateScopeNamespaceRequest} UpdateScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateScopeNamespaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateScopeNamespaceRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.UpdateScopeNamespaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateScopeNamespaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scopeNamespace != null && message.hasOwnProperty("scopeNamespace")) { + var error = $root.google.cloud.gkehub.v1.Namespace.verify(message.scopeNamespace); + if (error) + return "scopeNamespace." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateScopeNamespaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.UpdateScopeNamespaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.UpdateScopeNamespaceRequest} UpdateScopeNamespaceRequest + */ + UpdateScopeNamespaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest(); + if (object.scopeNamespace != null) { + if (typeof object.scopeNamespace !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateScopeNamespaceRequest.scopeNamespace: object expected"); + message.scopeNamespace = $root.google.cloud.gkehub.v1.Namespace.fromObject(object.scopeNamespace); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateScopeNamespaceRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateScopeNamespaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.UpdateScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.UpdateScopeNamespaceRequest} message UpdateScopeNamespaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateScopeNamespaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.scopeNamespace = null; + object.updateMask = null; + } + if (message.scopeNamespace != null && message.hasOwnProperty("scopeNamespace")) + object.scopeNamespace = $root.google.cloud.gkehub.v1.Namespace.toObject(message.scopeNamespace, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateScopeNamespaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.UpdateScopeNamespaceRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateScopeNamespaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateScopeNamespaceRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.UpdateScopeNamespaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateScopeNamespaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.UpdateScopeNamespaceRequest"; + }; + + return UpdateScopeNamespaceRequest; + })(); + + v1.DeleteScopeNamespaceRequest = (function() { + + /** + * Properties of a DeleteScopeNamespaceRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IDeleteScopeNamespaceRequest + * @property {string|null} [name] DeleteScopeNamespaceRequest name + */ + + /** + * Constructs a new DeleteScopeNamespaceRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a DeleteScopeNamespaceRequest. + * @implements IDeleteScopeNamespaceRequest + * @constructor + * @param {google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest=} [properties] Properties to set + */ + function DeleteScopeNamespaceRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteScopeNamespaceRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.DeleteScopeNamespaceRequest + * @instance + */ + DeleteScopeNamespaceRequest.prototype.name = ""; + + /** + * Creates a new DeleteScopeNamespaceRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.DeleteScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.DeleteScopeNamespaceRequest} DeleteScopeNamespaceRequest instance + */ + DeleteScopeNamespaceRequest.create = function create(properties) { + return new DeleteScopeNamespaceRequest(properties); + }; + + /** + * Encodes the specified DeleteScopeNamespaceRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteScopeNamespaceRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.DeleteScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest} message DeleteScopeNamespaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteScopeNamespaceRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteScopeNamespaceRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteScopeNamespaceRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest} message DeleteScopeNamespaceRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteScopeNamespaceRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteScopeNamespaceRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.DeleteScopeNamespaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.DeleteScopeNamespaceRequest} DeleteScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteScopeNamespaceRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteScopeNamespaceRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteScopeNamespaceRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.DeleteScopeNamespaceRequest} DeleteScopeNamespaceRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteScopeNamespaceRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteScopeNamespaceRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.DeleteScopeNamespaceRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteScopeNamespaceRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteScopeNamespaceRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.DeleteScopeNamespaceRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.DeleteScopeNamespaceRequest} DeleteScopeNamespaceRequest + */ + DeleteScopeNamespaceRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteScopeNamespaceRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.DeleteScopeNamespaceRequest + * @static + * @param {google.cloud.gkehub.v1.DeleteScopeNamespaceRequest} message DeleteScopeNamespaceRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteScopeNamespaceRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteScopeNamespaceRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.DeleteScopeNamespaceRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteScopeNamespaceRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteScopeNamespaceRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.DeleteScopeNamespaceRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteScopeNamespaceRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.DeleteScopeNamespaceRequest"; + }; + + return DeleteScopeNamespaceRequest; + })(); + + v1.ListScopeNamespacesRequest = (function() { + + /** + * Properties of a ListScopeNamespacesRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IListScopeNamespacesRequest + * @property {string|null} [parent] ListScopeNamespacesRequest parent + * @property {number|null} [pageSize] ListScopeNamespacesRequest pageSize + * @property {string|null} [pageToken] ListScopeNamespacesRequest pageToken + */ + + /** + * Constructs a new ListScopeNamespacesRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListScopeNamespacesRequest. + * @implements IListScopeNamespacesRequest + * @constructor + * @param {google.cloud.gkehub.v1.IListScopeNamespacesRequest=} [properties] Properties to set + */ + function ListScopeNamespacesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListScopeNamespacesRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesRequest + * @instance + */ + ListScopeNamespacesRequest.prototype.parent = ""; + + /** + * ListScopeNamespacesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesRequest + * @instance + */ + ListScopeNamespacesRequest.prototype.pageSize = 0; + + /** + * ListScopeNamespacesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesRequest + * @instance + */ + ListScopeNamespacesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListScopeNamespacesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesRequest + * @static + * @param {google.cloud.gkehub.v1.IListScopeNamespacesRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListScopeNamespacesRequest} ListScopeNamespacesRequest instance + */ + ListScopeNamespacesRequest.create = function create(properties) { + return new ListScopeNamespacesRequest(properties); + }; + + /** + * Encodes the specified ListScopeNamespacesRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeNamespacesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesRequest + * @static + * @param {google.cloud.gkehub.v1.IListScopeNamespacesRequest} message ListScopeNamespacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListScopeNamespacesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListScopeNamespacesRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeNamespacesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesRequest + * @static + * @param {google.cloud.gkehub.v1.IListScopeNamespacesRequest} message ListScopeNamespacesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListScopeNamespacesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListScopeNamespacesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListScopeNamespacesRequest} ListScopeNamespacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListScopeNamespacesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListScopeNamespacesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListScopeNamespacesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListScopeNamespacesRequest} ListScopeNamespacesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListScopeNamespacesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListScopeNamespacesRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListScopeNamespacesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListScopeNamespacesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListScopeNamespacesRequest} ListScopeNamespacesRequest + */ + ListScopeNamespacesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListScopeNamespacesRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.ListScopeNamespacesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListScopeNamespacesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesRequest + * @static + * @param {google.cloud.gkehub.v1.ListScopeNamespacesRequest} message ListScopeNamespacesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListScopeNamespacesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListScopeNamespacesRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesRequest + * @instance + * @returns {Object.} JSON object + */ + ListScopeNamespacesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListScopeNamespacesRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListScopeNamespacesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListScopeNamespacesRequest"; + }; + + return ListScopeNamespacesRequest; + })(); + + v1.ListScopeNamespacesResponse = (function() { + + /** + * Properties of a ListScopeNamespacesResponse. + * @memberof google.cloud.gkehub.v1 + * @interface IListScopeNamespacesResponse + * @property {Array.|null} [scopeNamespaces] ListScopeNamespacesResponse scopeNamespaces + * @property {string|null} [nextPageToken] ListScopeNamespacesResponse nextPageToken + */ + + /** + * Constructs a new ListScopeNamespacesResponse. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListScopeNamespacesResponse. + * @implements IListScopeNamespacesResponse + * @constructor + * @param {google.cloud.gkehub.v1.IListScopeNamespacesResponse=} [properties] Properties to set + */ + function ListScopeNamespacesResponse(properties) { + this.scopeNamespaces = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListScopeNamespacesResponse scopeNamespaces. + * @member {Array.} scopeNamespaces + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesResponse + * @instance + */ + ListScopeNamespacesResponse.prototype.scopeNamespaces = $util.emptyArray; + + /** + * ListScopeNamespacesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesResponse + * @instance + */ + ListScopeNamespacesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListScopeNamespacesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesResponse + * @static + * @param {google.cloud.gkehub.v1.IListScopeNamespacesResponse=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListScopeNamespacesResponse} ListScopeNamespacesResponse instance + */ + ListScopeNamespacesResponse.create = function create(properties) { + return new ListScopeNamespacesResponse(properties); + }; + + /** + * Encodes the specified ListScopeNamespacesResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeNamespacesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesResponse + * @static + * @param {google.cloud.gkehub.v1.IListScopeNamespacesResponse} message ListScopeNamespacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListScopeNamespacesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scopeNamespaces != null && message.scopeNamespaces.length) + for (var i = 0; i < message.scopeNamespaces.length; ++i) + $root.google.cloud.gkehub.v1.Namespace.encode(message.scopeNamespaces[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListScopeNamespacesResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeNamespacesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesResponse + * @static + * @param {google.cloud.gkehub.v1.IListScopeNamespacesResponse} message ListScopeNamespacesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListScopeNamespacesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListScopeNamespacesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListScopeNamespacesResponse} ListScopeNamespacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListScopeNamespacesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListScopeNamespacesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.scopeNamespaces && message.scopeNamespaces.length)) + message.scopeNamespaces = []; + message.scopeNamespaces.push($root.google.cloud.gkehub.v1.Namespace.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListScopeNamespacesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListScopeNamespacesResponse} ListScopeNamespacesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListScopeNamespacesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListScopeNamespacesResponse message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListScopeNamespacesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scopeNamespaces != null && message.hasOwnProperty("scopeNamespaces")) { + if (!Array.isArray(message.scopeNamespaces)) + return "scopeNamespaces: array expected"; + for (var i = 0; i < message.scopeNamespaces.length; ++i) { + var error = $root.google.cloud.gkehub.v1.Namespace.verify(message.scopeNamespaces[i]); + if (error) + return "scopeNamespaces." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListScopeNamespacesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListScopeNamespacesResponse} ListScopeNamespacesResponse + */ + ListScopeNamespacesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListScopeNamespacesResponse) + return object; + var message = new $root.google.cloud.gkehub.v1.ListScopeNamespacesResponse(); + if (object.scopeNamespaces) { + if (!Array.isArray(object.scopeNamespaces)) + throw TypeError(".google.cloud.gkehub.v1.ListScopeNamespacesResponse.scopeNamespaces: array expected"); + message.scopeNamespaces = []; + for (var i = 0; i < object.scopeNamespaces.length; ++i) { + if (typeof object.scopeNamespaces[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.ListScopeNamespacesResponse.scopeNamespaces: object expected"); + message.scopeNamespaces[i] = $root.google.cloud.gkehub.v1.Namespace.fromObject(object.scopeNamespaces[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListScopeNamespacesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesResponse + * @static + * @param {google.cloud.gkehub.v1.ListScopeNamespacesResponse} message ListScopeNamespacesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListScopeNamespacesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopeNamespaces = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.scopeNamespaces && message.scopeNamespaces.length) { + object.scopeNamespaces = []; + for (var j = 0; j < message.scopeNamespaces.length; ++j) + object.scopeNamespaces[j] = $root.google.cloud.gkehub.v1.Namespace.toObject(message.scopeNamespaces[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListScopeNamespacesResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesResponse + * @instance + * @returns {Object.} JSON object + */ + ListScopeNamespacesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListScopeNamespacesResponse + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListScopeNamespacesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListScopeNamespacesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListScopeNamespacesResponse"; + }; + + return ListScopeNamespacesResponse; + })(); + + v1.GetScopeRBACRoleBindingRequest = (function() { + + /** + * Properties of a GetScopeRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IGetScopeRBACRoleBindingRequest + * @property {string|null} [name] GetScopeRBACRoleBindingRequest name + */ + + /** + * Constructs a new GetScopeRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a GetScopeRBACRoleBindingRequest. + * @implements IGetScopeRBACRoleBindingRequest + * @constructor + * @param {google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest=} [properties] Properties to set + */ + function GetScopeRBACRoleBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetScopeRBACRoleBindingRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest + * @instance + */ + GetScopeRBACRoleBindingRequest.prototype.name = ""; + + /** + * Creates a new GetScopeRBACRoleBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest} GetScopeRBACRoleBindingRequest instance + */ + GetScopeRBACRoleBindingRequest.create = function create(properties) { + return new GetScopeRBACRoleBindingRequest(properties); + }; + + /** + * Encodes the specified GetScopeRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest} message GetScopeRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetScopeRBACRoleBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetScopeRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest} message GetScopeRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetScopeRBACRoleBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetScopeRBACRoleBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest} GetScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetScopeRBACRoleBindingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetScopeRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest} GetScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetScopeRBACRoleBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetScopeRBACRoleBindingRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetScopeRBACRoleBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetScopeRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest} GetScopeRBACRoleBindingRequest + */ + GetScopeRBACRoleBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetScopeRBACRoleBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest} message GetScopeRBACRoleBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetScopeRBACRoleBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetScopeRBACRoleBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest + * @instance + * @returns {Object.} JSON object + */ + GetScopeRBACRoleBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetScopeRBACRoleBindingRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetScopeRBACRoleBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest"; + }; + + return GetScopeRBACRoleBindingRequest; + })(); + + v1.CreateScopeRBACRoleBindingRequest = (function() { + + /** + * Properties of a CreateScopeRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @interface ICreateScopeRBACRoleBindingRequest + * @property {string|null} [parent] CreateScopeRBACRoleBindingRequest parent + * @property {string|null} [rbacrolebindingId] CreateScopeRBACRoleBindingRequest rbacrolebindingId + * @property {google.cloud.gkehub.v1.IRBACRoleBinding|null} [rbacrolebinding] CreateScopeRBACRoleBindingRequest rbacrolebinding + */ + + /** + * Constructs a new CreateScopeRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a CreateScopeRBACRoleBindingRequest. + * @implements ICreateScopeRBACRoleBindingRequest + * @constructor + * @param {google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest=} [properties] Properties to set + */ + function CreateScopeRBACRoleBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateScopeRBACRoleBindingRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + * @instance + */ + CreateScopeRBACRoleBindingRequest.prototype.parent = ""; + + /** + * CreateScopeRBACRoleBindingRequest rbacrolebindingId. + * @member {string} rbacrolebindingId + * @memberof google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + * @instance + */ + CreateScopeRBACRoleBindingRequest.prototype.rbacrolebindingId = ""; + + /** + * CreateScopeRBACRoleBindingRequest rbacrolebinding. + * @member {google.cloud.gkehub.v1.IRBACRoleBinding|null|undefined} rbacrolebinding + * @memberof google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + * @instance + */ + CreateScopeRBACRoleBindingRequest.prototype.rbacrolebinding = null; + + /** + * Creates a new CreateScopeRBACRoleBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest} CreateScopeRBACRoleBindingRequest instance + */ + CreateScopeRBACRoleBindingRequest.create = function create(properties) { + return new CreateScopeRBACRoleBindingRequest(properties); + }; + + /** + * Encodes the specified CreateScopeRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest} message CreateScopeRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateScopeRBACRoleBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.rbacrolebindingId != null && Object.hasOwnProperty.call(message, "rbacrolebindingId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rbacrolebindingId); + if (message.rbacrolebinding != null && Object.hasOwnProperty.call(message, "rbacrolebinding")) + $root.google.cloud.gkehub.v1.RBACRoleBinding.encode(message.rbacrolebinding, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateScopeRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest} message CreateScopeRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateScopeRBACRoleBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateScopeRBACRoleBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest} CreateScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateScopeRBACRoleBindingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.rbacrolebindingId = reader.string(); + break; + } + case 3: { + message.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateScopeRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest} CreateScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateScopeRBACRoleBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateScopeRBACRoleBindingRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateScopeRBACRoleBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.rbacrolebindingId != null && message.hasOwnProperty("rbacrolebindingId")) + if (!$util.isString(message.rbacrolebindingId)) + return "rbacrolebindingId: string expected"; + if (message.rbacrolebinding != null && message.hasOwnProperty("rbacrolebinding")) { + var error = $root.google.cloud.gkehub.v1.RBACRoleBinding.verify(message.rbacrolebinding); + if (error) + return "rbacrolebinding." + error; + } + return null; + }; + + /** + * Creates a CreateScopeRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest} CreateScopeRBACRoleBindingRequest + */ + CreateScopeRBACRoleBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.rbacrolebindingId != null) + message.rbacrolebindingId = String(object.rbacrolebindingId); + if (object.rbacrolebinding != null) { + if (typeof object.rbacrolebinding !== "object") + throw TypeError(".google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest.rbacrolebinding: object expected"); + message.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.fromObject(object.rbacrolebinding); + } + return message; + }; + + /** + * Creates a plain object from a CreateScopeRBACRoleBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest} message CreateScopeRBACRoleBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateScopeRBACRoleBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.rbacrolebindingId = ""; + object.rbacrolebinding = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.rbacrolebindingId != null && message.hasOwnProperty("rbacrolebindingId")) + object.rbacrolebindingId = message.rbacrolebindingId; + if (message.rbacrolebinding != null && message.hasOwnProperty("rbacrolebinding")) + object.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.toObject(message.rbacrolebinding, options); + return object; + }; + + /** + * Converts this CreateScopeRBACRoleBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + * @instance + * @returns {Object.} JSON object + */ + CreateScopeRBACRoleBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateScopeRBACRoleBindingRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateScopeRBACRoleBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest"; + }; + + return CreateScopeRBACRoleBindingRequest; + })(); + + v1.UpdateScopeRBACRoleBindingRequest = (function() { + + /** + * Properties of an UpdateScopeRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IUpdateScopeRBACRoleBindingRequest + * @property {google.cloud.gkehub.v1.IRBACRoleBinding|null} [rbacrolebinding] UpdateScopeRBACRoleBindingRequest rbacrolebinding + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateScopeRBACRoleBindingRequest updateMask + */ + + /** + * Constructs a new UpdateScopeRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents an UpdateScopeRBACRoleBindingRequest. + * @implements IUpdateScopeRBACRoleBindingRequest + * @constructor + * @param {google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest=} [properties] Properties to set + */ + function UpdateScopeRBACRoleBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateScopeRBACRoleBindingRequest rbacrolebinding. + * @member {google.cloud.gkehub.v1.IRBACRoleBinding|null|undefined} rbacrolebinding + * @memberof google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest + * @instance + */ + UpdateScopeRBACRoleBindingRequest.prototype.rbacrolebinding = null; + + /** + * UpdateScopeRBACRoleBindingRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest + * @instance + */ + UpdateScopeRBACRoleBindingRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateScopeRBACRoleBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest} UpdateScopeRBACRoleBindingRequest instance + */ + UpdateScopeRBACRoleBindingRequest.create = function create(properties) { + return new UpdateScopeRBACRoleBindingRequest(properties); + }; + + /** + * Encodes the specified UpdateScopeRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest} message UpdateScopeRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateScopeRBACRoleBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rbacrolebinding != null && Object.hasOwnProperty.call(message, "rbacrolebinding")) + $root.google.cloud.gkehub.v1.RBACRoleBinding.encode(message.rbacrolebinding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateScopeRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest} message UpdateScopeRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateScopeRBACRoleBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateScopeRBACRoleBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest} UpdateScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateScopeRBACRoleBindingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateScopeRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest} UpdateScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateScopeRBACRoleBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateScopeRBACRoleBindingRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateScopeRBACRoleBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rbacrolebinding != null && message.hasOwnProperty("rbacrolebinding")) { + var error = $root.google.cloud.gkehub.v1.RBACRoleBinding.verify(message.rbacrolebinding); + if (error) + return "rbacrolebinding." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateScopeRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest} UpdateScopeRBACRoleBindingRequest + */ + UpdateScopeRBACRoleBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest(); + if (object.rbacrolebinding != null) { + if (typeof object.rbacrolebinding !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest.rbacrolebinding: object expected"); + message.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.fromObject(object.rbacrolebinding); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateScopeRBACRoleBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest} message UpdateScopeRBACRoleBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateScopeRBACRoleBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rbacrolebinding = null; + object.updateMask = null; + } + if (message.rbacrolebinding != null && message.hasOwnProperty("rbacrolebinding")) + object.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.toObject(message.rbacrolebinding, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateScopeRBACRoleBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateScopeRBACRoleBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateScopeRBACRoleBindingRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateScopeRBACRoleBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest"; + }; + + return UpdateScopeRBACRoleBindingRequest; + })(); + + v1.DeleteScopeRBACRoleBindingRequest = (function() { + + /** + * Properties of a DeleteScopeRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IDeleteScopeRBACRoleBindingRequest + * @property {string|null} [name] DeleteScopeRBACRoleBindingRequest name + */ + + /** + * Constructs a new DeleteScopeRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a DeleteScopeRBACRoleBindingRequest. + * @implements IDeleteScopeRBACRoleBindingRequest + * @constructor + * @param {google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest=} [properties] Properties to set + */ + function DeleteScopeRBACRoleBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteScopeRBACRoleBindingRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest + * @instance + */ + DeleteScopeRBACRoleBindingRequest.prototype.name = ""; + + /** + * Creates a new DeleteScopeRBACRoleBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest} DeleteScopeRBACRoleBindingRequest instance + */ + DeleteScopeRBACRoleBindingRequest.create = function create(properties) { + return new DeleteScopeRBACRoleBindingRequest(properties); + }; + + /** + * Encodes the specified DeleteScopeRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest} message DeleteScopeRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteScopeRBACRoleBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteScopeRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest} message DeleteScopeRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteScopeRBACRoleBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteScopeRBACRoleBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest} DeleteScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteScopeRBACRoleBindingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteScopeRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest} DeleteScopeRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteScopeRBACRoleBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteScopeRBACRoleBindingRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteScopeRBACRoleBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteScopeRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest} DeleteScopeRBACRoleBindingRequest + */ + DeleteScopeRBACRoleBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteScopeRBACRoleBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest} message DeleteScopeRBACRoleBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteScopeRBACRoleBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteScopeRBACRoleBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteScopeRBACRoleBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteScopeRBACRoleBindingRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteScopeRBACRoleBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest"; + }; + + return DeleteScopeRBACRoleBindingRequest; + })(); + + v1.ListScopeRBACRoleBindingsRequest = (function() { + + /** + * Properties of a ListScopeRBACRoleBindingsRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IListScopeRBACRoleBindingsRequest + * @property {string|null} [parent] ListScopeRBACRoleBindingsRequest parent + * @property {number|null} [pageSize] ListScopeRBACRoleBindingsRequest pageSize + * @property {string|null} [pageToken] ListScopeRBACRoleBindingsRequest pageToken + */ + + /** + * Constructs a new ListScopeRBACRoleBindingsRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListScopeRBACRoleBindingsRequest. + * @implements IListScopeRBACRoleBindingsRequest + * @constructor + * @param {google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest=} [properties] Properties to set + */ + function ListScopeRBACRoleBindingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListScopeRBACRoleBindingsRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + * @instance + */ + ListScopeRBACRoleBindingsRequest.prototype.parent = ""; + + /** + * ListScopeRBACRoleBindingsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + * @instance + */ + ListScopeRBACRoleBindingsRequest.prototype.pageSize = 0; + + /** + * ListScopeRBACRoleBindingsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + * @instance + */ + ListScopeRBACRoleBindingsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListScopeRBACRoleBindingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + * @static + * @param {google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest} ListScopeRBACRoleBindingsRequest instance + */ + ListScopeRBACRoleBindingsRequest.create = function create(properties) { + return new ListScopeRBACRoleBindingsRequest(properties); + }; + + /** + * Encodes the specified ListScopeRBACRoleBindingsRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + * @static + * @param {google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest} message ListScopeRBACRoleBindingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListScopeRBACRoleBindingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListScopeRBACRoleBindingsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + * @static + * @param {google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest} message ListScopeRBACRoleBindingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListScopeRBACRoleBindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListScopeRBACRoleBindingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest} ListScopeRBACRoleBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListScopeRBACRoleBindingsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListScopeRBACRoleBindingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest} ListScopeRBACRoleBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListScopeRBACRoleBindingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListScopeRBACRoleBindingsRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListScopeRBACRoleBindingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListScopeRBACRoleBindingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest} ListScopeRBACRoleBindingsRequest + */ + ListScopeRBACRoleBindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListScopeRBACRoleBindingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + * @static + * @param {google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest} message ListScopeRBACRoleBindingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListScopeRBACRoleBindingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListScopeRBACRoleBindingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + * @instance + * @returns {Object.} JSON object + */ + ListScopeRBACRoleBindingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListScopeRBACRoleBindingsRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListScopeRBACRoleBindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest"; + }; + + return ListScopeRBACRoleBindingsRequest; + })(); + + v1.ListScopeRBACRoleBindingsResponse = (function() { + + /** + * Properties of a ListScopeRBACRoleBindingsResponse. + * @memberof google.cloud.gkehub.v1 + * @interface IListScopeRBACRoleBindingsResponse + * @property {Array.|null} [rbacrolebindings] ListScopeRBACRoleBindingsResponse rbacrolebindings + * @property {string|null} [nextPageToken] ListScopeRBACRoleBindingsResponse nextPageToken + */ + + /** + * Constructs a new ListScopeRBACRoleBindingsResponse. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListScopeRBACRoleBindingsResponse. + * @implements IListScopeRBACRoleBindingsResponse + * @constructor + * @param {google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse=} [properties] Properties to set + */ + function ListScopeRBACRoleBindingsResponse(properties) { + this.rbacrolebindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListScopeRBACRoleBindingsResponse rbacrolebindings. + * @member {Array.} rbacrolebindings + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse + * @instance + */ + ListScopeRBACRoleBindingsResponse.prototype.rbacrolebindings = $util.emptyArray; + + /** + * ListScopeRBACRoleBindingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse + * @instance + */ + ListScopeRBACRoleBindingsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListScopeRBACRoleBindingsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse + * @static + * @param {google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse} ListScopeRBACRoleBindingsResponse instance + */ + ListScopeRBACRoleBindingsResponse.create = function create(properties) { + return new ListScopeRBACRoleBindingsResponse(properties); + }; + + /** + * Encodes the specified ListScopeRBACRoleBindingsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse + * @static + * @param {google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse} message ListScopeRBACRoleBindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListScopeRBACRoleBindingsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rbacrolebindings != null && message.rbacrolebindings.length) + for (var i = 0; i < message.rbacrolebindings.length; ++i) + $root.google.cloud.gkehub.v1.RBACRoleBinding.encode(message.rbacrolebindings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListScopeRBACRoleBindingsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse + * @static + * @param {google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse} message ListScopeRBACRoleBindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListScopeRBACRoleBindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListScopeRBACRoleBindingsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse} ListScopeRBACRoleBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListScopeRBACRoleBindingsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rbacrolebindings && message.rbacrolebindings.length)) + message.rbacrolebindings = []; + message.rbacrolebindings.push($root.google.cloud.gkehub.v1.RBACRoleBinding.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListScopeRBACRoleBindingsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse} ListScopeRBACRoleBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListScopeRBACRoleBindingsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListScopeRBACRoleBindingsResponse message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListScopeRBACRoleBindingsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rbacrolebindings != null && message.hasOwnProperty("rbacrolebindings")) { + if (!Array.isArray(message.rbacrolebindings)) + return "rbacrolebindings: array expected"; + for (var i = 0; i < message.rbacrolebindings.length; ++i) { + var error = $root.google.cloud.gkehub.v1.RBACRoleBinding.verify(message.rbacrolebindings[i]); + if (error) + return "rbacrolebindings." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListScopeRBACRoleBindingsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse} ListScopeRBACRoleBindingsResponse + */ + ListScopeRBACRoleBindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse) + return object; + var message = new $root.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse(); + if (object.rbacrolebindings) { + if (!Array.isArray(object.rbacrolebindings)) + throw TypeError(".google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse.rbacrolebindings: array expected"); + message.rbacrolebindings = []; + for (var i = 0; i < object.rbacrolebindings.length; ++i) { + if (typeof object.rbacrolebindings[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse.rbacrolebindings: object expected"); + message.rbacrolebindings[i] = $root.google.cloud.gkehub.v1.RBACRoleBinding.fromObject(object.rbacrolebindings[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListScopeRBACRoleBindingsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse + * @static + * @param {google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse} message ListScopeRBACRoleBindingsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListScopeRBACRoleBindingsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rbacrolebindings = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.rbacrolebindings && message.rbacrolebindings.length) { + object.rbacrolebindings = []; + for (var j = 0; j < message.rbacrolebindings.length; ++j) + object.rbacrolebindings[j] = $root.google.cloud.gkehub.v1.RBACRoleBinding.toObject(message.rbacrolebindings[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListScopeRBACRoleBindingsResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse + * @instance + * @returns {Object.} JSON object + */ + ListScopeRBACRoleBindingsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListScopeRBACRoleBindingsResponse + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListScopeRBACRoleBindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse"; + }; + + return ListScopeRBACRoleBindingsResponse; + })(); + + v1.GetScopeRequest = (function() { + + /** + * Properties of a GetScopeRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IGetScopeRequest + * @property {string|null} [name] GetScopeRequest name + */ + + /** + * Constructs a new GetScopeRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a GetScopeRequest. + * @implements IGetScopeRequest + * @constructor + * @param {google.cloud.gkehub.v1.IGetScopeRequest=} [properties] Properties to set + */ + function GetScopeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetScopeRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.GetScopeRequest + * @instance + */ + GetScopeRequest.prototype.name = ""; + + /** + * Creates a new GetScopeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.GetScopeRequest + * @static + * @param {google.cloud.gkehub.v1.IGetScopeRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.GetScopeRequest} GetScopeRequest instance + */ + GetScopeRequest.create = function create(properties) { + return new GetScopeRequest(properties); + }; + + /** + * Encodes the specified GetScopeRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetScopeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.GetScopeRequest + * @static + * @param {google.cloud.gkehub.v1.IGetScopeRequest} message GetScopeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetScopeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetScopeRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetScopeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.GetScopeRequest + * @static + * @param {google.cloud.gkehub.v1.IGetScopeRequest} message GetScopeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetScopeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetScopeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.GetScopeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.GetScopeRequest} GetScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetScopeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GetScopeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetScopeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.GetScopeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.GetScopeRequest} GetScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetScopeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetScopeRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.GetScopeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetScopeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetScopeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.GetScopeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.GetScopeRequest} GetScopeRequest + */ + GetScopeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.GetScopeRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.GetScopeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetScopeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.GetScopeRequest + * @static + * @param {google.cloud.gkehub.v1.GetScopeRequest} message GetScopeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetScopeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetScopeRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.GetScopeRequest + * @instance + * @returns {Object.} JSON object + */ + GetScopeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetScopeRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.GetScopeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetScopeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.GetScopeRequest"; + }; + + return GetScopeRequest; + })(); + + v1.CreateScopeRequest = (function() { + + /** + * Properties of a CreateScopeRequest. + * @memberof google.cloud.gkehub.v1 + * @interface ICreateScopeRequest + * @property {string|null} [parent] CreateScopeRequest parent + * @property {string|null} [scopeId] CreateScopeRequest scopeId + * @property {google.cloud.gkehub.v1.IScope|null} [scope] CreateScopeRequest scope + */ + + /** + * Constructs a new CreateScopeRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a CreateScopeRequest. + * @implements ICreateScopeRequest + * @constructor + * @param {google.cloud.gkehub.v1.ICreateScopeRequest=} [properties] Properties to set + */ + function CreateScopeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateScopeRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.CreateScopeRequest + * @instance + */ + CreateScopeRequest.prototype.parent = ""; + + /** + * CreateScopeRequest scopeId. + * @member {string} scopeId + * @memberof google.cloud.gkehub.v1.CreateScopeRequest + * @instance + */ + CreateScopeRequest.prototype.scopeId = ""; + + /** + * CreateScopeRequest scope. + * @member {google.cloud.gkehub.v1.IScope|null|undefined} scope + * @memberof google.cloud.gkehub.v1.CreateScopeRequest + * @instance + */ + CreateScopeRequest.prototype.scope = null; + + /** + * Creates a new CreateScopeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.CreateScopeRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateScopeRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.CreateScopeRequest} CreateScopeRequest instance + */ + CreateScopeRequest.create = function create(properties) { + return new CreateScopeRequest(properties); + }; + + /** + * Encodes the specified CreateScopeRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateScopeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.CreateScopeRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateScopeRequest} message CreateScopeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateScopeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.scopeId != null && Object.hasOwnProperty.call(message, "scopeId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.scopeId); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + $root.google.cloud.gkehub.v1.Scope.encode(message.scope, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateScopeRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateScopeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.CreateScopeRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateScopeRequest} message CreateScopeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateScopeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateScopeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.CreateScopeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.CreateScopeRequest} CreateScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateScopeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.CreateScopeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.scopeId = reader.string(); + break; + } + case 3: { + message.scope = $root.google.cloud.gkehub.v1.Scope.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateScopeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.CreateScopeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.CreateScopeRequest} CreateScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateScopeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateScopeRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.CreateScopeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateScopeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.scopeId != null && message.hasOwnProperty("scopeId")) + if (!$util.isString(message.scopeId)) + return "scopeId: string expected"; + if (message.scope != null && message.hasOwnProperty("scope")) { + var error = $root.google.cloud.gkehub.v1.Scope.verify(message.scope); + if (error) + return "scope." + error; + } + return null; + }; + + /** + * Creates a CreateScopeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.CreateScopeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.CreateScopeRequest} CreateScopeRequest + */ + CreateScopeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.CreateScopeRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.CreateScopeRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.scopeId != null) + message.scopeId = String(object.scopeId); + if (object.scope != null) { + if (typeof object.scope !== "object") + throw TypeError(".google.cloud.gkehub.v1.CreateScopeRequest.scope: object expected"); + message.scope = $root.google.cloud.gkehub.v1.Scope.fromObject(object.scope); + } + return message; + }; + + /** + * Creates a plain object from a CreateScopeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.CreateScopeRequest + * @static + * @param {google.cloud.gkehub.v1.CreateScopeRequest} message CreateScopeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateScopeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.scopeId = ""; + object.scope = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.scopeId != null && message.hasOwnProperty("scopeId")) + object.scopeId = message.scopeId; + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = $root.google.cloud.gkehub.v1.Scope.toObject(message.scope, options); + return object; + }; + + /** + * Converts this CreateScopeRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.CreateScopeRequest + * @instance + * @returns {Object.} JSON object + */ + CreateScopeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateScopeRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.CreateScopeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateScopeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.CreateScopeRequest"; + }; + + return CreateScopeRequest; + })(); + + v1.UpdateScopeRequest = (function() { + + /** + * Properties of an UpdateScopeRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IUpdateScopeRequest + * @property {google.cloud.gkehub.v1.IScope|null} [scope] UpdateScopeRequest scope + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateScopeRequest updateMask + */ + + /** + * Constructs a new UpdateScopeRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents an UpdateScopeRequest. + * @implements IUpdateScopeRequest + * @constructor + * @param {google.cloud.gkehub.v1.IUpdateScopeRequest=} [properties] Properties to set + */ + function UpdateScopeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateScopeRequest scope. + * @member {google.cloud.gkehub.v1.IScope|null|undefined} scope + * @memberof google.cloud.gkehub.v1.UpdateScopeRequest + * @instance + */ + UpdateScopeRequest.prototype.scope = null; + + /** + * UpdateScopeRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.gkehub.v1.UpdateScopeRequest + * @instance + */ + UpdateScopeRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateScopeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.UpdateScopeRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateScopeRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.UpdateScopeRequest} UpdateScopeRequest instance + */ + UpdateScopeRequest.create = function create(properties) { + return new UpdateScopeRequest(properties); + }; + + /** + * Encodes the specified UpdateScopeRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateScopeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.UpdateScopeRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateScopeRequest} message UpdateScopeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateScopeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scope != null && Object.hasOwnProperty.call(message, "scope")) + $root.google.cloud.gkehub.v1.Scope.encode(message.scope, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateScopeRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateScopeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateScopeRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateScopeRequest} message UpdateScopeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateScopeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateScopeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.UpdateScopeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.UpdateScopeRequest} UpdateScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateScopeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.UpdateScopeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.scope = $root.google.cloud.gkehub.v1.Scope.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateScopeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateScopeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.UpdateScopeRequest} UpdateScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateScopeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateScopeRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.UpdateScopeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateScopeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scope != null && message.hasOwnProperty("scope")) { + var error = $root.google.cloud.gkehub.v1.Scope.verify(message.scope); + if (error) + return "scope." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateScopeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.UpdateScopeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.UpdateScopeRequest} UpdateScopeRequest + */ + UpdateScopeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.UpdateScopeRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.UpdateScopeRequest(); + if (object.scope != null) { + if (typeof object.scope !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateScopeRequest.scope: object expected"); + message.scope = $root.google.cloud.gkehub.v1.Scope.fromObject(object.scope); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateScopeRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateScopeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.UpdateScopeRequest + * @static + * @param {google.cloud.gkehub.v1.UpdateScopeRequest} message UpdateScopeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateScopeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.scope = null; + object.updateMask = null; + } + if (message.scope != null && message.hasOwnProperty("scope")) + object.scope = $root.google.cloud.gkehub.v1.Scope.toObject(message.scope, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateScopeRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.UpdateScopeRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateScopeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateScopeRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.UpdateScopeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateScopeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.UpdateScopeRequest"; + }; + + return UpdateScopeRequest; + })(); + + v1.DeleteScopeRequest = (function() { + + /** + * Properties of a DeleteScopeRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IDeleteScopeRequest + * @property {string|null} [name] DeleteScopeRequest name + */ + + /** + * Constructs a new DeleteScopeRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a DeleteScopeRequest. + * @implements IDeleteScopeRequest + * @constructor + * @param {google.cloud.gkehub.v1.IDeleteScopeRequest=} [properties] Properties to set + */ + function DeleteScopeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteScopeRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.DeleteScopeRequest + * @instance + */ + DeleteScopeRequest.prototype.name = ""; + + /** + * Creates a new DeleteScopeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.DeleteScopeRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteScopeRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.DeleteScopeRequest} DeleteScopeRequest instance + */ + DeleteScopeRequest.create = function create(properties) { + return new DeleteScopeRequest(properties); + }; + + /** + * Encodes the specified DeleteScopeRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteScopeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.DeleteScopeRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteScopeRequest} message DeleteScopeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteScopeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteScopeRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteScopeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteScopeRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteScopeRequest} message DeleteScopeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteScopeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteScopeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.DeleteScopeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.DeleteScopeRequest} DeleteScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteScopeRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.DeleteScopeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteScopeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteScopeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.DeleteScopeRequest} DeleteScopeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteScopeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteScopeRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.DeleteScopeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteScopeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteScopeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.DeleteScopeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.DeleteScopeRequest} DeleteScopeRequest + */ + DeleteScopeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.DeleteScopeRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.DeleteScopeRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteScopeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.DeleteScopeRequest + * @static + * @param {google.cloud.gkehub.v1.DeleteScopeRequest} message DeleteScopeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteScopeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteScopeRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.DeleteScopeRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteScopeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteScopeRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.DeleteScopeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteScopeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.DeleteScopeRequest"; + }; + + return DeleteScopeRequest; + })(); + + v1.ListScopesRequest = (function() { + + /** + * Properties of a ListScopesRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IListScopesRequest + * @property {string|null} [parent] ListScopesRequest parent + * @property {number|null} [pageSize] ListScopesRequest pageSize + * @property {string|null} [pageToken] ListScopesRequest pageToken + */ + + /** + * Constructs a new ListScopesRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListScopesRequest. + * @implements IListScopesRequest + * @constructor + * @param {google.cloud.gkehub.v1.IListScopesRequest=} [properties] Properties to set + */ + function ListScopesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListScopesRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.ListScopesRequest + * @instance + */ + ListScopesRequest.prototype.parent = ""; + + /** + * ListScopesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.gkehub.v1.ListScopesRequest + * @instance + */ + ListScopesRequest.prototype.pageSize = 0; + + /** + * ListScopesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.gkehub.v1.ListScopesRequest + * @instance + */ + ListScopesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListScopesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListScopesRequest + * @static + * @param {google.cloud.gkehub.v1.IListScopesRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListScopesRequest} ListScopesRequest instance + */ + ListScopesRequest.create = function create(properties) { + return new ListScopesRequest(properties); + }; + + /** + * Encodes the specified ListScopesRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListScopesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListScopesRequest + * @static + * @param {google.cloud.gkehub.v1.IListScopesRequest} message ListScopesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListScopesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListScopesRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListScopesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListScopesRequest + * @static + * @param {google.cloud.gkehub.v1.IListScopesRequest} message ListScopesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListScopesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListScopesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListScopesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListScopesRequest} ListScopesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListScopesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListScopesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListScopesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListScopesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListScopesRequest} ListScopesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListScopesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListScopesRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListScopesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListScopesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListScopesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListScopesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListScopesRequest} ListScopesRequest + */ + ListScopesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListScopesRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.ListScopesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListScopesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListScopesRequest + * @static + * @param {google.cloud.gkehub.v1.ListScopesRequest} message ListScopesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListScopesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListScopesRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListScopesRequest + * @instance + * @returns {Object.} JSON object + */ + ListScopesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListScopesRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListScopesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListScopesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListScopesRequest"; + }; + + return ListScopesRequest; + })(); + + v1.ListScopesResponse = (function() { + + /** + * Properties of a ListScopesResponse. + * @memberof google.cloud.gkehub.v1 + * @interface IListScopesResponse + * @property {Array.|null} [scopes] ListScopesResponse scopes + * @property {string|null} [nextPageToken] ListScopesResponse nextPageToken + */ + + /** + * Constructs a new ListScopesResponse. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListScopesResponse. + * @implements IListScopesResponse + * @constructor + * @param {google.cloud.gkehub.v1.IListScopesResponse=} [properties] Properties to set + */ + function ListScopesResponse(properties) { + this.scopes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListScopesResponse scopes. + * @member {Array.} scopes + * @memberof google.cloud.gkehub.v1.ListScopesResponse + * @instance + */ + ListScopesResponse.prototype.scopes = $util.emptyArray; + + /** + * ListScopesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.gkehub.v1.ListScopesResponse + * @instance + */ + ListScopesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListScopesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListScopesResponse + * @static + * @param {google.cloud.gkehub.v1.IListScopesResponse=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListScopesResponse} ListScopesResponse instance + */ + ListScopesResponse.create = function create(properties) { + return new ListScopesResponse(properties); + }; + + /** + * Encodes the specified ListScopesResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListScopesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListScopesResponse + * @static + * @param {google.cloud.gkehub.v1.IListScopesResponse} message ListScopesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListScopesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scopes != null && message.scopes.length) + for (var i = 0; i < message.scopes.length; ++i) + $root.google.cloud.gkehub.v1.Scope.encode(message.scopes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListScopesResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListScopesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListScopesResponse + * @static + * @param {google.cloud.gkehub.v1.IListScopesResponse} message ListScopesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListScopesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListScopesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListScopesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListScopesResponse} ListScopesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListScopesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListScopesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.scopes && message.scopes.length)) + message.scopes = []; + message.scopes.push($root.google.cloud.gkehub.v1.Scope.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListScopesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListScopesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListScopesResponse} ListScopesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListScopesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListScopesResponse message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListScopesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListScopesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scopes != null && message.hasOwnProperty("scopes")) { + if (!Array.isArray(message.scopes)) + return "scopes: array expected"; + for (var i = 0; i < message.scopes.length; ++i) { + var error = $root.google.cloud.gkehub.v1.Scope.verify(message.scopes[i]); + if (error) + return "scopes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListScopesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListScopesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListScopesResponse} ListScopesResponse + */ + ListScopesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListScopesResponse) + return object; + var message = new $root.google.cloud.gkehub.v1.ListScopesResponse(); + if (object.scopes) { + if (!Array.isArray(object.scopes)) + throw TypeError(".google.cloud.gkehub.v1.ListScopesResponse.scopes: array expected"); + message.scopes = []; + for (var i = 0; i < object.scopes.length; ++i) { + if (typeof object.scopes[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.ListScopesResponse.scopes: object expected"); + message.scopes[i] = $root.google.cloud.gkehub.v1.Scope.fromObject(object.scopes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListScopesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListScopesResponse + * @static + * @param {google.cloud.gkehub.v1.ListScopesResponse} message ListScopesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListScopesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopes = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.scopes && message.scopes.length) { + object.scopes = []; + for (var j = 0; j < message.scopes.length; ++j) + object.scopes[j] = $root.google.cloud.gkehub.v1.Scope.toObject(message.scopes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListScopesResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListScopesResponse + * @instance + * @returns {Object.} JSON object + */ + ListScopesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListScopesResponse + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListScopesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListScopesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListScopesResponse"; + }; + + return ListScopesResponse; + })(); + + v1.ListPermittedScopesRequest = (function() { + + /** + * Properties of a ListPermittedScopesRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IListPermittedScopesRequest + * @property {string|null} [parent] ListPermittedScopesRequest parent + * @property {number|null} [pageSize] ListPermittedScopesRequest pageSize + * @property {string|null} [pageToken] ListPermittedScopesRequest pageToken + */ + + /** + * Constructs a new ListPermittedScopesRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListPermittedScopesRequest. + * @implements IListPermittedScopesRequest + * @constructor + * @param {google.cloud.gkehub.v1.IListPermittedScopesRequest=} [properties] Properties to set + */ + function ListPermittedScopesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPermittedScopesRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.ListPermittedScopesRequest + * @instance + */ + ListPermittedScopesRequest.prototype.parent = ""; + + /** + * ListPermittedScopesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.gkehub.v1.ListPermittedScopesRequest + * @instance + */ + ListPermittedScopesRequest.prototype.pageSize = 0; + + /** + * ListPermittedScopesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.gkehub.v1.ListPermittedScopesRequest + * @instance + */ + ListPermittedScopesRequest.prototype.pageToken = ""; + + /** + * Creates a new ListPermittedScopesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListPermittedScopesRequest + * @static + * @param {google.cloud.gkehub.v1.IListPermittedScopesRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListPermittedScopesRequest} ListPermittedScopesRequest instance + */ + ListPermittedScopesRequest.create = function create(properties) { + return new ListPermittedScopesRequest(properties); + }; + + /** + * Encodes the specified ListPermittedScopesRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListPermittedScopesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListPermittedScopesRequest + * @static + * @param {google.cloud.gkehub.v1.IListPermittedScopesRequest} message ListPermittedScopesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPermittedScopesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListPermittedScopesRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListPermittedScopesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListPermittedScopesRequest + * @static + * @param {google.cloud.gkehub.v1.IListPermittedScopesRequest} message ListPermittedScopesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPermittedScopesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPermittedScopesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListPermittedScopesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListPermittedScopesRequest} ListPermittedScopesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPermittedScopesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListPermittedScopesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPermittedScopesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListPermittedScopesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListPermittedScopesRequest} ListPermittedScopesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPermittedScopesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPermittedScopesRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListPermittedScopesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPermittedScopesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListPermittedScopesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListPermittedScopesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListPermittedScopesRequest} ListPermittedScopesRequest + */ + ListPermittedScopesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListPermittedScopesRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.ListPermittedScopesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListPermittedScopesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListPermittedScopesRequest + * @static + * @param {google.cloud.gkehub.v1.ListPermittedScopesRequest} message ListPermittedScopesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPermittedScopesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListPermittedScopesRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListPermittedScopesRequest + * @instance + * @returns {Object.} JSON object + */ + ListPermittedScopesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPermittedScopesRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListPermittedScopesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPermittedScopesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListPermittedScopesRequest"; + }; + + return ListPermittedScopesRequest; + })(); + + v1.ListPermittedScopesResponse = (function() { + + /** + * Properties of a ListPermittedScopesResponse. + * @memberof google.cloud.gkehub.v1 + * @interface IListPermittedScopesResponse + * @property {Array.|null} [scopes] ListPermittedScopesResponse scopes + * @property {string|null} [nextPageToken] ListPermittedScopesResponse nextPageToken + */ + + /** + * Constructs a new ListPermittedScopesResponse. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListPermittedScopesResponse. + * @implements IListPermittedScopesResponse + * @constructor + * @param {google.cloud.gkehub.v1.IListPermittedScopesResponse=} [properties] Properties to set + */ + function ListPermittedScopesResponse(properties) { + this.scopes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPermittedScopesResponse scopes. + * @member {Array.} scopes + * @memberof google.cloud.gkehub.v1.ListPermittedScopesResponse + * @instance + */ + ListPermittedScopesResponse.prototype.scopes = $util.emptyArray; + + /** + * ListPermittedScopesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.gkehub.v1.ListPermittedScopesResponse + * @instance + */ + ListPermittedScopesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPermittedScopesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListPermittedScopesResponse + * @static + * @param {google.cloud.gkehub.v1.IListPermittedScopesResponse=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListPermittedScopesResponse} ListPermittedScopesResponse instance + */ + ListPermittedScopesResponse.create = function create(properties) { + return new ListPermittedScopesResponse(properties); + }; + + /** + * Encodes the specified ListPermittedScopesResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListPermittedScopesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListPermittedScopesResponse + * @static + * @param {google.cloud.gkehub.v1.IListPermittedScopesResponse} message ListPermittedScopesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPermittedScopesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scopes != null && message.scopes.length) + for (var i = 0; i < message.scopes.length; ++i) + $root.google.cloud.gkehub.v1.Scope.encode(message.scopes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListPermittedScopesResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListPermittedScopesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListPermittedScopesResponse + * @static + * @param {google.cloud.gkehub.v1.IListPermittedScopesResponse} message ListPermittedScopesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPermittedScopesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPermittedScopesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListPermittedScopesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListPermittedScopesResponse} ListPermittedScopesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPermittedScopesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListPermittedScopesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.scopes && message.scopes.length)) + message.scopes = []; + message.scopes.push($root.google.cloud.gkehub.v1.Scope.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPermittedScopesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListPermittedScopesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListPermittedScopesResponse} ListPermittedScopesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPermittedScopesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPermittedScopesResponse message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListPermittedScopesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPermittedScopesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scopes != null && message.hasOwnProperty("scopes")) { + if (!Array.isArray(message.scopes)) + return "scopes: array expected"; + for (var i = 0; i < message.scopes.length; ++i) { + var error = $root.google.cloud.gkehub.v1.Scope.verify(message.scopes[i]); + if (error) + return "scopes." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPermittedScopesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListPermittedScopesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListPermittedScopesResponse} ListPermittedScopesResponse + */ + ListPermittedScopesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListPermittedScopesResponse) + return object; + var message = new $root.google.cloud.gkehub.v1.ListPermittedScopesResponse(); + if (object.scopes) { + if (!Array.isArray(object.scopes)) + throw TypeError(".google.cloud.gkehub.v1.ListPermittedScopesResponse.scopes: array expected"); + message.scopes = []; + for (var i = 0; i < object.scopes.length; ++i) { + if (typeof object.scopes[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.ListPermittedScopesResponse.scopes: object expected"); + message.scopes[i] = $root.google.cloud.gkehub.v1.Scope.fromObject(object.scopes[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListPermittedScopesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListPermittedScopesResponse + * @static + * @param {google.cloud.gkehub.v1.ListPermittedScopesResponse} message ListPermittedScopesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPermittedScopesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.scopes = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.scopes && message.scopes.length) { + object.scopes = []; + for (var j = 0; j < message.scopes.length; ++j) + object.scopes[j] = $root.google.cloud.gkehub.v1.Scope.toObject(message.scopes[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListPermittedScopesResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListPermittedScopesResponse + * @instance + * @returns {Object.} JSON object + */ + ListPermittedScopesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPermittedScopesResponse + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListPermittedScopesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPermittedScopesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListPermittedScopesResponse"; + }; + + return ListPermittedScopesResponse; + })(); + + v1.GetMembershipBindingRequest = (function() { + + /** + * Properties of a GetMembershipBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IGetMembershipBindingRequest + * @property {string|null} [name] GetMembershipBindingRequest name + */ + + /** + * Constructs a new GetMembershipBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a GetMembershipBindingRequest. + * @implements IGetMembershipBindingRequest + * @constructor + * @param {google.cloud.gkehub.v1.IGetMembershipBindingRequest=} [properties] Properties to set + */ + function GetMembershipBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetMembershipBindingRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.GetMembershipBindingRequest + * @instance + */ + GetMembershipBindingRequest.prototype.name = ""; + + /** + * Creates a new GetMembershipBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.GetMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IGetMembershipBindingRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.GetMembershipBindingRequest} GetMembershipBindingRequest instance + */ + GetMembershipBindingRequest.create = function create(properties) { + return new GetMembershipBindingRequest(properties); + }; + + /** + * Encodes the specified GetMembershipBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.GetMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IGetMembershipBindingRequest} message GetMembershipBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMembershipBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetMembershipBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.GetMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IGetMembershipBindingRequest} message GetMembershipBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMembershipBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMembershipBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.GetMembershipBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.GetMembershipBindingRequest} GetMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMembershipBindingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GetMembershipBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMembershipBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.GetMembershipBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.GetMembershipBindingRequest} GetMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMembershipBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMembershipBindingRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.GetMembershipBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMembershipBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetMembershipBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.GetMembershipBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.GetMembershipBindingRequest} GetMembershipBindingRequest + */ + GetMembershipBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.GetMembershipBindingRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.GetMembershipBindingRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMembershipBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.GetMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.GetMembershipBindingRequest} message GetMembershipBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMembershipBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetMembershipBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.GetMembershipBindingRequest + * @instance + * @returns {Object.} JSON object + */ + GetMembershipBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMembershipBindingRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.GetMembershipBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMembershipBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.GetMembershipBindingRequest"; + }; + + return GetMembershipBindingRequest; + })(); + + v1.CreateMembershipBindingRequest = (function() { + + /** + * Properties of a CreateMembershipBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @interface ICreateMembershipBindingRequest + * @property {string|null} [parent] CreateMembershipBindingRequest parent + * @property {google.cloud.gkehub.v1.IMembershipBinding|null} [membershipBinding] CreateMembershipBindingRequest membershipBinding + * @property {string|null} [membershipBindingId] CreateMembershipBindingRequest membershipBindingId + */ + + /** + * Constructs a new CreateMembershipBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a CreateMembershipBindingRequest. + * @implements ICreateMembershipBindingRequest + * @constructor + * @param {google.cloud.gkehub.v1.ICreateMembershipBindingRequest=} [properties] Properties to set + */ + function CreateMembershipBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateMembershipBindingRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.CreateMembershipBindingRequest + * @instance + */ + CreateMembershipBindingRequest.prototype.parent = ""; + + /** + * CreateMembershipBindingRequest membershipBinding. + * @member {google.cloud.gkehub.v1.IMembershipBinding|null|undefined} membershipBinding + * @memberof google.cloud.gkehub.v1.CreateMembershipBindingRequest + * @instance + */ + CreateMembershipBindingRequest.prototype.membershipBinding = null; + + /** + * CreateMembershipBindingRequest membershipBindingId. + * @member {string} membershipBindingId + * @memberof google.cloud.gkehub.v1.CreateMembershipBindingRequest + * @instance + */ + CreateMembershipBindingRequest.prototype.membershipBindingId = ""; + + /** + * Creates a new CreateMembershipBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.CreateMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateMembershipBindingRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.CreateMembershipBindingRequest} CreateMembershipBindingRequest instance + */ + CreateMembershipBindingRequest.create = function create(properties) { + return new CreateMembershipBindingRequest(properties); + }; + + /** + * Encodes the specified CreateMembershipBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.CreateMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateMembershipBindingRequest} message CreateMembershipBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMembershipBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.membershipBinding != null && Object.hasOwnProperty.call(message, "membershipBinding")) + $root.google.cloud.gkehub.v1.MembershipBinding.encode(message.membershipBinding, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.membershipBindingId != null && Object.hasOwnProperty.call(message, "membershipBindingId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.membershipBindingId); + return writer; + }; + + /** + * Encodes the specified CreateMembershipBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.CreateMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateMembershipBindingRequest} message CreateMembershipBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMembershipBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateMembershipBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.CreateMembershipBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.CreateMembershipBindingRequest} CreateMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMembershipBindingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.CreateMembershipBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.membershipBinding = $root.google.cloud.gkehub.v1.MembershipBinding.decode(reader, reader.uint32()); + break; + } + case 3: { + message.membershipBindingId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateMembershipBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.CreateMembershipBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.CreateMembershipBindingRequest} CreateMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMembershipBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateMembershipBindingRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.CreateMembershipBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateMembershipBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.membershipBinding != null && message.hasOwnProperty("membershipBinding")) { + var error = $root.google.cloud.gkehub.v1.MembershipBinding.verify(message.membershipBinding); + if (error) + return "membershipBinding." + error; + } + if (message.membershipBindingId != null && message.hasOwnProperty("membershipBindingId")) + if (!$util.isString(message.membershipBindingId)) + return "membershipBindingId: string expected"; + return null; + }; + + /** + * Creates a CreateMembershipBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.CreateMembershipBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.CreateMembershipBindingRequest} CreateMembershipBindingRequest + */ + CreateMembershipBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.CreateMembershipBindingRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.CreateMembershipBindingRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.membershipBinding != null) { + if (typeof object.membershipBinding !== "object") + throw TypeError(".google.cloud.gkehub.v1.CreateMembershipBindingRequest.membershipBinding: object expected"); + message.membershipBinding = $root.google.cloud.gkehub.v1.MembershipBinding.fromObject(object.membershipBinding); + } + if (object.membershipBindingId != null) + message.membershipBindingId = String(object.membershipBindingId); + return message; + }; + + /** + * Creates a plain object from a CreateMembershipBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.CreateMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.CreateMembershipBindingRequest} message CreateMembershipBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateMembershipBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.membershipBinding = null; + object.membershipBindingId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.membershipBinding != null && message.hasOwnProperty("membershipBinding")) + object.membershipBinding = $root.google.cloud.gkehub.v1.MembershipBinding.toObject(message.membershipBinding, options); + if (message.membershipBindingId != null && message.hasOwnProperty("membershipBindingId")) + object.membershipBindingId = message.membershipBindingId; + return object; + }; + + /** + * Converts this CreateMembershipBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.CreateMembershipBindingRequest + * @instance + * @returns {Object.} JSON object + */ + CreateMembershipBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateMembershipBindingRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.CreateMembershipBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateMembershipBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.CreateMembershipBindingRequest"; + }; + + return CreateMembershipBindingRequest; + })(); + + v1.UpdateMembershipBindingRequest = (function() { + + /** + * Properties of an UpdateMembershipBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IUpdateMembershipBindingRequest + * @property {google.cloud.gkehub.v1.IMembershipBinding|null} [membershipBinding] UpdateMembershipBindingRequest membershipBinding + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMembershipBindingRequest updateMask + */ + + /** + * Constructs a new UpdateMembershipBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents an UpdateMembershipBindingRequest. + * @implements IUpdateMembershipBindingRequest + * @constructor + * @param {google.cloud.gkehub.v1.IUpdateMembershipBindingRequest=} [properties] Properties to set + */ + function UpdateMembershipBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateMembershipBindingRequest membershipBinding. + * @member {google.cloud.gkehub.v1.IMembershipBinding|null|undefined} membershipBinding + * @memberof google.cloud.gkehub.v1.UpdateMembershipBindingRequest + * @instance + */ + UpdateMembershipBindingRequest.prototype.membershipBinding = null; + + /** + * UpdateMembershipBindingRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.gkehub.v1.UpdateMembershipBindingRequest + * @instance + */ + UpdateMembershipBindingRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateMembershipBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.UpdateMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateMembershipBindingRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.UpdateMembershipBindingRequest} UpdateMembershipBindingRequest instance + */ + UpdateMembershipBindingRequest.create = function create(properties) { + return new UpdateMembershipBindingRequest(properties); + }; + + /** + * Encodes the specified UpdateMembershipBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.UpdateMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateMembershipBindingRequest} message UpdateMembershipBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMembershipBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.membershipBinding != null && Object.hasOwnProperty.call(message, "membershipBinding")) + $root.google.cloud.gkehub.v1.MembershipBinding.encode(message.membershipBinding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateMembershipBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateMembershipBindingRequest} message UpdateMembershipBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMembershipBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateMembershipBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.UpdateMembershipBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.UpdateMembershipBindingRequest} UpdateMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMembershipBindingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.UpdateMembershipBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.membershipBinding = $root.google.cloud.gkehub.v1.MembershipBinding.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateMembershipBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateMembershipBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.UpdateMembershipBindingRequest} UpdateMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMembershipBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateMembershipBindingRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.UpdateMembershipBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateMembershipBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.membershipBinding != null && message.hasOwnProperty("membershipBinding")) { + var error = $root.google.cloud.gkehub.v1.MembershipBinding.verify(message.membershipBinding); + if (error) + return "membershipBinding." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateMembershipBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.UpdateMembershipBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.UpdateMembershipBindingRequest} UpdateMembershipBindingRequest + */ + UpdateMembershipBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.UpdateMembershipBindingRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.UpdateMembershipBindingRequest(); + if (object.membershipBinding != null) { + if (typeof object.membershipBinding !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateMembershipBindingRequest.membershipBinding: object expected"); + message.membershipBinding = $root.google.cloud.gkehub.v1.MembershipBinding.fromObject(object.membershipBinding); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateMembershipBindingRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateMembershipBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.UpdateMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.UpdateMembershipBindingRequest} message UpdateMembershipBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateMembershipBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.membershipBinding = null; + object.updateMask = null; + } + if (message.membershipBinding != null && message.hasOwnProperty("membershipBinding")) + object.membershipBinding = $root.google.cloud.gkehub.v1.MembershipBinding.toObject(message.membershipBinding, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateMembershipBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.UpdateMembershipBindingRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateMembershipBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateMembershipBindingRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.UpdateMembershipBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateMembershipBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.UpdateMembershipBindingRequest"; + }; + + return UpdateMembershipBindingRequest; + })(); + + v1.DeleteMembershipBindingRequest = (function() { + + /** + * Properties of a DeleteMembershipBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IDeleteMembershipBindingRequest + * @property {string|null} [name] DeleteMembershipBindingRequest name + */ + + /** + * Constructs a new DeleteMembershipBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a DeleteMembershipBindingRequest. + * @implements IDeleteMembershipBindingRequest + * @constructor + * @param {google.cloud.gkehub.v1.IDeleteMembershipBindingRequest=} [properties] Properties to set + */ + function DeleteMembershipBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteMembershipBindingRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.DeleteMembershipBindingRequest + * @instance + */ + DeleteMembershipBindingRequest.prototype.name = ""; + + /** + * Creates a new DeleteMembershipBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.DeleteMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteMembershipBindingRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.DeleteMembershipBindingRequest} DeleteMembershipBindingRequest instance + */ + DeleteMembershipBindingRequest.create = function create(properties) { + return new DeleteMembershipBindingRequest(properties); + }; + + /** + * Encodes the specified DeleteMembershipBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.DeleteMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteMembershipBindingRequest} message DeleteMembershipBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMembershipBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteMembershipBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteMembershipBindingRequest} message DeleteMembershipBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMembershipBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteMembershipBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.DeleteMembershipBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.DeleteMembershipBindingRequest} DeleteMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMembershipBindingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.DeleteMembershipBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteMembershipBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteMembershipBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.DeleteMembershipBindingRequest} DeleteMembershipBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMembershipBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteMembershipBindingRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.DeleteMembershipBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteMembershipBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteMembershipBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.DeleteMembershipBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.DeleteMembershipBindingRequest} DeleteMembershipBindingRequest + */ + DeleteMembershipBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.DeleteMembershipBindingRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.DeleteMembershipBindingRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteMembershipBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.DeleteMembershipBindingRequest + * @static + * @param {google.cloud.gkehub.v1.DeleteMembershipBindingRequest} message DeleteMembershipBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteMembershipBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteMembershipBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.DeleteMembershipBindingRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteMembershipBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteMembershipBindingRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.DeleteMembershipBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteMembershipBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.DeleteMembershipBindingRequest"; + }; + + return DeleteMembershipBindingRequest; + })(); + + v1.ListMembershipBindingsRequest = (function() { + + /** + * Properties of a ListMembershipBindingsRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IListMembershipBindingsRequest + * @property {string|null} [parent] ListMembershipBindingsRequest parent + * @property {number|null} [pageSize] ListMembershipBindingsRequest pageSize + * @property {string|null} [pageToken] ListMembershipBindingsRequest pageToken + * @property {string|null} [filter] ListMembershipBindingsRequest filter + */ + + /** + * Constructs a new ListMembershipBindingsRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListMembershipBindingsRequest. + * @implements IListMembershipBindingsRequest + * @constructor + * @param {google.cloud.gkehub.v1.IListMembershipBindingsRequest=} [properties] Properties to set + */ + function ListMembershipBindingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMembershipBindingsRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @instance + */ + ListMembershipBindingsRequest.prototype.parent = ""; + + /** + * ListMembershipBindingsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @instance + */ + ListMembershipBindingsRequest.prototype.pageSize = 0; + + /** + * ListMembershipBindingsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @instance + */ + ListMembershipBindingsRequest.prototype.pageToken = ""; + + /** + * ListMembershipBindingsRequest filter. + * @member {string} filter + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @instance + */ + ListMembershipBindingsRequest.prototype.filter = ""; + + /** + * Creates a new ListMembershipBindingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @static + * @param {google.cloud.gkehub.v1.IListMembershipBindingsRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListMembershipBindingsRequest} ListMembershipBindingsRequest instance + */ + ListMembershipBindingsRequest.create = function create(properties) { + return new ListMembershipBindingsRequest(properties); + }; + + /** + * Encodes the specified ListMembershipBindingsRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipBindingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @static + * @param {google.cloud.gkehub.v1.IListMembershipBindingsRequest} message ListMembershipBindingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMembershipBindingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListMembershipBindingsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipBindingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @static + * @param {google.cloud.gkehub.v1.IListMembershipBindingsRequest} message ListMembershipBindingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMembershipBindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMembershipBindingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListMembershipBindingsRequest} ListMembershipBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMembershipBindingsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListMembershipBindingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMembershipBindingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListMembershipBindingsRequest} ListMembershipBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMembershipBindingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMembershipBindingsRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMembershipBindingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListMembershipBindingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListMembershipBindingsRequest} ListMembershipBindingsRequest + */ + ListMembershipBindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListMembershipBindingsRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.ListMembershipBindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListMembershipBindingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @static + * @param {google.cloud.gkehub.v1.ListMembershipBindingsRequest} message ListMembershipBindingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMembershipBindingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListMembershipBindingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMembershipBindingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMembershipBindingsRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMembershipBindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListMembershipBindingsRequest"; + }; + + return ListMembershipBindingsRequest; + })(); + + v1.ListMembershipBindingsResponse = (function() { + + /** + * Properties of a ListMembershipBindingsResponse. + * @memberof google.cloud.gkehub.v1 + * @interface IListMembershipBindingsResponse + * @property {Array.|null} [membershipBindings] ListMembershipBindingsResponse membershipBindings + * @property {string|null} [nextPageToken] ListMembershipBindingsResponse nextPageToken + * @property {Array.|null} [unreachable] ListMembershipBindingsResponse unreachable + */ + + /** + * Constructs a new ListMembershipBindingsResponse. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListMembershipBindingsResponse. + * @implements IListMembershipBindingsResponse + * @constructor + * @param {google.cloud.gkehub.v1.IListMembershipBindingsResponse=} [properties] Properties to set + */ + function ListMembershipBindingsResponse(properties) { + this.membershipBindings = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMembershipBindingsResponse membershipBindings. + * @member {Array.} membershipBindings + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsResponse + * @instance + */ + ListMembershipBindingsResponse.prototype.membershipBindings = $util.emptyArray; + + /** + * ListMembershipBindingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsResponse + * @instance + */ + ListMembershipBindingsResponse.prototype.nextPageToken = ""; + + /** + * ListMembershipBindingsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsResponse + * @instance + */ + ListMembershipBindingsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListMembershipBindingsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsResponse + * @static + * @param {google.cloud.gkehub.v1.IListMembershipBindingsResponse=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListMembershipBindingsResponse} ListMembershipBindingsResponse instance + */ + ListMembershipBindingsResponse.create = function create(properties) { + return new ListMembershipBindingsResponse(properties); + }; + + /** + * Encodes the specified ListMembershipBindingsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipBindingsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsResponse + * @static + * @param {google.cloud.gkehub.v1.IListMembershipBindingsResponse} message ListMembershipBindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMembershipBindingsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.membershipBindings != null && message.membershipBindings.length) + for (var i = 0; i < message.membershipBindings.length; ++i) + $root.google.cloud.gkehub.v1.MembershipBinding.encode(message.membershipBindings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListMembershipBindingsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipBindingsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsResponse + * @static + * @param {google.cloud.gkehub.v1.IListMembershipBindingsResponse} message ListMembershipBindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMembershipBindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMembershipBindingsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListMembershipBindingsResponse} ListMembershipBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMembershipBindingsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListMembershipBindingsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.membershipBindings && message.membershipBindings.length)) + message.membershipBindings = []; + message.membershipBindings.push($root.google.cloud.gkehub.v1.MembershipBinding.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMembershipBindingsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListMembershipBindingsResponse} ListMembershipBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMembershipBindingsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMembershipBindingsResponse message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMembershipBindingsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.membershipBindings != null && message.hasOwnProperty("membershipBindings")) { + if (!Array.isArray(message.membershipBindings)) + return "membershipBindings: array expected"; + for (var i = 0; i < message.membershipBindings.length; ++i) { + var error = $root.google.cloud.gkehub.v1.MembershipBinding.verify(message.membershipBindings[i]); + if (error) + return "membershipBindings." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListMembershipBindingsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListMembershipBindingsResponse} ListMembershipBindingsResponse + */ + ListMembershipBindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListMembershipBindingsResponse) + return object; + var message = new $root.google.cloud.gkehub.v1.ListMembershipBindingsResponse(); + if (object.membershipBindings) { + if (!Array.isArray(object.membershipBindings)) + throw TypeError(".google.cloud.gkehub.v1.ListMembershipBindingsResponse.membershipBindings: array expected"); + message.membershipBindings = []; + for (var i = 0; i < object.membershipBindings.length; ++i) { + if (typeof object.membershipBindings[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.ListMembershipBindingsResponse.membershipBindings: object expected"); + message.membershipBindings[i] = $root.google.cloud.gkehub.v1.MembershipBinding.fromObject(object.membershipBindings[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.gkehub.v1.ListMembershipBindingsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListMembershipBindingsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsResponse + * @static + * @param {google.cloud.gkehub.v1.ListMembershipBindingsResponse} message ListMembershipBindingsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMembershipBindingsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.membershipBindings = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.membershipBindings && message.membershipBindings.length) { + object.membershipBindings = []; + for (var j = 0; j < message.membershipBindings.length; ++j) + object.membershipBindings[j] = $root.google.cloud.gkehub.v1.MembershipBinding.toObject(message.membershipBindings[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListMembershipBindingsResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMembershipBindingsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMembershipBindingsResponse + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListMembershipBindingsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMembershipBindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListMembershipBindingsResponse"; + }; + + return ListMembershipBindingsResponse; + })(); + + v1.ListMembershipsRequest = (function() { + + /** + * Properties of a ListMembershipsRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IListMembershipsRequest + * @property {string|null} [parent] ListMembershipsRequest parent + * @property {number|null} [pageSize] ListMembershipsRequest pageSize + * @property {string|null} [pageToken] ListMembershipsRequest pageToken + * @property {string|null} [filter] ListMembershipsRequest filter + * @property {string|null} [orderBy] ListMembershipsRequest orderBy + */ + + /** + * Constructs a new ListMembershipsRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListMembershipsRequest. + * @implements IListMembershipsRequest + * @constructor + * @param {google.cloud.gkehub.v1.IListMembershipsRequest=} [properties] Properties to set + */ + function ListMembershipsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMembershipsRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @instance + */ + ListMembershipsRequest.prototype.parent = ""; + + /** + * ListMembershipsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @instance + */ + ListMembershipsRequest.prototype.pageSize = 0; + + /** + * ListMembershipsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @instance + */ + ListMembershipsRequest.prototype.pageToken = ""; + + /** + * ListMembershipsRequest filter. + * @member {string} filter + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @instance + */ + ListMembershipsRequest.prototype.filter = ""; + + /** + * ListMembershipsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @instance + */ + ListMembershipsRequest.prototype.orderBy = ""; + + /** + * Creates a new ListMembershipsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @static + * @param {google.cloud.gkehub.v1.IListMembershipsRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListMembershipsRequest} ListMembershipsRequest instance + */ + ListMembershipsRequest.create = function create(properties) { + return new ListMembershipsRequest(properties); + }; + + /** + * Encodes the specified ListMembershipsRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @static + * @param {google.cloud.gkehub.v1.IListMembershipsRequest} message ListMembershipsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMembershipsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + return writer; + }; + + /** + * Encodes the specified ListMembershipsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @static + * @param {google.cloud.gkehub.v1.IListMembershipsRequest} message ListMembershipsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMembershipsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMembershipsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListMembershipsRequest} ListMembershipsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMembershipsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListMembershipsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMembershipsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListMembershipsRequest} ListMembershipsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMembershipsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMembershipsRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMembershipsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + return null; + }; + + /** + * Creates a ListMembershipsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListMembershipsRequest} ListMembershipsRequest + */ + ListMembershipsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListMembershipsRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.ListMembershipsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + return message; + }; + + /** + * Creates a plain object from a ListMembershipsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @static + * @param {google.cloud.gkehub.v1.ListMembershipsRequest} message ListMembershipsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMembershipsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + return object; + }; + + /** + * Converts this ListMembershipsRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMembershipsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMembershipsRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListMembershipsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMembershipsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListMembershipsRequest"; + }; + + return ListMembershipsRequest; + })(); + + v1.GetMembershipRBACRoleBindingRequest = (function() { + + /** + * Properties of a GetMembershipRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IGetMembershipRBACRoleBindingRequest + * @property {string|null} [name] GetMembershipRBACRoleBindingRequest name + */ + + /** + * Constructs a new GetMembershipRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a GetMembershipRBACRoleBindingRequest. + * @implements IGetMembershipRBACRoleBindingRequest + * @constructor + * @param {google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest=} [properties] Properties to set + */ + function GetMembershipRBACRoleBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetMembershipRBACRoleBindingRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest + * @instance + */ + GetMembershipRBACRoleBindingRequest.prototype.name = ""; + + /** + * Creates a new GetMembershipRBACRoleBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest} GetMembershipRBACRoleBindingRequest instance + */ + GetMembershipRBACRoleBindingRequest.create = function create(properties) { + return new GetMembershipRBACRoleBindingRequest(properties); + }; + + /** + * Encodes the specified GetMembershipRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest} message GetMembershipRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMembershipRBACRoleBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetMembershipRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest} message GetMembershipRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMembershipRBACRoleBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMembershipRBACRoleBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest} GetMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMembershipRBACRoleBindingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMembershipRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest} GetMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMembershipRBACRoleBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMembershipRBACRoleBindingRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMembershipRBACRoleBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetMembershipRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest} GetMembershipRBACRoleBindingRequest + */ + GetMembershipRBACRoleBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMembershipRBACRoleBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest} message GetMembershipRBACRoleBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMembershipRBACRoleBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetMembershipRBACRoleBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest + * @instance + * @returns {Object.} JSON object + */ + GetMembershipRBACRoleBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMembershipRBACRoleBindingRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMembershipRBACRoleBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest"; + }; + + return GetMembershipRBACRoleBindingRequest; + })(); + + v1.CreateMembershipRBACRoleBindingRequest = (function() { + + /** + * Properties of a CreateMembershipRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @interface ICreateMembershipRBACRoleBindingRequest + * @property {string|null} [parent] CreateMembershipRBACRoleBindingRequest parent + * @property {string|null} [rbacrolebindingId] CreateMembershipRBACRoleBindingRequest rbacrolebindingId + * @property {google.cloud.gkehub.v1.IRBACRoleBinding|null} [rbacrolebinding] CreateMembershipRBACRoleBindingRequest rbacrolebinding + */ + + /** + * Constructs a new CreateMembershipRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a CreateMembershipRBACRoleBindingRequest. + * @implements ICreateMembershipRBACRoleBindingRequest + * @constructor + * @param {google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest=} [properties] Properties to set + */ + function CreateMembershipRBACRoleBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateMembershipRBACRoleBindingRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + * @instance + */ + CreateMembershipRBACRoleBindingRequest.prototype.parent = ""; + + /** + * CreateMembershipRBACRoleBindingRequest rbacrolebindingId. + * @member {string} rbacrolebindingId + * @memberof google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + * @instance + */ + CreateMembershipRBACRoleBindingRequest.prototype.rbacrolebindingId = ""; + + /** + * CreateMembershipRBACRoleBindingRequest rbacrolebinding. + * @member {google.cloud.gkehub.v1.IRBACRoleBinding|null|undefined} rbacrolebinding + * @memberof google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + * @instance + */ + CreateMembershipRBACRoleBindingRequest.prototype.rbacrolebinding = null; + + /** + * Creates a new CreateMembershipRBACRoleBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest} CreateMembershipRBACRoleBindingRequest instance + */ + CreateMembershipRBACRoleBindingRequest.create = function create(properties) { + return new CreateMembershipRBACRoleBindingRequest(properties); + }; + + /** + * Encodes the specified CreateMembershipRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest} message CreateMembershipRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMembershipRBACRoleBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.rbacrolebindingId != null && Object.hasOwnProperty.call(message, "rbacrolebindingId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rbacrolebindingId); + if (message.rbacrolebinding != null && Object.hasOwnProperty.call(message, "rbacrolebinding")) + $root.google.cloud.gkehub.v1.RBACRoleBinding.encode(message.rbacrolebinding, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateMembershipRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest} message CreateMembershipRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMembershipRBACRoleBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateMembershipRBACRoleBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest} CreateMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMembershipRBACRoleBindingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.rbacrolebindingId = reader.string(); + break; + } + case 3: { + message.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateMembershipRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest} CreateMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMembershipRBACRoleBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateMembershipRBACRoleBindingRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateMembershipRBACRoleBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.rbacrolebindingId != null && message.hasOwnProperty("rbacrolebindingId")) + if (!$util.isString(message.rbacrolebindingId)) + return "rbacrolebindingId: string expected"; + if (message.rbacrolebinding != null && message.hasOwnProperty("rbacrolebinding")) { + var error = $root.google.cloud.gkehub.v1.RBACRoleBinding.verify(message.rbacrolebinding); + if (error) + return "rbacrolebinding." + error; + } + return null; + }; + + /** + * Creates a CreateMembershipRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest} CreateMembershipRBACRoleBindingRequest + */ + CreateMembershipRBACRoleBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.rbacrolebindingId != null) + message.rbacrolebindingId = String(object.rbacrolebindingId); + if (object.rbacrolebinding != null) { + if (typeof object.rbacrolebinding !== "object") + throw TypeError(".google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest.rbacrolebinding: object expected"); + message.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.fromObject(object.rbacrolebinding); + } + return message; + }; + + /** + * Creates a plain object from a CreateMembershipRBACRoleBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest} message CreateMembershipRBACRoleBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateMembershipRBACRoleBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.rbacrolebindingId = ""; + object.rbacrolebinding = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.rbacrolebindingId != null && message.hasOwnProperty("rbacrolebindingId")) + object.rbacrolebindingId = message.rbacrolebindingId; + if (message.rbacrolebinding != null && message.hasOwnProperty("rbacrolebinding")) + object.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.toObject(message.rbacrolebinding, options); + return object; + }; + + /** + * Converts this CreateMembershipRBACRoleBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + * @instance + * @returns {Object.} JSON object + */ + CreateMembershipRBACRoleBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateMembershipRBACRoleBindingRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateMembershipRBACRoleBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest"; + }; + + return CreateMembershipRBACRoleBindingRequest; + })(); + + v1.UpdateMembershipRBACRoleBindingRequest = (function() { + + /** + * Properties of an UpdateMembershipRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IUpdateMembershipRBACRoleBindingRequest + * @property {google.cloud.gkehub.v1.IRBACRoleBinding|null} [rbacrolebinding] UpdateMembershipRBACRoleBindingRequest rbacrolebinding + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMembershipRBACRoleBindingRequest updateMask + */ + + /** + * Constructs a new UpdateMembershipRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents an UpdateMembershipRBACRoleBindingRequest. + * @implements IUpdateMembershipRBACRoleBindingRequest + * @constructor + * @param {google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest=} [properties] Properties to set + */ + function UpdateMembershipRBACRoleBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateMembershipRBACRoleBindingRequest rbacrolebinding. + * @member {google.cloud.gkehub.v1.IRBACRoleBinding|null|undefined} rbacrolebinding + * @memberof google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest + * @instance + */ + UpdateMembershipRBACRoleBindingRequest.prototype.rbacrolebinding = null; + + /** + * UpdateMembershipRBACRoleBindingRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest + * @instance + */ + UpdateMembershipRBACRoleBindingRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateMembershipRBACRoleBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest} UpdateMembershipRBACRoleBindingRequest instance + */ + UpdateMembershipRBACRoleBindingRequest.create = function create(properties) { + return new UpdateMembershipRBACRoleBindingRequest(properties); + }; + + /** + * Encodes the specified UpdateMembershipRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest} message UpdateMembershipRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMembershipRBACRoleBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rbacrolebinding != null && Object.hasOwnProperty.call(message, "rbacrolebinding")) + $root.google.cloud.gkehub.v1.RBACRoleBinding.encode(message.rbacrolebinding, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateMembershipRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest} message UpdateMembershipRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMembershipRBACRoleBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateMembershipRBACRoleBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest} UpdateMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMembershipRBACRoleBindingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateMembershipRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest} UpdateMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMembershipRBACRoleBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateMembershipRBACRoleBindingRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateMembershipRBACRoleBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rbacrolebinding != null && message.hasOwnProperty("rbacrolebinding")) { + var error = $root.google.cloud.gkehub.v1.RBACRoleBinding.verify(message.rbacrolebinding); + if (error) + return "rbacrolebinding." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateMembershipRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest} UpdateMembershipRBACRoleBindingRequest + */ + UpdateMembershipRBACRoleBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest(); + if (object.rbacrolebinding != null) { + if (typeof object.rbacrolebinding !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest.rbacrolebinding: object expected"); + message.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.fromObject(object.rbacrolebinding); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateMembershipRBACRoleBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest} message UpdateMembershipRBACRoleBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateMembershipRBACRoleBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rbacrolebinding = null; + object.updateMask = null; + } + if (message.rbacrolebinding != null && message.hasOwnProperty("rbacrolebinding")) + object.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.toObject(message.rbacrolebinding, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateMembershipRBACRoleBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateMembershipRBACRoleBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateMembershipRBACRoleBindingRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateMembershipRBACRoleBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest"; + }; + + return UpdateMembershipRBACRoleBindingRequest; + })(); + + v1.DeleteMembershipRBACRoleBindingRequest = (function() { + + /** + * Properties of a DeleteMembershipRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IDeleteMembershipRBACRoleBindingRequest + * @property {string|null} [name] DeleteMembershipRBACRoleBindingRequest name + */ + + /** + * Constructs a new DeleteMembershipRBACRoleBindingRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a DeleteMembershipRBACRoleBindingRequest. + * @implements IDeleteMembershipRBACRoleBindingRequest + * @constructor + * @param {google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest=} [properties] Properties to set + */ + function DeleteMembershipRBACRoleBindingRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteMembershipRBACRoleBindingRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest + * @instance + */ + DeleteMembershipRBACRoleBindingRequest.prototype.name = ""; + + /** + * Creates a new DeleteMembershipRBACRoleBindingRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest} DeleteMembershipRBACRoleBindingRequest instance + */ + DeleteMembershipRBACRoleBindingRequest.create = function create(properties) { + return new DeleteMembershipRBACRoleBindingRequest(properties); + }; + + /** + * Encodes the specified DeleteMembershipRBACRoleBindingRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest} message DeleteMembershipRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMembershipRBACRoleBindingRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteMembershipRBACRoleBindingRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest} message DeleteMembershipRBACRoleBindingRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMembershipRBACRoleBindingRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteMembershipRBACRoleBindingRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest} DeleteMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMembershipRBACRoleBindingRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteMembershipRBACRoleBindingRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest} DeleteMembershipRBACRoleBindingRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMembershipRBACRoleBindingRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteMembershipRBACRoleBindingRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteMembershipRBACRoleBindingRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteMembershipRBACRoleBindingRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest} DeleteMembershipRBACRoleBindingRequest + */ + DeleteMembershipRBACRoleBindingRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteMembershipRBACRoleBindingRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest + * @static + * @param {google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest} message DeleteMembershipRBACRoleBindingRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteMembershipRBACRoleBindingRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteMembershipRBACRoleBindingRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteMembershipRBACRoleBindingRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteMembershipRBACRoleBindingRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteMembershipRBACRoleBindingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest"; + }; + + return DeleteMembershipRBACRoleBindingRequest; + })(); + + v1.ListMembershipRBACRoleBindingsRequest = (function() { + + /** + * Properties of a ListMembershipRBACRoleBindingsRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IListMembershipRBACRoleBindingsRequest + * @property {string|null} [parent] ListMembershipRBACRoleBindingsRequest parent + * @property {number|null} [pageSize] ListMembershipRBACRoleBindingsRequest pageSize + * @property {string|null} [pageToken] ListMembershipRBACRoleBindingsRequest pageToken + */ + + /** + * Constructs a new ListMembershipRBACRoleBindingsRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListMembershipRBACRoleBindingsRequest. + * @implements IListMembershipRBACRoleBindingsRequest + * @constructor + * @param {google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest=} [properties] Properties to set + */ + function ListMembershipRBACRoleBindingsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMembershipRBACRoleBindingsRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + * @instance + */ + ListMembershipRBACRoleBindingsRequest.prototype.parent = ""; + + /** + * ListMembershipRBACRoleBindingsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + * @instance + */ + ListMembershipRBACRoleBindingsRequest.prototype.pageSize = 0; + + /** + * ListMembershipRBACRoleBindingsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + * @instance + */ + ListMembershipRBACRoleBindingsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMembershipRBACRoleBindingsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + * @static + * @param {google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest} ListMembershipRBACRoleBindingsRequest instance + */ + ListMembershipRBACRoleBindingsRequest.create = function create(properties) { + return new ListMembershipRBACRoleBindingsRequest(properties); + }; + + /** + * Encodes the specified ListMembershipRBACRoleBindingsRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + * @static + * @param {google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest} message ListMembershipRBACRoleBindingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMembershipRBACRoleBindingsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListMembershipRBACRoleBindingsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + * @static + * @param {google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest} message ListMembershipRBACRoleBindingsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMembershipRBACRoleBindingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMembershipRBACRoleBindingsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest} ListMembershipRBACRoleBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMembershipRBACRoleBindingsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMembershipRBACRoleBindingsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest} ListMembershipRBACRoleBindingsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMembershipRBACRoleBindingsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMembershipRBACRoleBindingsRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMembershipRBACRoleBindingsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListMembershipRBACRoleBindingsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest} ListMembershipRBACRoleBindingsRequest + */ + ListMembershipRBACRoleBindingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListMembershipRBACRoleBindingsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + * @static + * @param {google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest} message ListMembershipRBACRoleBindingsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMembershipRBACRoleBindingsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListMembershipRBACRoleBindingsRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMembershipRBACRoleBindingsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMembershipRBACRoleBindingsRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMembershipRBACRoleBindingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest"; + }; + + return ListMembershipRBACRoleBindingsRequest; + })(); + + v1.ListMembershipRBACRoleBindingsResponse = (function() { + + /** + * Properties of a ListMembershipRBACRoleBindingsResponse. + * @memberof google.cloud.gkehub.v1 + * @interface IListMembershipRBACRoleBindingsResponse + * @property {Array.|null} [rbacrolebindings] ListMembershipRBACRoleBindingsResponse rbacrolebindings + * @property {string|null} [nextPageToken] ListMembershipRBACRoleBindingsResponse nextPageToken + * @property {Array.|null} [unreachable] ListMembershipRBACRoleBindingsResponse unreachable + */ + + /** + * Constructs a new ListMembershipRBACRoleBindingsResponse. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListMembershipRBACRoleBindingsResponse. + * @implements IListMembershipRBACRoleBindingsResponse + * @constructor + * @param {google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse=} [properties] Properties to set + */ + function ListMembershipRBACRoleBindingsResponse(properties) { + this.rbacrolebindings = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMembershipRBACRoleBindingsResponse rbacrolebindings. + * @member {Array.} rbacrolebindings + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + * @instance + */ + ListMembershipRBACRoleBindingsResponse.prototype.rbacrolebindings = $util.emptyArray; + + /** + * ListMembershipRBACRoleBindingsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + * @instance + */ + ListMembershipRBACRoleBindingsResponse.prototype.nextPageToken = ""; + + /** + * ListMembershipRBACRoleBindingsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + * @instance + */ + ListMembershipRBACRoleBindingsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListMembershipRBACRoleBindingsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + * @static + * @param {google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse} ListMembershipRBACRoleBindingsResponse instance + */ + ListMembershipRBACRoleBindingsResponse.create = function create(properties) { + return new ListMembershipRBACRoleBindingsResponse(properties); + }; + + /** + * Encodes the specified ListMembershipRBACRoleBindingsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + * @static + * @param {google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse} message ListMembershipRBACRoleBindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMembershipRBACRoleBindingsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rbacrolebindings != null && message.rbacrolebindings.length) + for (var i = 0; i < message.rbacrolebindings.length; ++i) + $root.google.cloud.gkehub.v1.RBACRoleBinding.encode(message.rbacrolebindings[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListMembershipRBACRoleBindingsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + * @static + * @param {google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse} message ListMembershipRBACRoleBindingsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMembershipRBACRoleBindingsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMembershipRBACRoleBindingsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse} ListMembershipRBACRoleBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMembershipRBACRoleBindingsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rbacrolebindings && message.rbacrolebindings.length)) + message.rbacrolebindings = []; + message.rbacrolebindings.push($root.google.cloud.gkehub.v1.RBACRoleBinding.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMembershipRBACRoleBindingsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse} ListMembershipRBACRoleBindingsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMembershipRBACRoleBindingsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMembershipRBACRoleBindingsResponse message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMembershipRBACRoleBindingsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rbacrolebindings != null && message.hasOwnProperty("rbacrolebindings")) { + if (!Array.isArray(message.rbacrolebindings)) + return "rbacrolebindings: array expected"; + for (var i = 0; i < message.rbacrolebindings.length; ++i) { + var error = $root.google.cloud.gkehub.v1.RBACRoleBinding.verify(message.rbacrolebindings[i]); + if (error) + return "rbacrolebindings." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListMembershipRBACRoleBindingsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse} ListMembershipRBACRoleBindingsResponse + */ + ListMembershipRBACRoleBindingsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse) + return object; + var message = new $root.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse(); + if (object.rbacrolebindings) { + if (!Array.isArray(object.rbacrolebindings)) + throw TypeError(".google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse.rbacrolebindings: array expected"); + message.rbacrolebindings = []; + for (var i = 0; i < object.rbacrolebindings.length; ++i) { + if (typeof object.rbacrolebindings[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse.rbacrolebindings: object expected"); + message.rbacrolebindings[i] = $root.google.cloud.gkehub.v1.RBACRoleBinding.fromObject(object.rbacrolebindings[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListMembershipRBACRoleBindingsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + * @static + * @param {google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse} message ListMembershipRBACRoleBindingsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMembershipRBACRoleBindingsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.rbacrolebindings = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.rbacrolebindings && message.rbacrolebindings.length) { + object.rbacrolebindings = []; + for (var j = 0; j < message.rbacrolebindings.length; ++j) + object.rbacrolebindings[j] = $root.google.cloud.gkehub.v1.RBACRoleBinding.toObject(message.rbacrolebindings[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListMembershipRBACRoleBindingsResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMembershipRBACRoleBindingsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMembershipRBACRoleBindingsResponse + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMembershipRBACRoleBindingsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse"; + }; + + return ListMembershipRBACRoleBindingsResponse; + })(); + + v1.GenerateMembershipRBACRoleBindingYAMLRequest = (function() { + + /** + * Properties of a GenerateMembershipRBACRoleBindingYAMLRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IGenerateMembershipRBACRoleBindingYAMLRequest + * @property {string|null} [parent] GenerateMembershipRBACRoleBindingYAMLRequest parent + * @property {string|null} [rbacrolebindingId] GenerateMembershipRBACRoleBindingYAMLRequest rbacrolebindingId + * @property {google.cloud.gkehub.v1.IRBACRoleBinding|null} [rbacrolebinding] GenerateMembershipRBACRoleBindingYAMLRequest rbacrolebinding + */ + + /** + * Constructs a new GenerateMembershipRBACRoleBindingYAMLRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a GenerateMembershipRBACRoleBindingYAMLRequest. + * @implements IGenerateMembershipRBACRoleBindingYAMLRequest + * @constructor + * @param {google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest=} [properties] Properties to set + */ + function GenerateMembershipRBACRoleBindingYAMLRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateMembershipRBACRoleBindingYAMLRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + * @instance + */ + GenerateMembershipRBACRoleBindingYAMLRequest.prototype.parent = ""; + + /** + * GenerateMembershipRBACRoleBindingYAMLRequest rbacrolebindingId. + * @member {string} rbacrolebindingId + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + * @instance + */ + GenerateMembershipRBACRoleBindingYAMLRequest.prototype.rbacrolebindingId = ""; + + /** + * GenerateMembershipRBACRoleBindingYAMLRequest rbacrolebinding. + * @member {google.cloud.gkehub.v1.IRBACRoleBinding|null|undefined} rbacrolebinding + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + * @instance + */ + GenerateMembershipRBACRoleBindingYAMLRequest.prototype.rbacrolebinding = null; + + /** + * Creates a new GenerateMembershipRBACRoleBindingYAMLRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + * @static + * @param {google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest} GenerateMembershipRBACRoleBindingYAMLRequest instance + */ + GenerateMembershipRBACRoleBindingYAMLRequest.create = function create(properties) { + return new GenerateMembershipRBACRoleBindingYAMLRequest(properties); + }; + + /** + * Encodes the specified GenerateMembershipRBACRoleBindingYAMLRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + * @static + * @param {google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest} message GenerateMembershipRBACRoleBindingYAMLRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateMembershipRBACRoleBindingYAMLRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.rbacrolebindingId != null && Object.hasOwnProperty.call(message, "rbacrolebindingId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.rbacrolebindingId); + if (message.rbacrolebinding != null && Object.hasOwnProperty.call(message, "rbacrolebinding")) + $root.google.cloud.gkehub.v1.RBACRoleBinding.encode(message.rbacrolebinding, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenerateMembershipRBACRoleBindingYAMLRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + * @static + * @param {google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest} message GenerateMembershipRBACRoleBindingYAMLRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateMembershipRBACRoleBindingYAMLRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateMembershipRBACRoleBindingYAMLRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest} GenerateMembershipRBACRoleBindingYAMLRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateMembershipRBACRoleBindingYAMLRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.rbacrolebindingId = reader.string(); + break; + } + case 3: { + message.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateMembershipRBACRoleBindingYAMLRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest} GenerateMembershipRBACRoleBindingYAMLRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateMembershipRBACRoleBindingYAMLRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateMembershipRBACRoleBindingYAMLRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateMembershipRBACRoleBindingYAMLRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.rbacrolebindingId != null && message.hasOwnProperty("rbacrolebindingId")) + if (!$util.isString(message.rbacrolebindingId)) + return "rbacrolebindingId: string expected"; + if (message.rbacrolebinding != null && message.hasOwnProperty("rbacrolebinding")) { + var error = $root.google.cloud.gkehub.v1.RBACRoleBinding.verify(message.rbacrolebinding); + if (error) + return "rbacrolebinding." + error; + } + return null; + }; + + /** + * Creates a GenerateMembershipRBACRoleBindingYAMLRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest} GenerateMembershipRBACRoleBindingYAMLRequest + */ + GenerateMembershipRBACRoleBindingYAMLRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.rbacrolebindingId != null) + message.rbacrolebindingId = String(object.rbacrolebindingId); + if (object.rbacrolebinding != null) { + if (typeof object.rbacrolebinding !== "object") + throw TypeError(".google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest.rbacrolebinding: object expected"); + message.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.fromObject(object.rbacrolebinding); + } + return message; + }; + + /** + * Creates a plain object from a GenerateMembershipRBACRoleBindingYAMLRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + * @static + * @param {google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest} message GenerateMembershipRBACRoleBindingYAMLRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateMembershipRBACRoleBindingYAMLRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.rbacrolebindingId = ""; + object.rbacrolebinding = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.rbacrolebindingId != null && message.hasOwnProperty("rbacrolebindingId")) + object.rbacrolebindingId = message.rbacrolebindingId; + if (message.rbacrolebinding != null && message.hasOwnProperty("rbacrolebinding")) + object.rbacrolebinding = $root.google.cloud.gkehub.v1.RBACRoleBinding.toObject(message.rbacrolebinding, options); + return object; + }; + + /** + * Converts this GenerateMembershipRBACRoleBindingYAMLRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + * @instance + * @returns {Object.} JSON object + */ + GenerateMembershipRBACRoleBindingYAMLRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateMembershipRBACRoleBindingYAMLRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateMembershipRBACRoleBindingYAMLRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest"; + }; + + return GenerateMembershipRBACRoleBindingYAMLRequest; + })(); + + v1.GenerateMembershipRBACRoleBindingYAMLResponse = (function() { + + /** + * Properties of a GenerateMembershipRBACRoleBindingYAMLResponse. + * @memberof google.cloud.gkehub.v1 + * @interface IGenerateMembershipRBACRoleBindingYAMLResponse + * @property {string|null} [roleBindingsYaml] GenerateMembershipRBACRoleBindingYAMLResponse roleBindingsYaml + */ + + /** + * Constructs a new GenerateMembershipRBACRoleBindingYAMLResponse. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a GenerateMembershipRBACRoleBindingYAMLResponse. + * @implements IGenerateMembershipRBACRoleBindingYAMLResponse + * @constructor + * @param {google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse=} [properties] Properties to set + */ + function GenerateMembershipRBACRoleBindingYAMLResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateMembershipRBACRoleBindingYAMLResponse roleBindingsYaml. + * @member {string} roleBindingsYaml + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse + * @instance + */ + GenerateMembershipRBACRoleBindingYAMLResponse.prototype.roleBindingsYaml = ""; + + /** + * Creates a new GenerateMembershipRBACRoleBindingYAMLResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse + * @static + * @param {google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse} GenerateMembershipRBACRoleBindingYAMLResponse instance + */ + GenerateMembershipRBACRoleBindingYAMLResponse.create = function create(properties) { + return new GenerateMembershipRBACRoleBindingYAMLResponse(properties); + }; + + /** + * Encodes the specified GenerateMembershipRBACRoleBindingYAMLResponse message. Does not implicitly {@link google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse + * @static + * @param {google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse} message GenerateMembershipRBACRoleBindingYAMLResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateMembershipRBACRoleBindingYAMLResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.roleBindingsYaml != null && Object.hasOwnProperty.call(message, "roleBindingsYaml")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.roleBindingsYaml); + return writer; + }; + + /** + * Encodes the specified GenerateMembershipRBACRoleBindingYAMLResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse + * @static + * @param {google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse} message GenerateMembershipRBACRoleBindingYAMLResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateMembershipRBACRoleBindingYAMLResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateMembershipRBACRoleBindingYAMLResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse} GenerateMembershipRBACRoleBindingYAMLResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateMembershipRBACRoleBindingYAMLResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.roleBindingsYaml = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateMembershipRBACRoleBindingYAMLResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse} GenerateMembershipRBACRoleBindingYAMLResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateMembershipRBACRoleBindingYAMLResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateMembershipRBACRoleBindingYAMLResponse message. + * @function verify + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateMembershipRBACRoleBindingYAMLResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.roleBindingsYaml != null && message.hasOwnProperty("roleBindingsYaml")) + if (!$util.isString(message.roleBindingsYaml)) + return "roleBindingsYaml: string expected"; + return null; + }; + + /** + * Creates a GenerateMembershipRBACRoleBindingYAMLResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse} GenerateMembershipRBACRoleBindingYAMLResponse + */ + GenerateMembershipRBACRoleBindingYAMLResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse) + return object; + var message = new $root.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse(); + if (object.roleBindingsYaml != null) + message.roleBindingsYaml = String(object.roleBindingsYaml); + return message; + }; + + /** + * Creates a plain object from a GenerateMembershipRBACRoleBindingYAMLResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse + * @static + * @param {google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse} message GenerateMembershipRBACRoleBindingYAMLResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateMembershipRBACRoleBindingYAMLResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.roleBindingsYaml = ""; + if (message.roleBindingsYaml != null && message.hasOwnProperty("roleBindingsYaml")) + object.roleBindingsYaml = message.roleBindingsYaml; + return object; + }; + + /** + * Converts this GenerateMembershipRBACRoleBindingYAMLResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse + * @instance + * @returns {Object.} JSON object + */ + GenerateMembershipRBACRoleBindingYAMLResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateMembershipRBACRoleBindingYAMLResponse + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateMembershipRBACRoleBindingYAMLResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse"; + }; + + return GenerateMembershipRBACRoleBindingYAMLResponse; + })(); + + v1.ListMembershipsResponse = (function() { + + /** + * Properties of a ListMembershipsResponse. + * @memberof google.cloud.gkehub.v1 + * @interface IListMembershipsResponse + * @property {Array.|null} [resources] ListMembershipsResponse resources + * @property {string|null} [nextPageToken] ListMembershipsResponse nextPageToken + * @property {Array.|null} [unreachable] ListMembershipsResponse unreachable + */ + + /** + * Constructs a new ListMembershipsResponse. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListMembershipsResponse. + * @implements IListMembershipsResponse + * @constructor + * @param {google.cloud.gkehub.v1.IListMembershipsResponse=} [properties] Properties to set + */ + function ListMembershipsResponse(properties) { + this.resources = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListMembershipsResponse resources. + * @member {Array.} resources + * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @instance + */ + ListMembershipsResponse.prototype.resources = $util.emptyArray; + + /** + * ListMembershipsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @instance + */ + ListMembershipsResponse.prototype.nextPageToken = ""; + + /** + * ListMembershipsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @instance + */ + ListMembershipsResponse.prototype.unreachable = $util.emptyArray; + + /** + * Creates a new ListMembershipsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @static + * @param {google.cloud.gkehub.v1.IListMembershipsResponse=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListMembershipsResponse} ListMembershipsResponse instance + */ + ListMembershipsResponse.create = function create(properties) { + return new ListMembershipsResponse(properties); + }; + + /** + * Encodes the specified ListMembershipsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @static + * @param {google.cloud.gkehub.v1.IListMembershipsResponse} message ListMembershipsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMembershipsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resources != null && message.resources.length) + for (var i = 0; i < message.resources.length; ++i) + $root.google.cloud.gkehub.v1.Membership.encode(message.resources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.unreachable[i]); + return writer; + }; + + /** + * Encodes the specified ListMembershipsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListMembershipsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @static + * @param {google.cloud.gkehub.v1.IListMembershipsResponse} message ListMembershipsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMembershipsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMembershipsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListMembershipsResponse} ListMembershipsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMembershipsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListMembershipsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push($root.google.cloud.gkehub.v1.Membership.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + case 3: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMembershipsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListMembershipsResponse} ListMembershipsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMembershipsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMembershipsResponse message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMembershipsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resources != null && message.hasOwnProperty("resources")) { + if (!Array.isArray(message.resources)) + return "resources: array expected"; + for (var i = 0; i < message.resources.length; ++i) { + var error = $root.google.cloud.gkehub.v1.Membership.verify(message.resources[i]); + if (error) + return "resources." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + return null; + }; + + /** + * Creates a ListMembershipsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListMembershipsResponse} ListMembershipsResponse + */ + ListMembershipsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListMembershipsResponse) + return object; + var message = new $root.google.cloud.gkehub.v1.ListMembershipsResponse(); + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.cloud.gkehub.v1.ListMembershipsResponse.resources: array expected"); + message.resources = []; + for (var i = 0; i < object.resources.length; ++i) { + if (typeof object.resources[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.ListMembershipsResponse.resources: object expected"); + message.resources[i] = $root.google.cloud.gkehub.v1.Membership.fromObject(object.resources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.gkehub.v1.ListMembershipsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + return message; + }; + + /** + * Creates a plain object from a ListMembershipsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @static + * @param {google.cloud.gkehub.v1.ListMembershipsResponse} message ListMembershipsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMembershipsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resources = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.resources && message.resources.length) { + object.resources = []; + for (var j = 0; j < message.resources.length; ++j) + object.resources[j] = $root.google.cloud.gkehub.v1.Membership.toObject(message.resources[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + return object; + }; + + /** + * Converts this ListMembershipsResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMembershipsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMembershipsResponse + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListMembershipsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMembershipsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListMembershipsResponse"; + }; + + return ListMembershipsResponse; + })(); + + v1.GetMembershipRequest = (function() { + + /** + * Properties of a GetMembershipRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IGetMembershipRequest + * @property {string|null} [name] GetMembershipRequest name + */ + + /** + * Constructs a new GetMembershipRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a GetMembershipRequest. + * @implements IGetMembershipRequest + * @constructor + * @param {google.cloud.gkehub.v1.IGetMembershipRequest=} [properties] Properties to set + */ + function GetMembershipRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetMembershipRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @instance + */ + GetMembershipRequest.prototype.name = ""; + + /** + * Creates a new GetMembershipRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.IGetMembershipRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.GetMembershipRequest} GetMembershipRequest instance + */ + GetMembershipRequest.create = function create(properties) { + return new GetMembershipRequest(properties); + }; + + /** + * Encodes the specified GetMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.IGetMembershipRequest} message GetMembershipRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMembershipRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetMembershipRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.IGetMembershipRequest} message GetMembershipRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMembershipRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMembershipRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.GetMembershipRequest} GetMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMembershipRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GetMembershipRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMembershipRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.GetMembershipRequest} GetMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMembershipRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMembershipRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMembershipRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetMembershipRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.GetMembershipRequest} GetMembershipRequest + */ + GetMembershipRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.GetMembershipRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.GetMembershipRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetMembershipRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.GetMembershipRequest} message GetMembershipRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMembershipRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetMembershipRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @instance + * @returns {Object.} JSON object + */ + GetMembershipRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMembershipRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.GetMembershipRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMembershipRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.GetMembershipRequest"; + }; + + return GetMembershipRequest; + })(); + + v1.ListBoundMembershipsRequest = (function() { + + /** + * Properties of a ListBoundMembershipsRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IListBoundMembershipsRequest + * @property {string|null} [scopeName] ListBoundMembershipsRequest scopeName + * @property {string|null} [filter] ListBoundMembershipsRequest filter + * @property {number|null} [pageSize] ListBoundMembershipsRequest pageSize + * @property {string|null} [pageToken] ListBoundMembershipsRequest pageToken + */ + + /** + * Constructs a new ListBoundMembershipsRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListBoundMembershipsRequest. + * @implements IListBoundMembershipsRequest + * @constructor + * @param {google.cloud.gkehub.v1.IListBoundMembershipsRequest=} [properties] Properties to set + */ + function ListBoundMembershipsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBoundMembershipsRequest scopeName. + * @member {string} scopeName + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @instance + */ + ListBoundMembershipsRequest.prototype.scopeName = ""; + + /** + * ListBoundMembershipsRequest filter. + * @member {string} filter + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @instance + */ + ListBoundMembershipsRequest.prototype.filter = ""; + + /** + * ListBoundMembershipsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @instance + */ + ListBoundMembershipsRequest.prototype.pageSize = 0; + + /** + * ListBoundMembershipsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @instance + */ + ListBoundMembershipsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListBoundMembershipsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @static + * @param {google.cloud.gkehub.v1.IListBoundMembershipsRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListBoundMembershipsRequest} ListBoundMembershipsRequest instance + */ + ListBoundMembershipsRequest.create = function create(properties) { + return new ListBoundMembershipsRequest(properties); + }; + + /** + * Encodes the specified ListBoundMembershipsRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListBoundMembershipsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @static + * @param {google.cloud.gkehub.v1.IListBoundMembershipsRequest} message ListBoundMembershipsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBoundMembershipsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scopeName != null && Object.hasOwnProperty.call(message, "scopeName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.scopeName); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListBoundMembershipsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListBoundMembershipsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @static + * @param {google.cloud.gkehub.v1.IListBoundMembershipsRequest} message ListBoundMembershipsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBoundMembershipsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBoundMembershipsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListBoundMembershipsRequest} ListBoundMembershipsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBoundMembershipsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListBoundMembershipsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.scopeName = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBoundMembershipsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListBoundMembershipsRequest} ListBoundMembershipsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBoundMembershipsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBoundMembershipsRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBoundMembershipsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scopeName != null && message.hasOwnProperty("scopeName")) + if (!$util.isString(message.scopeName)) + return "scopeName: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListBoundMembershipsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListBoundMembershipsRequest} ListBoundMembershipsRequest + */ + ListBoundMembershipsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListBoundMembershipsRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.ListBoundMembershipsRequest(); + if (object.scopeName != null) + message.scopeName = String(object.scopeName); + if (object.filter != null) + message.filter = String(object.filter); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListBoundMembershipsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @static + * @param {google.cloud.gkehub.v1.ListBoundMembershipsRequest} message ListBoundMembershipsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBoundMembershipsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.scopeName = ""; + object.filter = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.scopeName != null && message.hasOwnProperty("scopeName")) + object.scopeName = message.scopeName; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListBoundMembershipsRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @instance + * @returns {Object.} JSON object + */ + ListBoundMembershipsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBoundMembershipsRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBoundMembershipsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListBoundMembershipsRequest"; + }; + + return ListBoundMembershipsRequest; + })(); + + v1.ListBoundMembershipsResponse = (function() { + + /** + * Properties of a ListBoundMembershipsResponse. + * @memberof google.cloud.gkehub.v1 + * @interface IListBoundMembershipsResponse + * @property {Array.|null} [memberships] ListBoundMembershipsResponse memberships + * @property {Array.|null} [unreachable] ListBoundMembershipsResponse unreachable + * @property {string|null} [nextPageToken] ListBoundMembershipsResponse nextPageToken + */ + + /** + * Constructs a new ListBoundMembershipsResponse. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListBoundMembershipsResponse. + * @implements IListBoundMembershipsResponse + * @constructor + * @param {google.cloud.gkehub.v1.IListBoundMembershipsResponse=} [properties] Properties to set + */ + function ListBoundMembershipsResponse(properties) { + this.memberships = []; + this.unreachable = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListBoundMembershipsResponse memberships. + * @member {Array.} memberships + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsResponse + * @instance + */ + ListBoundMembershipsResponse.prototype.memberships = $util.emptyArray; + + /** + * ListBoundMembershipsResponse unreachable. + * @member {Array.} unreachable + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsResponse + * @instance + */ + ListBoundMembershipsResponse.prototype.unreachable = $util.emptyArray; + + /** + * ListBoundMembershipsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsResponse + * @instance + */ + ListBoundMembershipsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListBoundMembershipsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsResponse + * @static + * @param {google.cloud.gkehub.v1.IListBoundMembershipsResponse=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListBoundMembershipsResponse} ListBoundMembershipsResponse instance + */ + ListBoundMembershipsResponse.create = function create(properties) { + return new ListBoundMembershipsResponse(properties); + }; + + /** + * Encodes the specified ListBoundMembershipsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListBoundMembershipsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsResponse + * @static + * @param {google.cloud.gkehub.v1.IListBoundMembershipsResponse} message ListBoundMembershipsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBoundMembershipsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.memberships != null && message.memberships.length) + for (var i = 0; i < message.memberships.length; ++i) + $root.google.cloud.gkehub.v1.Membership.encode(message.memberships[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.unreachable != null && message.unreachable.length) + for (var i = 0; i < message.unreachable.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.unreachable[i]); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListBoundMembershipsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListBoundMembershipsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsResponse + * @static + * @param {google.cloud.gkehub.v1.IListBoundMembershipsResponse} message ListBoundMembershipsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListBoundMembershipsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListBoundMembershipsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListBoundMembershipsResponse} ListBoundMembershipsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBoundMembershipsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListBoundMembershipsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.memberships && message.memberships.length)) + message.memberships = []; + message.memberships.push($root.google.cloud.gkehub.v1.Membership.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.unreachable && message.unreachable.length)) + message.unreachable = []; + message.unreachable.push(reader.string()); + break; + } + case 3: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListBoundMembershipsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListBoundMembershipsResponse} ListBoundMembershipsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListBoundMembershipsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListBoundMembershipsResponse message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListBoundMembershipsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.memberships != null && message.hasOwnProperty("memberships")) { + if (!Array.isArray(message.memberships)) + return "memberships: array expected"; + for (var i = 0; i < message.memberships.length; ++i) { + var error = $root.google.cloud.gkehub.v1.Membership.verify(message.memberships[i]); + if (error) + return "memberships." + error; + } + } + if (message.unreachable != null && message.hasOwnProperty("unreachable")) { + if (!Array.isArray(message.unreachable)) + return "unreachable: array expected"; + for (var i = 0; i < message.unreachable.length; ++i) + if (!$util.isString(message.unreachable[i])) + return "unreachable: string[] expected"; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListBoundMembershipsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListBoundMembershipsResponse} ListBoundMembershipsResponse + */ + ListBoundMembershipsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListBoundMembershipsResponse) + return object; + var message = new $root.google.cloud.gkehub.v1.ListBoundMembershipsResponse(); + if (object.memberships) { + if (!Array.isArray(object.memberships)) + throw TypeError(".google.cloud.gkehub.v1.ListBoundMembershipsResponse.memberships: array expected"); + message.memberships = []; + for (var i = 0; i < object.memberships.length; ++i) { + if (typeof object.memberships[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.ListBoundMembershipsResponse.memberships: object expected"); + message.memberships[i] = $root.google.cloud.gkehub.v1.Membership.fromObject(object.memberships[i]); + } + } + if (object.unreachable) { + if (!Array.isArray(object.unreachable)) + throw TypeError(".google.cloud.gkehub.v1.ListBoundMembershipsResponse.unreachable: array expected"); + message.unreachable = []; + for (var i = 0; i < object.unreachable.length; ++i) + message.unreachable[i] = String(object.unreachable[i]); + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListBoundMembershipsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsResponse + * @static + * @param {google.cloud.gkehub.v1.ListBoundMembershipsResponse} message ListBoundMembershipsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListBoundMembershipsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.memberships = []; + object.unreachable = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.memberships && message.memberships.length) { + object.memberships = []; + for (var j = 0; j < message.memberships.length; ++j) + object.memberships[j] = $root.google.cloud.gkehub.v1.Membership.toObject(message.memberships[j], options); + } + if (message.unreachable && message.unreachable.length) { + object.unreachable = []; + for (var j = 0; j < message.unreachable.length; ++j) + object.unreachable[j] = message.unreachable[j]; + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListBoundMembershipsResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsResponse + * @instance + * @returns {Object.} JSON object + */ + ListBoundMembershipsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListBoundMembershipsResponse + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListBoundMembershipsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListBoundMembershipsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListBoundMembershipsResponse"; + }; + + return ListBoundMembershipsResponse; + })(); + + v1.CreateMembershipRequest = (function() { + + /** + * Properties of a CreateMembershipRequest. + * @memberof google.cloud.gkehub.v1 + * @interface ICreateMembershipRequest + * @property {string|null} [parent] CreateMembershipRequest parent + * @property {string|null} [membershipId] CreateMembershipRequest membershipId + * @property {google.cloud.gkehub.v1.IMembership|null} [resource] CreateMembershipRequest resource + * @property {string|null} [requestId] CreateMembershipRequest requestId + */ + + /** + * Constructs a new CreateMembershipRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a CreateMembershipRequest. + * @implements ICreateMembershipRequest + * @constructor + * @param {google.cloud.gkehub.v1.ICreateMembershipRequest=} [properties] Properties to set + */ + function CreateMembershipRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateMembershipRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @instance + */ + CreateMembershipRequest.prototype.parent = ""; + + /** + * CreateMembershipRequest membershipId. + * @member {string} membershipId + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @instance + */ + CreateMembershipRequest.prototype.membershipId = ""; + + /** + * CreateMembershipRequest resource. + * @member {google.cloud.gkehub.v1.IMembership|null|undefined} resource + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @instance + */ + CreateMembershipRequest.prototype.resource = null; + + /** + * CreateMembershipRequest requestId. + * @member {string} requestId + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @instance + */ + CreateMembershipRequest.prototype.requestId = ""; + + /** + * Creates a new CreateMembershipRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateMembershipRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.CreateMembershipRequest} CreateMembershipRequest instance + */ + CreateMembershipRequest.create = function create(properties) { + return new CreateMembershipRequest(properties); + }; + + /** + * Encodes the specified CreateMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateMembershipRequest} message CreateMembershipRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMembershipRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.membershipId != null && Object.hasOwnProperty.call(message, "membershipId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.membershipId); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.gkehub.v1.Membership.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateMembershipRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateMembershipRequest} message CreateMembershipRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMembershipRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateMembershipRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.CreateMembershipRequest} CreateMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMembershipRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.CreateMembershipRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.membershipId = reader.string(); + break; + } + case 3: { + message.resource = $root.google.cloud.gkehub.v1.Membership.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateMembershipRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.CreateMembershipRequest} CreateMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMembershipRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateMembershipRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateMembershipRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.membershipId != null && message.hasOwnProperty("membershipId")) + if (!$util.isString(message.membershipId)) + return "membershipId: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.gkehub.v1.Membership.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateMembershipRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.CreateMembershipRequest} CreateMembershipRequest + */ + CreateMembershipRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.CreateMembershipRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.CreateMembershipRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.membershipId != null) + message.membershipId = String(object.membershipId); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.gkehub.v1.CreateMembershipRequest.resource: object expected"); + message.resource = $root.google.cloud.gkehub.v1.Membership.fromObject(object.resource); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateMembershipRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.CreateMembershipRequest} message CreateMembershipRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateMembershipRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.membershipId = ""; + object.resource = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.membershipId != null && message.hasOwnProperty("membershipId")) + object.membershipId = message.membershipId; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.gkehub.v1.Membership.toObject(message.resource, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateMembershipRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @instance + * @returns {Object.} JSON object + */ + CreateMembershipRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateMembershipRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.CreateMembershipRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateMembershipRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.CreateMembershipRequest"; + }; + + return CreateMembershipRequest; + })(); + + v1.DeleteMembershipRequest = (function() { + + /** + * Properties of a DeleteMembershipRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IDeleteMembershipRequest + * @property {string|null} [name] DeleteMembershipRequest name + * @property {string|null} [requestId] DeleteMembershipRequest requestId + * @property {boolean|null} [force] DeleteMembershipRequest force + */ + + /** + * Constructs a new DeleteMembershipRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a DeleteMembershipRequest. + * @implements IDeleteMembershipRequest + * @constructor + * @param {google.cloud.gkehub.v1.IDeleteMembershipRequest=} [properties] Properties to set + */ + function DeleteMembershipRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteMembershipRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @instance + */ + DeleteMembershipRequest.prototype.name = ""; + + /** + * DeleteMembershipRequest requestId. + * @member {string} requestId + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @instance + */ + DeleteMembershipRequest.prototype.requestId = ""; + + /** + * DeleteMembershipRequest force. + * @member {boolean} force + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @instance + */ + DeleteMembershipRequest.prototype.force = false; + + /** + * Creates a new DeleteMembershipRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteMembershipRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.DeleteMembershipRequest} DeleteMembershipRequest instance + */ + DeleteMembershipRequest.create = function create(properties) { + return new DeleteMembershipRequest(properties); + }; + + /** + * Encodes the specified DeleteMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteMembershipRequest} message DeleteMembershipRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMembershipRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.requestId); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.force); + return writer; + }; + + /** + * Encodes the specified DeleteMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteMembershipRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteMembershipRequest} message DeleteMembershipRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMembershipRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteMembershipRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.DeleteMembershipRequest} DeleteMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMembershipRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.DeleteMembershipRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.requestId = reader.string(); + break; + } + case 3: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteMembershipRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.DeleteMembershipRequest} DeleteMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMembershipRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteMembershipRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteMembershipRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a DeleteMembershipRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.DeleteMembershipRequest} DeleteMembershipRequest + */ + DeleteMembershipRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.DeleteMembershipRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.DeleteMembershipRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a DeleteMembershipRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.DeleteMembershipRequest} message DeleteMembershipRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteMembershipRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.requestId = ""; + object.force = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this DeleteMembershipRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteMembershipRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteMembershipRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.DeleteMembershipRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteMembershipRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.DeleteMembershipRequest"; + }; + + return DeleteMembershipRequest; + })(); + + v1.UpdateMembershipRequest = (function() { + + /** + * Properties of an UpdateMembershipRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IUpdateMembershipRequest + * @property {string|null} [name] UpdateMembershipRequest name + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateMembershipRequest updateMask + * @property {google.cloud.gkehub.v1.IMembership|null} [resource] UpdateMembershipRequest resource + * @property {string|null} [requestId] UpdateMembershipRequest requestId + */ + + /** + * Constructs a new UpdateMembershipRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents an UpdateMembershipRequest. + * @implements IUpdateMembershipRequest + * @constructor + * @param {google.cloud.gkehub.v1.IUpdateMembershipRequest=} [properties] Properties to set + */ + function UpdateMembershipRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateMembershipRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @instance + */ + UpdateMembershipRequest.prototype.name = ""; + + /** + * UpdateMembershipRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @instance + */ + UpdateMembershipRequest.prototype.updateMask = null; + + /** + * UpdateMembershipRequest resource. + * @member {google.cloud.gkehub.v1.IMembership|null|undefined} resource + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @instance + */ + UpdateMembershipRequest.prototype.resource = null; + + /** + * UpdateMembershipRequest requestId. + * @member {string} requestId + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @instance + */ + UpdateMembershipRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateMembershipRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateMembershipRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.UpdateMembershipRequest} UpdateMembershipRequest instance + */ + UpdateMembershipRequest.create = function create(properties) { + return new UpdateMembershipRequest(properties); + }; + + /** + * Encodes the specified UpdateMembershipRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateMembershipRequest} message UpdateMembershipRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMembershipRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.gkehub.v1.Membership.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateMembershipRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateMembershipRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateMembershipRequest} message UpdateMembershipRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateMembershipRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateMembershipRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.UpdateMembershipRequest} UpdateMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMembershipRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.UpdateMembershipRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.resource = $root.google.cloud.gkehub.v1.Membership.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateMembershipRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.UpdateMembershipRequest} UpdateMembershipRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateMembershipRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateMembershipRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateMembershipRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.gkehub.v1.Membership.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateMembershipRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.UpdateMembershipRequest} UpdateMembershipRequest + */ + UpdateMembershipRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.UpdateMembershipRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.UpdateMembershipRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateMembershipRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateMembershipRequest.resource: object expected"); + message.resource = $root.google.cloud.gkehub.v1.Membership.fromObject(object.resource); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateMembershipRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @static + * @param {google.cloud.gkehub.v1.UpdateMembershipRequest} message UpdateMembershipRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateMembershipRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.updateMask = null; + object.resource = null; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.gkehub.v1.Membership.toObject(message.resource, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateMembershipRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateMembershipRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateMembershipRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.UpdateMembershipRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateMembershipRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.UpdateMembershipRequest"; + }; + + return UpdateMembershipRequest; + })(); + + v1.GenerateConnectManifestRequest = (function() { + + /** + * Properties of a GenerateConnectManifestRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IGenerateConnectManifestRequest + * @property {string|null} [name] GenerateConnectManifestRequest name + * @property {string|null} [namespace] GenerateConnectManifestRequest namespace + * @property {Uint8Array|null} [proxy] GenerateConnectManifestRequest proxy + * @property {string|null} [version] GenerateConnectManifestRequest version + * @property {boolean|null} [isUpgrade] GenerateConnectManifestRequest isUpgrade + * @property {string|null} [registry] GenerateConnectManifestRequest registry + * @property {Uint8Array|null} [imagePullSecretContent] GenerateConnectManifestRequest imagePullSecretContent + */ + + /** + * Constructs a new GenerateConnectManifestRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a GenerateConnectManifestRequest. + * @implements IGenerateConnectManifestRequest + * @constructor + * @param {google.cloud.gkehub.v1.IGenerateConnectManifestRequest=} [properties] Properties to set + */ + function GenerateConnectManifestRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateConnectManifestRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @instance + */ + GenerateConnectManifestRequest.prototype.name = ""; + + /** + * GenerateConnectManifestRequest namespace. + * @member {string} namespace + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @instance + */ + GenerateConnectManifestRequest.prototype.namespace = ""; + + /** + * GenerateConnectManifestRequest proxy. + * @member {Uint8Array} proxy + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @instance + */ + GenerateConnectManifestRequest.prototype.proxy = $util.newBuffer([]); + + /** + * GenerateConnectManifestRequest version. + * @member {string} version + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @instance + */ + GenerateConnectManifestRequest.prototype.version = ""; + + /** + * GenerateConnectManifestRequest isUpgrade. + * @member {boolean} isUpgrade + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @instance + */ + GenerateConnectManifestRequest.prototype.isUpgrade = false; + + /** + * GenerateConnectManifestRequest registry. + * @member {string} registry + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @instance + */ + GenerateConnectManifestRequest.prototype.registry = ""; + + /** + * GenerateConnectManifestRequest imagePullSecretContent. + * @member {Uint8Array} imagePullSecretContent + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @instance + */ + GenerateConnectManifestRequest.prototype.imagePullSecretContent = $util.newBuffer([]); + + /** + * Creates a new GenerateConnectManifestRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @static + * @param {google.cloud.gkehub.v1.IGenerateConnectManifestRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.GenerateConnectManifestRequest} GenerateConnectManifestRequest instance + */ + GenerateConnectManifestRequest.create = function create(properties) { + return new GenerateConnectManifestRequest(properties); + }; + + /** + * Encodes the specified GenerateConnectManifestRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @static + * @param {google.cloud.gkehub.v1.IGenerateConnectManifestRequest} message GenerateConnectManifestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateConnectManifestRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.namespace != null && Object.hasOwnProperty.call(message, "namespace")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.namespace); + if (message.proxy != null && Object.hasOwnProperty.call(message, "proxy")) + writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.proxy); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.version); + if (message.isUpgrade != null && Object.hasOwnProperty.call(message, "isUpgrade")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.isUpgrade); + if (message.registry != null && Object.hasOwnProperty.call(message, "registry")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.registry); + if (message.imagePullSecretContent != null && Object.hasOwnProperty.call(message, "imagePullSecretContent")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.imagePullSecretContent); + return writer; + }; + + /** + * Encodes the specified GenerateConnectManifestRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @static + * @param {google.cloud.gkehub.v1.IGenerateConnectManifestRequest} message GenerateConnectManifestRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateConnectManifestRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateConnectManifestRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.GenerateConnectManifestRequest} GenerateConnectManifestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateConnectManifestRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GenerateConnectManifestRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.namespace = reader.string(); + break; + } + case 3: { + message.proxy = reader.bytes(); + break; + } + case 4: { + message.version = reader.string(); + break; + } + case 5: { + message.isUpgrade = reader.bool(); + break; + } + case 6: { + message.registry = reader.string(); + break; + } + case 7: { + message.imagePullSecretContent = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateConnectManifestRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.GenerateConnectManifestRequest} GenerateConnectManifestRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateConnectManifestRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateConnectManifestRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateConnectManifestRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.namespace != null && message.hasOwnProperty("namespace")) + if (!$util.isString(message.namespace)) + return "namespace: string expected"; + if (message.proxy != null && message.hasOwnProperty("proxy")) + if (!(message.proxy && typeof message.proxy.length === "number" || $util.isString(message.proxy))) + return "proxy: buffer expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.isUpgrade != null && message.hasOwnProperty("isUpgrade")) + if (typeof message.isUpgrade !== "boolean") + return "isUpgrade: boolean expected"; + if (message.registry != null && message.hasOwnProperty("registry")) + if (!$util.isString(message.registry)) + return "registry: string expected"; + if (message.imagePullSecretContent != null && message.hasOwnProperty("imagePullSecretContent")) + if (!(message.imagePullSecretContent && typeof message.imagePullSecretContent.length === "number" || $util.isString(message.imagePullSecretContent))) + return "imagePullSecretContent: buffer expected"; + return null; + }; + + /** + * Creates a GenerateConnectManifestRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.GenerateConnectManifestRequest} GenerateConnectManifestRequest + */ + GenerateConnectManifestRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.GenerateConnectManifestRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.GenerateConnectManifestRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.namespace != null) + message.namespace = String(object.namespace); + if (object.proxy != null) + if (typeof object.proxy === "string") + $util.base64.decode(object.proxy, message.proxy = $util.newBuffer($util.base64.length(object.proxy)), 0); + else if (object.proxy.length >= 0) + message.proxy = object.proxy; + if (object.version != null) + message.version = String(object.version); + if (object.isUpgrade != null) + message.isUpgrade = Boolean(object.isUpgrade); + if (object.registry != null) + message.registry = String(object.registry); + if (object.imagePullSecretContent != null) + if (typeof object.imagePullSecretContent === "string") + $util.base64.decode(object.imagePullSecretContent, message.imagePullSecretContent = $util.newBuffer($util.base64.length(object.imagePullSecretContent)), 0); + else if (object.imagePullSecretContent.length >= 0) + message.imagePullSecretContent = object.imagePullSecretContent; + return message; + }; + + /** + * Creates a plain object from a GenerateConnectManifestRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @static + * @param {google.cloud.gkehub.v1.GenerateConnectManifestRequest} message GenerateConnectManifestRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateConnectManifestRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.namespace = ""; + if (options.bytes === String) + object.proxy = ""; + else { + object.proxy = []; + if (options.bytes !== Array) + object.proxy = $util.newBuffer(object.proxy); + } + object.version = ""; + object.isUpgrade = false; + object.registry = ""; + if (options.bytes === String) + object.imagePullSecretContent = ""; + else { + object.imagePullSecretContent = []; + if (options.bytes !== Array) + object.imagePullSecretContent = $util.newBuffer(object.imagePullSecretContent); + } + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.namespace != null && message.hasOwnProperty("namespace")) + object.namespace = message.namespace; + if (message.proxy != null && message.hasOwnProperty("proxy")) + object.proxy = options.bytes === String ? $util.base64.encode(message.proxy, 0, message.proxy.length) : options.bytes === Array ? Array.prototype.slice.call(message.proxy) : message.proxy; + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.isUpgrade != null && message.hasOwnProperty("isUpgrade")) + object.isUpgrade = message.isUpgrade; + if (message.registry != null && message.hasOwnProperty("registry")) + object.registry = message.registry; + if (message.imagePullSecretContent != null && message.hasOwnProperty("imagePullSecretContent")) + object.imagePullSecretContent = options.bytes === String ? $util.base64.encode(message.imagePullSecretContent, 0, message.imagePullSecretContent.length) : options.bytes === Array ? Array.prototype.slice.call(message.imagePullSecretContent) : message.imagePullSecretContent; + return object; + }; + + /** + * Converts this GenerateConnectManifestRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @instance + * @returns {Object.} JSON object + */ + GenerateConnectManifestRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateConnectManifestRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateConnectManifestRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.GenerateConnectManifestRequest"; + }; + + return GenerateConnectManifestRequest; + })(); + + v1.GenerateConnectManifestResponse = (function() { + + /** + * Properties of a GenerateConnectManifestResponse. + * @memberof google.cloud.gkehub.v1 + * @interface IGenerateConnectManifestResponse + * @property {Array.|null} [manifest] GenerateConnectManifestResponse manifest + */ + + /** + * Constructs a new GenerateConnectManifestResponse. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a GenerateConnectManifestResponse. + * @implements IGenerateConnectManifestResponse + * @constructor + * @param {google.cloud.gkehub.v1.IGenerateConnectManifestResponse=} [properties] Properties to set + */ + function GenerateConnectManifestResponse(properties) { + this.manifest = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GenerateConnectManifestResponse manifest. + * @member {Array.} manifest + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @instance + */ + GenerateConnectManifestResponse.prototype.manifest = $util.emptyArray; + + /** + * Creates a new GenerateConnectManifestResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @static + * @param {google.cloud.gkehub.v1.IGenerateConnectManifestResponse=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.GenerateConnectManifestResponse} GenerateConnectManifestResponse instance + */ + GenerateConnectManifestResponse.create = function create(properties) { + return new GenerateConnectManifestResponse(properties); + }; + + /** + * Encodes the specified GenerateConnectManifestResponse message. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @static + * @param {google.cloud.gkehub.v1.IGenerateConnectManifestResponse} message GenerateConnectManifestResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateConnectManifestResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.manifest != null && message.manifest.length) + for (var i = 0; i < message.manifest.length; ++i) + $root.google.cloud.gkehub.v1.ConnectAgentResource.encode(message.manifest[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GenerateConnectManifestResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GenerateConnectManifestResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @static + * @param {google.cloud.gkehub.v1.IGenerateConnectManifestResponse} message GenerateConnectManifestResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GenerateConnectManifestResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GenerateConnectManifestResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.GenerateConnectManifestResponse} GenerateConnectManifestResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateConnectManifestResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GenerateConnectManifestResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.manifest && message.manifest.length)) + message.manifest = []; + message.manifest.push($root.google.cloud.gkehub.v1.ConnectAgentResource.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GenerateConnectManifestResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.GenerateConnectManifestResponse} GenerateConnectManifestResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GenerateConnectManifestResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GenerateConnectManifestResponse message. + * @function verify + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GenerateConnectManifestResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.manifest != null && message.hasOwnProperty("manifest")) { + if (!Array.isArray(message.manifest)) + return "manifest: array expected"; + for (var i = 0; i < message.manifest.length; ++i) { + var error = $root.google.cloud.gkehub.v1.ConnectAgentResource.verify(message.manifest[i]); + if (error) + return "manifest." + error; + } + } + return null; + }; + + /** + * Creates a GenerateConnectManifestResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.GenerateConnectManifestResponse} GenerateConnectManifestResponse + */ + GenerateConnectManifestResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.GenerateConnectManifestResponse) + return object; + var message = new $root.google.cloud.gkehub.v1.GenerateConnectManifestResponse(); + if (object.manifest) { + if (!Array.isArray(object.manifest)) + throw TypeError(".google.cloud.gkehub.v1.GenerateConnectManifestResponse.manifest: array expected"); + message.manifest = []; + for (var i = 0; i < object.manifest.length; ++i) { + if (typeof object.manifest[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.GenerateConnectManifestResponse.manifest: object expected"); + message.manifest[i] = $root.google.cloud.gkehub.v1.ConnectAgentResource.fromObject(object.manifest[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GenerateConnectManifestResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @static + * @param {google.cloud.gkehub.v1.GenerateConnectManifestResponse} message GenerateConnectManifestResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GenerateConnectManifestResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.manifest = []; + if (message.manifest && message.manifest.length) { + object.manifest = []; + for (var j = 0; j < message.manifest.length; ++j) + object.manifest[j] = $root.google.cloud.gkehub.v1.ConnectAgentResource.toObject(message.manifest[j], options); + } + return object; + }; + + /** + * Converts this GenerateConnectManifestResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @instance + * @returns {Object.} JSON object + */ + GenerateConnectManifestResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GenerateConnectManifestResponse + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.GenerateConnectManifestResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GenerateConnectManifestResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.GenerateConnectManifestResponse"; + }; + + return GenerateConnectManifestResponse; + })(); + + v1.ConnectAgentResource = (function() { + + /** + * Properties of a ConnectAgentResource. + * @memberof google.cloud.gkehub.v1 + * @interface IConnectAgentResource + * @property {google.cloud.gkehub.v1.ITypeMeta|null} [type] ConnectAgentResource type + * @property {string|null} [manifest] ConnectAgentResource manifest + */ + + /** + * Constructs a new ConnectAgentResource. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ConnectAgentResource. + * @implements IConnectAgentResource + * @constructor + * @param {google.cloud.gkehub.v1.IConnectAgentResource=} [properties] Properties to set + */ + function ConnectAgentResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConnectAgentResource type. + * @member {google.cloud.gkehub.v1.ITypeMeta|null|undefined} type + * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @instance + */ + ConnectAgentResource.prototype.type = null; + + /** + * ConnectAgentResource manifest. + * @member {string} manifest + * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @instance + */ + ConnectAgentResource.prototype.manifest = ""; + + /** + * Creates a new ConnectAgentResource instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @static + * @param {google.cloud.gkehub.v1.IConnectAgentResource=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ConnectAgentResource} ConnectAgentResource instance + */ + ConnectAgentResource.create = function create(properties) { + return new ConnectAgentResource(properties); + }; + + /** + * Encodes the specified ConnectAgentResource message. Does not implicitly {@link google.cloud.gkehub.v1.ConnectAgentResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @static + * @param {google.cloud.gkehub.v1.IConnectAgentResource} message ConnectAgentResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectAgentResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + $root.google.cloud.gkehub.v1.TypeMeta.encode(message.type, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.manifest != null && Object.hasOwnProperty.call(message, "manifest")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.manifest); + return writer; + }; + + /** + * Encodes the specified ConnectAgentResource message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ConnectAgentResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @static + * @param {google.cloud.gkehub.v1.IConnectAgentResource} message ConnectAgentResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConnectAgentResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConnectAgentResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ConnectAgentResource} ConnectAgentResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectAgentResource.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ConnectAgentResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = $root.google.cloud.gkehub.v1.TypeMeta.decode(reader, reader.uint32()); + break; + } + case 2: { + message.manifest = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConnectAgentResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ConnectAgentResource} ConnectAgentResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConnectAgentResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConnectAgentResource message. + * @function verify + * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConnectAgentResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) { + var error = $root.google.cloud.gkehub.v1.TypeMeta.verify(message.type); + if (error) + return "type." + error; + } + if (message.manifest != null && message.hasOwnProperty("manifest")) + if (!$util.isString(message.manifest)) + return "manifest: string expected"; + return null; + }; + + /** + * Creates a ConnectAgentResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ConnectAgentResource} ConnectAgentResource + */ + ConnectAgentResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ConnectAgentResource) + return object; + var message = new $root.google.cloud.gkehub.v1.ConnectAgentResource(); + if (object.type != null) { + if (typeof object.type !== "object") + throw TypeError(".google.cloud.gkehub.v1.ConnectAgentResource.type: object expected"); + message.type = $root.google.cloud.gkehub.v1.TypeMeta.fromObject(object.type); + } + if (object.manifest != null) + message.manifest = String(object.manifest); + return message; + }; + + /** + * Creates a plain object from a ConnectAgentResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @static + * @param {google.cloud.gkehub.v1.ConnectAgentResource} message ConnectAgentResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConnectAgentResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = null; + object.manifest = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = $root.google.cloud.gkehub.v1.TypeMeta.toObject(message.type, options); + if (message.manifest != null && message.hasOwnProperty("manifest")) + object.manifest = message.manifest; + return object; + }; + + /** + * Converts this ConnectAgentResource to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @instance + * @returns {Object.} JSON object + */ + ConnectAgentResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConnectAgentResource + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ConnectAgentResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConnectAgentResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ConnectAgentResource"; + }; + + return ConnectAgentResource; + })(); + + v1.TypeMeta = (function() { + + /** + * Properties of a TypeMeta. + * @memberof google.cloud.gkehub.v1 + * @interface ITypeMeta + * @property {string|null} [kind] TypeMeta kind + * @property {string|null} [apiVersion] TypeMeta apiVersion + */ + + /** + * Constructs a new TypeMeta. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a TypeMeta. + * @implements ITypeMeta + * @constructor + * @param {google.cloud.gkehub.v1.ITypeMeta=} [properties] Properties to set + */ + function TypeMeta(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TypeMeta kind. + * @member {string} kind + * @memberof google.cloud.gkehub.v1.TypeMeta + * @instance + */ + TypeMeta.prototype.kind = ""; + + /** + * TypeMeta apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.gkehub.v1.TypeMeta + * @instance + */ + TypeMeta.prototype.apiVersion = ""; + + /** + * Creates a new TypeMeta instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.TypeMeta + * @static + * @param {google.cloud.gkehub.v1.ITypeMeta=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.TypeMeta} TypeMeta instance + */ + TypeMeta.create = function create(properties) { + return new TypeMeta(properties); + }; + + /** + * Encodes the specified TypeMeta message. Does not implicitly {@link google.cloud.gkehub.v1.TypeMeta.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.TypeMeta + * @static + * @param {google.cloud.gkehub.v1.ITypeMeta} message TypeMeta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypeMeta.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified TypeMeta message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.TypeMeta.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.TypeMeta + * @static + * @param {google.cloud.gkehub.v1.ITypeMeta} message TypeMeta message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypeMeta.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TypeMeta message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.TypeMeta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.TypeMeta} TypeMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypeMeta.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.TypeMeta(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.apiVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TypeMeta message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.TypeMeta + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.TypeMeta} TypeMeta + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TypeMeta.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TypeMeta message. + * @function verify + * @memberof google.cloud.gkehub.v1.TypeMeta + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TypeMeta.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; + return null; + }; + + /** + * Creates a TypeMeta message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.TypeMeta + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.TypeMeta} TypeMeta + */ + TypeMeta.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.TypeMeta) + return object; + var message = new $root.google.cloud.gkehub.v1.TypeMeta(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from a TypeMeta message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.TypeMeta + * @static + * @param {google.cloud.gkehub.v1.TypeMeta} message TypeMeta + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TypeMeta.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.apiVersion = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this TypeMeta to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.TypeMeta + * @instance + * @returns {Object.} JSON object + */ + TypeMeta.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TypeMeta + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.TypeMeta + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TypeMeta.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.TypeMeta"; + }; + + return TypeMeta; + })(); + + v1.ListFeaturesRequest = (function() { + + /** + * Properties of a ListFeaturesRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IListFeaturesRequest + * @property {string|null} [parent] ListFeaturesRequest parent + * @property {number|null} [pageSize] ListFeaturesRequest pageSize + * @property {string|null} [pageToken] ListFeaturesRequest pageToken + * @property {string|null} [filter] ListFeaturesRequest filter + * @property {string|null} [orderBy] ListFeaturesRequest orderBy + * @property {boolean|null} [returnPartialSuccess] ListFeaturesRequest returnPartialSuccess + */ + + /** + * Constructs a new ListFeaturesRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListFeaturesRequest. + * @implements IListFeaturesRequest + * @constructor + * @param {google.cloud.gkehub.v1.IListFeaturesRequest=} [properties] Properties to set + */ + function ListFeaturesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFeaturesRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @instance + */ + ListFeaturesRequest.prototype.parent = ""; + + /** + * ListFeaturesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @instance + */ + ListFeaturesRequest.prototype.pageSize = 0; + + /** + * ListFeaturesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @instance + */ + ListFeaturesRequest.prototype.pageToken = ""; + + /** + * ListFeaturesRequest filter. + * @member {string} filter + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @instance + */ + ListFeaturesRequest.prototype.filter = ""; + + /** + * ListFeaturesRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @instance + */ + ListFeaturesRequest.prototype.orderBy = ""; + + /** + * ListFeaturesRequest returnPartialSuccess. + * @member {boolean} returnPartialSuccess + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @instance + */ + ListFeaturesRequest.prototype.returnPartialSuccess = false; + + /** + * Creates a new ListFeaturesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @static + * @param {google.cloud.gkehub.v1.IListFeaturesRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListFeaturesRequest} ListFeaturesRequest instance + */ + ListFeaturesRequest.create = function create(properties) { + return new ListFeaturesRequest(properties); + }; + + /** + * Encodes the specified ListFeaturesRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @static + * @param {google.cloud.gkehub.v1.IListFeaturesRequest} message ListFeaturesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFeaturesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.orderBy); + if (message.returnPartialSuccess != null && Object.hasOwnProperty.call(message, "returnPartialSuccess")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.returnPartialSuccess); + return writer; + }; + + /** + * Encodes the specified ListFeaturesRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @static + * @param {google.cloud.gkehub.v1.IListFeaturesRequest} message ListFeaturesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFeaturesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFeaturesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListFeaturesRequest} ListFeaturesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFeaturesRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListFeaturesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + case 5: { + message.orderBy = reader.string(); + break; + } + case 6: { + message.returnPartialSuccess = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFeaturesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListFeaturesRequest} ListFeaturesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFeaturesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFeaturesRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFeaturesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; + if (message.returnPartialSuccess != null && message.hasOwnProperty("returnPartialSuccess")) + if (typeof message.returnPartialSuccess !== "boolean") + return "returnPartialSuccess: boolean expected"; + return null; + }; + + /** + * Creates a ListFeaturesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListFeaturesRequest} ListFeaturesRequest + */ + ListFeaturesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListFeaturesRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.ListFeaturesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); + if (object.returnPartialSuccess != null) + message.returnPartialSuccess = Boolean(object.returnPartialSuccess); + return message; + }; + + /** + * Creates a plain object from a ListFeaturesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @static + * @param {google.cloud.gkehub.v1.ListFeaturesRequest} message ListFeaturesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFeaturesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + object.orderBy = ""; + object.returnPartialSuccess = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; + if (message.returnPartialSuccess != null && message.hasOwnProperty("returnPartialSuccess")) + object.returnPartialSuccess = message.returnPartialSuccess; + return object; + }; + + /** + * Converts this ListFeaturesRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @instance + * @returns {Object.} JSON object + */ + ListFeaturesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFeaturesRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListFeaturesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFeaturesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListFeaturesRequest"; + }; + + return ListFeaturesRequest; + })(); + + v1.ListFeaturesResponse = (function() { + + /** + * Properties of a ListFeaturesResponse. + * @memberof google.cloud.gkehub.v1 + * @interface IListFeaturesResponse + * @property {Array.|null} [resources] ListFeaturesResponse resources + * @property {string|null} [nextPageToken] ListFeaturesResponse nextPageToken + */ + + /** + * Constructs a new ListFeaturesResponse. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListFeaturesResponse. + * @implements IListFeaturesResponse + * @constructor + * @param {google.cloud.gkehub.v1.IListFeaturesResponse=} [properties] Properties to set + */ + function ListFeaturesResponse(properties) { + this.resources = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFeaturesResponse resources. + * @member {Array.} resources + * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @instance + */ + ListFeaturesResponse.prototype.resources = $util.emptyArray; + + /** + * ListFeaturesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @instance + */ + ListFeaturesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFeaturesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @static + * @param {google.cloud.gkehub.v1.IListFeaturesResponse=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListFeaturesResponse} ListFeaturesResponse instance + */ + ListFeaturesResponse.create = function create(properties) { + return new ListFeaturesResponse(properties); + }; + + /** + * Encodes the specified ListFeaturesResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @static + * @param {google.cloud.gkehub.v1.IListFeaturesResponse} message ListFeaturesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFeaturesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resources != null && message.resources.length) + for (var i = 0; i < message.resources.length; ++i) + $root.google.cloud.gkehub.v1.Feature.encode(message.resources[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListFeaturesResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListFeaturesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @static + * @param {google.cloud.gkehub.v1.IListFeaturesResponse} message ListFeaturesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFeaturesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFeaturesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListFeaturesResponse} ListFeaturesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFeaturesResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListFeaturesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.resources && message.resources.length)) + message.resources = []; + message.resources.push($root.google.cloud.gkehub.v1.Feature.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFeaturesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListFeaturesResponse} ListFeaturesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFeaturesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFeaturesResponse message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFeaturesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resources != null && message.hasOwnProperty("resources")) { + if (!Array.isArray(message.resources)) + return "resources: array expected"; + for (var i = 0; i < message.resources.length; ++i) { + var error = $root.google.cloud.gkehub.v1.Feature.verify(message.resources[i]); + if (error) + return "resources." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListFeaturesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListFeaturesResponse} ListFeaturesResponse + */ + ListFeaturesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListFeaturesResponse) + return object; + var message = new $root.google.cloud.gkehub.v1.ListFeaturesResponse(); + if (object.resources) { + if (!Array.isArray(object.resources)) + throw TypeError(".google.cloud.gkehub.v1.ListFeaturesResponse.resources: array expected"); + message.resources = []; + for (var i = 0; i < object.resources.length; ++i) { + if (typeof object.resources[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.ListFeaturesResponse.resources: object expected"); + message.resources[i] = $root.google.cloud.gkehub.v1.Feature.fromObject(object.resources[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFeaturesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @static + * @param {google.cloud.gkehub.v1.ListFeaturesResponse} message ListFeaturesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFeaturesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.resources = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.resources && message.resources.length) { + object.resources = []; + for (var j = 0; j < message.resources.length; ++j) + object.resources[j] = $root.google.cloud.gkehub.v1.Feature.toObject(message.resources[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFeaturesResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @instance + * @returns {Object.} JSON object + */ + ListFeaturesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFeaturesResponse + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListFeaturesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFeaturesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListFeaturesResponse"; + }; + + return ListFeaturesResponse; + })(); + + v1.GetFeatureRequest = (function() { + + /** + * Properties of a GetFeatureRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IGetFeatureRequest + * @property {string|null} [name] GetFeatureRequest name + * @property {boolean|null} [returnPartialSuccess] GetFeatureRequest returnPartialSuccess + */ + + /** + * Constructs a new GetFeatureRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a GetFeatureRequest. + * @implements IGetFeatureRequest + * @constructor + * @param {google.cloud.gkehub.v1.IGetFeatureRequest=} [properties] Properties to set + */ + function GetFeatureRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetFeatureRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @instance + */ + GetFeatureRequest.prototype.name = ""; + + /** + * GetFeatureRequest returnPartialSuccess. + * @member {boolean} returnPartialSuccess + * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @instance + */ + GetFeatureRequest.prototype.returnPartialSuccess = false; + + /** + * Creates a new GetFeatureRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.IGetFeatureRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.GetFeatureRequest} GetFeatureRequest instance + */ + GetFeatureRequest.create = function create(properties) { + return new GetFeatureRequest(properties); + }; + + /** + * Encodes the specified GetFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetFeatureRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.IGetFeatureRequest} message GetFeatureRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFeatureRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.returnPartialSuccess != null && Object.hasOwnProperty.call(message, "returnPartialSuccess")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.returnPartialSuccess); + return writer; + }; + + /** + * Encodes the specified GetFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetFeatureRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.IGetFeatureRequest} message GetFeatureRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFeatureRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetFeatureRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.GetFeatureRequest} GetFeatureRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFeatureRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GetFeatureRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.returnPartialSuccess = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetFeatureRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.GetFeatureRequest} GetFeatureRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFeatureRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetFeatureRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFeatureRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.returnPartialSuccess != null && message.hasOwnProperty("returnPartialSuccess")) + if (typeof message.returnPartialSuccess !== "boolean") + return "returnPartialSuccess: boolean expected"; + return null; + }; + + /** + * Creates a GetFeatureRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.GetFeatureRequest} GetFeatureRequest + */ + GetFeatureRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.GetFeatureRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.GetFeatureRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.returnPartialSuccess != null) + message.returnPartialSuccess = Boolean(object.returnPartialSuccess); + return message; + }; + + /** + * Creates a plain object from a GetFeatureRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.GetFeatureRequest} message GetFeatureRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFeatureRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.returnPartialSuccess = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.returnPartialSuccess != null && message.hasOwnProperty("returnPartialSuccess")) + object.returnPartialSuccess = message.returnPartialSuccess; + return object; + }; + + /** + * Converts this GetFeatureRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @instance + * @returns {Object.} JSON object + */ + GetFeatureRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetFeatureRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.GetFeatureRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFeatureRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.GetFeatureRequest"; + }; + + return GetFeatureRequest; + })(); + + v1.CreateFeatureRequest = (function() { + + /** + * Properties of a CreateFeatureRequest. + * @memberof google.cloud.gkehub.v1 + * @interface ICreateFeatureRequest + * @property {string|null} [parent] CreateFeatureRequest parent + * @property {string|null} [featureId] CreateFeatureRequest featureId + * @property {google.cloud.gkehub.v1.IFeature|null} [resource] CreateFeatureRequest resource + * @property {string|null} [requestId] CreateFeatureRequest requestId + */ + + /** + * Constructs a new CreateFeatureRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a CreateFeatureRequest. + * @implements ICreateFeatureRequest + * @constructor + * @param {google.cloud.gkehub.v1.ICreateFeatureRequest=} [properties] Properties to set + */ + function CreateFeatureRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateFeatureRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @instance + */ + CreateFeatureRequest.prototype.parent = ""; + + /** + * CreateFeatureRequest featureId. + * @member {string} featureId + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @instance + */ + CreateFeatureRequest.prototype.featureId = ""; + + /** + * CreateFeatureRequest resource. + * @member {google.cloud.gkehub.v1.IFeature|null|undefined} resource + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @instance + */ + CreateFeatureRequest.prototype.resource = null; + + /** + * CreateFeatureRequest requestId. + * @member {string} requestId + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @instance + */ + CreateFeatureRequest.prototype.requestId = ""; + + /** + * Creates a new CreateFeatureRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateFeatureRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.CreateFeatureRequest} CreateFeatureRequest instance + */ + CreateFeatureRequest.create = function create(properties) { + return new CreateFeatureRequest(properties); + }; + + /** + * Encodes the specified CreateFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateFeatureRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateFeatureRequest} message CreateFeatureRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFeatureRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.featureId != null && Object.hasOwnProperty.call(message, "featureId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.featureId); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.gkehub.v1.Feature.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified CreateFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateFeatureRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateFeatureRequest} message CreateFeatureRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFeatureRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateFeatureRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.CreateFeatureRequest} CreateFeatureRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFeatureRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.CreateFeatureRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.featureId = reader.string(); + break; + } + case 3: { + message.resource = $root.google.cloud.gkehub.v1.Feature.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateFeatureRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.CreateFeatureRequest} CreateFeatureRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFeatureRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateFeatureRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateFeatureRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.featureId != null && message.hasOwnProperty("featureId")) + if (!$util.isString(message.featureId)) + return "featureId: string expected"; + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.gkehub.v1.Feature.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a CreateFeatureRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.CreateFeatureRequest} CreateFeatureRequest + */ + CreateFeatureRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.CreateFeatureRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.CreateFeatureRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.featureId != null) + message.featureId = String(object.featureId); + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.gkehub.v1.CreateFeatureRequest.resource: object expected"); + message.resource = $root.google.cloud.gkehub.v1.Feature.fromObject(object.resource); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a CreateFeatureRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.CreateFeatureRequest} message CreateFeatureRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateFeatureRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.featureId = ""; + object.resource = null; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.featureId != null && message.hasOwnProperty("featureId")) + object.featureId = message.featureId; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.gkehub.v1.Feature.toObject(message.resource, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this CreateFeatureRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @instance + * @returns {Object.} JSON object + */ + CreateFeatureRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateFeatureRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.CreateFeatureRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateFeatureRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.CreateFeatureRequest"; + }; + + return CreateFeatureRequest; + })(); + + v1.DeleteFeatureRequest = (function() { + + /** + * Properties of a DeleteFeatureRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IDeleteFeatureRequest + * @property {string|null} [name] DeleteFeatureRequest name + * @property {boolean|null} [force] DeleteFeatureRequest force + * @property {string|null} [requestId] DeleteFeatureRequest requestId + */ + + /** + * Constructs a new DeleteFeatureRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a DeleteFeatureRequest. + * @implements IDeleteFeatureRequest + * @constructor + * @param {google.cloud.gkehub.v1.IDeleteFeatureRequest=} [properties] Properties to set + */ + function DeleteFeatureRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteFeatureRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @instance + */ + DeleteFeatureRequest.prototype.name = ""; + + /** + * DeleteFeatureRequest force. + * @member {boolean} force + * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @instance + */ + DeleteFeatureRequest.prototype.force = false; + + /** + * DeleteFeatureRequest requestId. + * @member {string} requestId + * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @instance + */ + DeleteFeatureRequest.prototype.requestId = ""; + + /** + * Creates a new DeleteFeatureRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteFeatureRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.DeleteFeatureRequest} DeleteFeatureRequest instance + */ + DeleteFeatureRequest.create = function create(properties) { + return new DeleteFeatureRequest(properties); + }; + + /** + * Encodes the specified DeleteFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteFeatureRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteFeatureRequest} message DeleteFeatureRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.force); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified DeleteFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteFeatureRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteFeatureRequest} message DeleteFeatureRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFeatureRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFeatureRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.DeleteFeatureRequest} DeleteFeatureRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.DeleteFeatureRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.force = reader.bool(); + break; + } + case 3: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFeatureRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.DeleteFeatureRequest} DeleteFeatureRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFeatureRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFeatureRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFeatureRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a DeleteFeatureRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.DeleteFeatureRequest} DeleteFeatureRequest + */ + DeleteFeatureRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.DeleteFeatureRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.DeleteFeatureRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.force != null) + message.force = Boolean(object.force); + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a DeleteFeatureRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.DeleteFeatureRequest} message DeleteFeatureRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFeatureRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.force = false; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this DeleteFeatureRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteFeatureRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFeatureRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.DeleteFeatureRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFeatureRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.DeleteFeatureRequest"; + }; + + return DeleteFeatureRequest; + })(); + + v1.UpdateFeatureRequest = (function() { + + /** + * Properties of an UpdateFeatureRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IUpdateFeatureRequest + * @property {string|null} [name] UpdateFeatureRequest name + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFeatureRequest updateMask + * @property {google.cloud.gkehub.v1.IFeature|null} [resource] UpdateFeatureRequest resource + * @property {string|null} [requestId] UpdateFeatureRequest requestId + */ + + /** + * Constructs a new UpdateFeatureRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents an UpdateFeatureRequest. + * @implements IUpdateFeatureRequest + * @constructor + * @param {google.cloud.gkehub.v1.IUpdateFeatureRequest=} [properties] Properties to set + */ + function UpdateFeatureRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateFeatureRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @instance + */ + UpdateFeatureRequest.prototype.name = ""; + + /** + * UpdateFeatureRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @instance + */ + UpdateFeatureRequest.prototype.updateMask = null; + + /** + * UpdateFeatureRequest resource. + * @member {google.cloud.gkehub.v1.IFeature|null|undefined} resource + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @instance + */ + UpdateFeatureRequest.prototype.resource = null; + + /** + * UpdateFeatureRequest requestId. + * @member {string} requestId + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @instance + */ + UpdateFeatureRequest.prototype.requestId = ""; + + /** + * Creates a new UpdateFeatureRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateFeatureRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.UpdateFeatureRequest} UpdateFeatureRequest instance + */ + UpdateFeatureRequest.create = function create(properties) { + return new UpdateFeatureRequest(properties); + }; + + /** + * Encodes the specified UpdateFeatureRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateFeatureRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateFeatureRequest} message UpdateFeatureRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeatureRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + $root.google.cloud.gkehub.v1.Feature.encode(message.resource, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.requestId); + return writer; + }; + + /** + * Encodes the specified UpdateFeatureRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateFeatureRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateFeatureRequest} message UpdateFeatureRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFeatureRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFeatureRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.UpdateFeatureRequest} UpdateFeatureRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeatureRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.UpdateFeatureRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.resource = $root.google.cloud.gkehub.v1.Feature.decode(reader, reader.uint32()); + break; + } + case 4: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateFeatureRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.UpdateFeatureRequest} UpdateFeatureRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFeatureRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFeatureRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFeatureRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.resource != null && message.hasOwnProperty("resource")) { + var error = $root.google.cloud.gkehub.v1.Feature.verify(message.resource); + if (error) + return "resource." + error; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates an UpdateFeatureRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.UpdateFeatureRequest} UpdateFeatureRequest + */ + UpdateFeatureRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.UpdateFeatureRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.UpdateFeatureRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateFeatureRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.resource != null) { + if (typeof object.resource !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateFeatureRequest.resource: object expected"); + message.resource = $root.google.cloud.gkehub.v1.Feature.fromObject(object.resource); + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from an UpdateFeatureRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @static + * @param {google.cloud.gkehub.v1.UpdateFeatureRequest} message UpdateFeatureRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFeatureRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.updateMask = null; + object.resource = null; + object.requestId = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = $root.google.cloud.gkehub.v1.Feature.toObject(message.resource, options); + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + return object; + }; + + /** + * Converts this UpdateFeatureRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateFeatureRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateFeatureRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.UpdateFeatureRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFeatureRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.UpdateFeatureRequest"; + }; + + return UpdateFeatureRequest; + })(); + + v1.CreateFleetRequest = (function() { + + /** + * Properties of a CreateFleetRequest. + * @memberof google.cloud.gkehub.v1 + * @interface ICreateFleetRequest + * @property {string|null} [parent] CreateFleetRequest parent + * @property {google.cloud.gkehub.v1.IFleet|null} [fleet] CreateFleetRequest fleet + */ + + /** + * Constructs a new CreateFleetRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a CreateFleetRequest. + * @implements ICreateFleetRequest + * @constructor + * @param {google.cloud.gkehub.v1.ICreateFleetRequest=} [properties] Properties to set + */ + function CreateFleetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateFleetRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.CreateFleetRequest + * @instance + */ + CreateFleetRequest.prototype.parent = ""; + + /** + * CreateFleetRequest fleet. + * @member {google.cloud.gkehub.v1.IFleet|null|undefined} fleet + * @memberof google.cloud.gkehub.v1.CreateFleetRequest + * @instance + */ + CreateFleetRequest.prototype.fleet = null; + + /** + * Creates a new CreateFleetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.CreateFleetRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateFleetRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.CreateFleetRequest} CreateFleetRequest instance + */ + CreateFleetRequest.create = function create(properties) { + return new CreateFleetRequest(properties); + }; + + /** + * Encodes the specified CreateFleetRequest message. Does not implicitly {@link google.cloud.gkehub.v1.CreateFleetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.CreateFleetRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateFleetRequest} message CreateFleetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFleetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.fleet != null && Object.hasOwnProperty.call(message, "fleet")) + $root.google.cloud.gkehub.v1.Fleet.encode(message.fleet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateFleetRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.CreateFleetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.CreateFleetRequest + * @static + * @param {google.cloud.gkehub.v1.ICreateFleetRequest} message CreateFleetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateFleetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateFleetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.CreateFleetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.CreateFleetRequest} CreateFleetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFleetRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.CreateFleetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.fleet = $root.google.cloud.gkehub.v1.Fleet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateFleetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.CreateFleetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.CreateFleetRequest} CreateFleetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateFleetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateFleetRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.CreateFleetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateFleetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.fleet != null && message.hasOwnProperty("fleet")) { + var error = $root.google.cloud.gkehub.v1.Fleet.verify(message.fleet); + if (error) + return "fleet." + error; + } + return null; + }; + + /** + * Creates a CreateFleetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.CreateFleetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.CreateFleetRequest} CreateFleetRequest + */ + CreateFleetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.CreateFleetRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.CreateFleetRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.fleet != null) { + if (typeof object.fleet !== "object") + throw TypeError(".google.cloud.gkehub.v1.CreateFleetRequest.fleet: object expected"); + message.fleet = $root.google.cloud.gkehub.v1.Fleet.fromObject(object.fleet); + } + return message; + }; + + /** + * Creates a plain object from a CreateFleetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.CreateFleetRequest + * @static + * @param {google.cloud.gkehub.v1.CreateFleetRequest} message CreateFleetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateFleetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.fleet = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.fleet != null && message.hasOwnProperty("fleet")) + object.fleet = $root.google.cloud.gkehub.v1.Fleet.toObject(message.fleet, options); + return object; + }; + + /** + * Converts this CreateFleetRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.CreateFleetRequest + * @instance + * @returns {Object.} JSON object + */ + CreateFleetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateFleetRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.CreateFleetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateFleetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.CreateFleetRequest"; + }; + + return CreateFleetRequest; + })(); + + v1.GetFleetRequest = (function() { + + /** + * Properties of a GetFleetRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IGetFleetRequest + * @property {string|null} [name] GetFleetRequest name + */ + + /** + * Constructs a new GetFleetRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a GetFleetRequest. + * @implements IGetFleetRequest + * @constructor + * @param {google.cloud.gkehub.v1.IGetFleetRequest=} [properties] Properties to set + */ + function GetFleetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetFleetRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.GetFleetRequest + * @instance + */ + GetFleetRequest.prototype.name = ""; + + /** + * Creates a new GetFleetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.GetFleetRequest + * @static + * @param {google.cloud.gkehub.v1.IGetFleetRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.GetFleetRequest} GetFleetRequest instance + */ + GetFleetRequest.create = function create(properties) { + return new GetFleetRequest(properties); + }; + + /** + * Encodes the specified GetFleetRequest message. Does not implicitly {@link google.cloud.gkehub.v1.GetFleetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.GetFleetRequest + * @static + * @param {google.cloud.gkehub.v1.IGetFleetRequest} message GetFleetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFleetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetFleetRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.GetFleetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.GetFleetRequest + * @static + * @param {google.cloud.gkehub.v1.IGetFleetRequest} message GetFleetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetFleetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetFleetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.GetFleetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.GetFleetRequest} GetFleetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFleetRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.GetFleetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetFleetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.GetFleetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.GetFleetRequest} GetFleetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetFleetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetFleetRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.GetFleetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetFleetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetFleetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.GetFleetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.GetFleetRequest} GetFleetRequest + */ + GetFleetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.GetFleetRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.GetFleetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetFleetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.GetFleetRequest + * @static + * @param {google.cloud.gkehub.v1.GetFleetRequest} message GetFleetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetFleetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetFleetRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.GetFleetRequest + * @instance + * @returns {Object.} JSON object + */ + GetFleetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetFleetRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.GetFleetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetFleetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.GetFleetRequest"; + }; + + return GetFleetRequest; + })(); + + v1.UpdateFleetRequest = (function() { + + /** + * Properties of an UpdateFleetRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IUpdateFleetRequest + * @property {google.cloud.gkehub.v1.IFleet|null} [fleet] UpdateFleetRequest fleet + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateFleetRequest updateMask + */ + + /** + * Constructs a new UpdateFleetRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents an UpdateFleetRequest. + * @implements IUpdateFleetRequest + * @constructor + * @param {google.cloud.gkehub.v1.IUpdateFleetRequest=} [properties] Properties to set + */ + function UpdateFleetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateFleetRequest fleet. + * @member {google.cloud.gkehub.v1.IFleet|null|undefined} fleet + * @memberof google.cloud.gkehub.v1.UpdateFleetRequest + * @instance + */ + UpdateFleetRequest.prototype.fleet = null; + + /** + * UpdateFleetRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.gkehub.v1.UpdateFleetRequest + * @instance + */ + UpdateFleetRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateFleetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.UpdateFleetRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateFleetRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.UpdateFleetRequest} UpdateFleetRequest instance + */ + UpdateFleetRequest.create = function create(properties) { + return new UpdateFleetRequest(properties); + }; + + /** + * Encodes the specified UpdateFleetRequest message. Does not implicitly {@link google.cloud.gkehub.v1.UpdateFleetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.UpdateFleetRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateFleetRequest} message UpdateFleetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFleetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fleet != null && Object.hasOwnProperty.call(message, "fleet")) + $root.google.cloud.gkehub.v1.Fleet.encode(message.fleet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateFleetRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.UpdateFleetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateFleetRequest + * @static + * @param {google.cloud.gkehub.v1.IUpdateFleetRequest} message UpdateFleetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateFleetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateFleetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.UpdateFleetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.UpdateFleetRequest} UpdateFleetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFleetRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.UpdateFleetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fleet = $root.google.cloud.gkehub.v1.Fleet.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateFleetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.UpdateFleetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.UpdateFleetRequest} UpdateFleetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateFleetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateFleetRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.UpdateFleetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateFleetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fleet != null && message.hasOwnProperty("fleet")) { + var error = $root.google.cloud.gkehub.v1.Fleet.verify(message.fleet); + if (error) + return "fleet." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateFleetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.UpdateFleetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.UpdateFleetRequest} UpdateFleetRequest + */ + UpdateFleetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.UpdateFleetRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.UpdateFleetRequest(); + if (object.fleet != null) { + if (typeof object.fleet !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateFleetRequest.fleet: object expected"); + message.fleet = $root.google.cloud.gkehub.v1.Fleet.fromObject(object.fleet); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.gkehub.v1.UpdateFleetRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateFleetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.UpdateFleetRequest + * @static + * @param {google.cloud.gkehub.v1.UpdateFleetRequest} message UpdateFleetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateFleetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fleet = null; + object.updateMask = null; + } + if (message.fleet != null && message.hasOwnProperty("fleet")) + object.fleet = $root.google.cloud.gkehub.v1.Fleet.toObject(message.fleet, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateFleetRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.UpdateFleetRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateFleetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateFleetRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.UpdateFleetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateFleetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.UpdateFleetRequest"; + }; + + return UpdateFleetRequest; + })(); + + v1.DeleteFleetRequest = (function() { + + /** + * Properties of a DeleteFleetRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IDeleteFleetRequest + * @property {string|null} [name] DeleteFleetRequest name + */ + + /** + * Constructs a new DeleteFleetRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a DeleteFleetRequest. + * @implements IDeleteFleetRequest + * @constructor + * @param {google.cloud.gkehub.v1.IDeleteFleetRequest=} [properties] Properties to set + */ + function DeleteFleetRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteFleetRequest name. + * @member {string} name + * @memberof google.cloud.gkehub.v1.DeleteFleetRequest + * @instance + */ + DeleteFleetRequest.prototype.name = ""; + + /** + * Creates a new DeleteFleetRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.DeleteFleetRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteFleetRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.DeleteFleetRequest} DeleteFleetRequest instance + */ + DeleteFleetRequest.create = function create(properties) { + return new DeleteFleetRequest(properties); + }; + + /** + * Encodes the specified DeleteFleetRequest message. Does not implicitly {@link google.cloud.gkehub.v1.DeleteFleetRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.DeleteFleetRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteFleetRequest} message DeleteFleetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFleetRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteFleetRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.DeleteFleetRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteFleetRequest + * @static + * @param {google.cloud.gkehub.v1.IDeleteFleetRequest} message DeleteFleetRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteFleetRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteFleetRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.DeleteFleetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.DeleteFleetRequest} DeleteFleetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFleetRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.DeleteFleetRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteFleetRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.DeleteFleetRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.DeleteFleetRequest} DeleteFleetRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteFleetRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteFleetRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.DeleteFleetRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteFleetRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteFleetRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.DeleteFleetRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.DeleteFleetRequest} DeleteFleetRequest + */ + DeleteFleetRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.DeleteFleetRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.DeleteFleetRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteFleetRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.DeleteFleetRequest + * @static + * @param {google.cloud.gkehub.v1.DeleteFleetRequest} message DeleteFleetRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteFleetRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteFleetRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.DeleteFleetRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteFleetRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteFleetRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.DeleteFleetRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteFleetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.DeleteFleetRequest"; + }; + + return DeleteFleetRequest; + })(); + + v1.ListFleetsRequest = (function() { + + /** + * Properties of a ListFleetsRequest. + * @memberof google.cloud.gkehub.v1 + * @interface IListFleetsRequest + * @property {string|null} [parent] ListFleetsRequest parent + * @property {string|null} [pageToken] ListFleetsRequest pageToken + * @property {number|null} [pageSize] ListFleetsRequest pageSize + */ + + /** + * Constructs a new ListFleetsRequest. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListFleetsRequest. + * @implements IListFleetsRequest + * @constructor + * @param {google.cloud.gkehub.v1.IListFleetsRequest=} [properties] Properties to set + */ + function ListFleetsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFleetsRequest parent. + * @member {string} parent + * @memberof google.cloud.gkehub.v1.ListFleetsRequest + * @instance + */ + ListFleetsRequest.prototype.parent = ""; + + /** + * ListFleetsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.gkehub.v1.ListFleetsRequest + * @instance + */ + ListFleetsRequest.prototype.pageToken = ""; + + /** + * ListFleetsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.gkehub.v1.ListFleetsRequest + * @instance + */ + ListFleetsRequest.prototype.pageSize = 0; + + /** + * Creates a new ListFleetsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListFleetsRequest + * @static + * @param {google.cloud.gkehub.v1.IListFleetsRequest=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListFleetsRequest} ListFleetsRequest instance + */ + ListFleetsRequest.create = function create(properties) { + return new ListFleetsRequest(properties); + }; + + /** + * Encodes the specified ListFleetsRequest message. Does not implicitly {@link google.cloud.gkehub.v1.ListFleetsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListFleetsRequest + * @static + * @param {google.cloud.gkehub.v1.IListFleetsRequest} message ListFleetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFleetsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pageToken); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + return writer; + }; + + /** + * Encodes the specified ListFleetsRequest message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListFleetsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListFleetsRequest + * @static + * @param {google.cloud.gkehub.v1.IListFleetsRequest} message ListFleetsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFleetsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFleetsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListFleetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListFleetsRequest} ListFleetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFleetsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListFleetsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageToken = reader.string(); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFleetsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListFleetsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListFleetsRequest} ListFleetsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFleetsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFleetsRequest message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListFleetsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFleetsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + return null; + }; + + /** + * Creates a ListFleetsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListFleetsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListFleetsRequest} ListFleetsRequest + */ + ListFleetsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListFleetsRequest) + return object; + var message = new $root.google.cloud.gkehub.v1.ListFleetsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + return message; + }; + + /** + * Creates a plain object from a ListFleetsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListFleetsRequest + * @static + * @param {google.cloud.gkehub.v1.ListFleetsRequest} message ListFleetsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFleetsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + return object; + }; + + /** + * Converts this ListFleetsRequest to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListFleetsRequest + * @instance + * @returns {Object.} JSON object + */ + ListFleetsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFleetsRequest + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListFleetsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFleetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListFleetsRequest"; + }; + + return ListFleetsRequest; + })(); + + v1.ListFleetsResponse = (function() { + + /** + * Properties of a ListFleetsResponse. + * @memberof google.cloud.gkehub.v1 + * @interface IListFleetsResponse + * @property {Array.|null} [fleets] ListFleetsResponse fleets + * @property {string|null} [nextPageToken] ListFleetsResponse nextPageToken + */ + + /** + * Constructs a new ListFleetsResponse. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a ListFleetsResponse. + * @implements IListFleetsResponse + * @constructor + * @param {google.cloud.gkehub.v1.IListFleetsResponse=} [properties] Properties to set + */ + function ListFleetsResponse(properties) { + this.fleets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListFleetsResponse fleets. + * @member {Array.} fleets + * @memberof google.cloud.gkehub.v1.ListFleetsResponse + * @instance + */ + ListFleetsResponse.prototype.fleets = $util.emptyArray; + + /** + * ListFleetsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.gkehub.v1.ListFleetsResponse + * @instance + */ + ListFleetsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListFleetsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.ListFleetsResponse + * @static + * @param {google.cloud.gkehub.v1.IListFleetsResponse=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.ListFleetsResponse} ListFleetsResponse instance + */ + ListFleetsResponse.create = function create(properties) { + return new ListFleetsResponse(properties); + }; + + /** + * Encodes the specified ListFleetsResponse message. Does not implicitly {@link google.cloud.gkehub.v1.ListFleetsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.ListFleetsResponse + * @static + * @param {google.cloud.gkehub.v1.IListFleetsResponse} message ListFleetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFleetsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fleets != null && message.fleets.length) + for (var i = 0; i < message.fleets.length; ++i) + $root.google.cloud.gkehub.v1.Fleet.encode(message.fleets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListFleetsResponse message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.ListFleetsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.ListFleetsResponse + * @static + * @param {google.cloud.gkehub.v1.IListFleetsResponse} message ListFleetsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListFleetsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListFleetsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.ListFleetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.ListFleetsResponse} ListFleetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFleetsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.ListFleetsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.fleets && message.fleets.length)) + message.fleets = []; + message.fleets.push($root.google.cloud.gkehub.v1.Fleet.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListFleetsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.ListFleetsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.ListFleetsResponse} ListFleetsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListFleetsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListFleetsResponse message. + * @function verify + * @memberof google.cloud.gkehub.v1.ListFleetsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListFleetsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fleets != null && message.hasOwnProperty("fleets")) { + if (!Array.isArray(message.fleets)) + return "fleets: array expected"; + for (var i = 0; i < message.fleets.length; ++i) { + var error = $root.google.cloud.gkehub.v1.Fleet.verify(message.fleets[i]); + if (error) + return "fleets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListFleetsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.ListFleetsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.ListFleetsResponse} ListFleetsResponse + */ + ListFleetsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.ListFleetsResponse) + return object; + var message = new $root.google.cloud.gkehub.v1.ListFleetsResponse(); + if (object.fleets) { + if (!Array.isArray(object.fleets)) + throw TypeError(".google.cloud.gkehub.v1.ListFleetsResponse.fleets: array expected"); + message.fleets = []; + for (var i = 0; i < object.fleets.length; ++i) { + if (typeof object.fleets[i] !== "object") + throw TypeError(".google.cloud.gkehub.v1.ListFleetsResponse.fleets: object expected"); + message.fleets[i] = $root.google.cloud.gkehub.v1.Fleet.fromObject(object.fleets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListFleetsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.ListFleetsResponse + * @static + * @param {google.cloud.gkehub.v1.ListFleetsResponse} message ListFleetsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListFleetsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fleets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.fleets && message.fleets.length) { + object.fleets = []; + for (var j = 0; j < message.fleets.length; ++j) + object.fleets[j] = $root.google.cloud.gkehub.v1.Fleet.toObject(message.fleets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListFleetsResponse to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.ListFleetsResponse + * @instance + * @returns {Object.} JSON object + */ + ListFleetsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListFleetsResponse + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.ListFleetsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListFleetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.ListFleetsResponse"; + }; + + return ListFleetsResponse; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.gkehub.v1 + * @interface IOperationMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + * @property {string|null} [target] OperationMetadata target + * @property {string|null} [verb] OperationMetadata verb + * @property {string|null} [statusDetail] OperationMetadata statusDetail + * @property {boolean|null} [cancelRequested] OperationMetadata cancelRequested + * @property {string|null} [apiVersion] OperationMetadata apiVersion + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.gkehub.v1.IOperationMetadata=} [properties] Properties to set + */ + function OperationMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * OperationMetadata target. + * @member {string} target + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.target = ""; + + /** + * OperationMetadata verb. + * @member {string} verb + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.verb = ""; + + /** + * OperationMetadata statusDetail. + * @member {string} statusDetail + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.statusDetail = ""; + + /** + * OperationMetadata cancelRequested. + * @member {boolean} cancelRequested + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.cancelRequested = false; + + /** + * OperationMetadata apiVersion. + * @member {string} apiVersion + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.apiVersion = ""; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @static + * @param {google.cloud.gkehub.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.gkehub.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.gkehub.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @static + * @param {google.cloud.gkehub.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.target); + if (message.verb != null && Object.hasOwnProperty.call(message, "verb")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.verb); + if (message.statusDetail != null && Object.hasOwnProperty.call(message, "statusDetail")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.statusDetail); + if (message.cancelRequested != null && Object.hasOwnProperty.call(message, "cancelRequested")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.cancelRequested); + if (message.apiVersion != null && Object.hasOwnProperty.call(message, "apiVersion")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.apiVersion); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.gkehub.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @static + * @param {google.cloud.gkehub.v1.IOperationMetadata} message OperationMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.target = reader.string(); + break; + } + case 4: { + message.verb = reader.string(); + break; + } + case 5: { + message.statusDetail = reader.string(); + break; + } + case 6: { + message.cancelRequested = reader.bool(); + break; + } + case 7: { + message.apiVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OperationMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.v1.OperationMetadata} OperationMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OperationMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OperationMetadata message. + * @function verify + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OperationMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.target != null && message.hasOwnProperty("target")) + if (!$util.isString(message.target)) + return "target: string expected"; + if (message.verb != null && message.hasOwnProperty("verb")) + if (!$util.isString(message.verb)) + return "verb: string expected"; + if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) + if (!$util.isString(message.statusDetail)) + return "statusDetail: string expected"; + if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) + if (typeof message.cancelRequested !== "boolean") + return "cancelRequested: boolean expected"; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + if (!$util.isString(message.apiVersion)) + return "apiVersion: string expected"; + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.gkehub.v1.OperationMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.OperationMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.gkehub.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.target != null) + message.target = String(object.target); + if (object.verb != null) + message.verb = String(object.verb); + if (object.statusDetail != null) + message.statusDetail = String(object.statusDetail); + if (object.cancelRequested != null) + message.cancelRequested = Boolean(object.cancelRequested); + if (object.apiVersion != null) + message.apiVersion = String(object.apiVersion); + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @static + * @param {google.cloud.gkehub.v1.OperationMetadata} message OperationMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OperationMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.target = ""; + object.verb = ""; + object.statusDetail = ""; + object.cancelRequested = false; + object.apiVersion = ""; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = message.target; + if (message.verb != null && message.hasOwnProperty("verb")) + object.verb = message.verb; + if (message.statusDetail != null && message.hasOwnProperty("statusDetail")) + object.statusDetail = message.statusDetail; + if (message.cancelRequested != null && message.hasOwnProperty("cancelRequested")) + object.cancelRequested = message.cancelRequested; + if (message.apiVersion != null && message.hasOwnProperty("apiVersion")) + object.apiVersion = message.apiVersion; + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @instance + * @returns {Object.} JSON object + */ + OperationMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OperationMetadata + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.OperationMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.OperationMetadata"; + }; + + return OperationMetadata; + })(); + + return v1; + })(); + + gkehub.multiclusteringress = (function() { + + /** + * Namespace multiclusteringress. + * @memberof google.cloud.gkehub + * @namespace + */ + var multiclusteringress = {}; + + multiclusteringress.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.gkehub.multiclusteringress + * @namespace + */ + var v1 = {}; + + v1.FeatureSpec = (function() { + + /** + * Properties of a FeatureSpec. + * @memberof google.cloud.gkehub.multiclusteringress.v1 + * @interface IFeatureSpec + * @property {string|null} [configMembership] FeatureSpec configMembership + */ + + /** + * Constructs a new FeatureSpec. + * @memberof google.cloud.gkehub.multiclusteringress.v1 + * @classdesc Represents a FeatureSpec. + * @implements IFeatureSpec + * @constructor + * @param {google.cloud.gkehub.multiclusteringress.v1.IFeatureSpec=} [properties] Properties to set + */ + function FeatureSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSpec configMembership. + * @member {string} configMembership + * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @instance + */ + FeatureSpec.prototype.configMembership = ""; + + /** + * Creates a new FeatureSpec instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @static + * @param {google.cloud.gkehub.multiclusteringress.v1.IFeatureSpec=} [properties] Properties to set + * @returns {google.cloud.gkehub.multiclusteringress.v1.FeatureSpec} FeatureSpec instance + */ + FeatureSpec.create = function create(properties) { + return new FeatureSpec(properties); + }; + + /** + * Encodes the specified FeatureSpec message. Does not implicitly {@link google.cloud.gkehub.multiclusteringress.v1.FeatureSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @static + * @param {google.cloud.gkehub.multiclusteringress.v1.IFeatureSpec} message FeatureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.configMembership != null && Object.hasOwnProperty.call(message, "configMembership")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.configMembership); + return writer; + }; + + /** + * Encodes the specified FeatureSpec message, length delimited. Does not implicitly {@link google.cloud.gkehub.multiclusteringress.v1.FeatureSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @static + * @param {google.cloud.gkehub.multiclusteringress.v1.IFeatureSpec} message FeatureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.multiclusteringress.v1.FeatureSpec} FeatureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.multiclusteringress.v1.FeatureSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.configMembership = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.multiclusteringress.v1.FeatureSpec} FeatureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSpec message. + * @function verify + * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.configMembership != null && message.hasOwnProperty("configMembership")) + if (!$util.isString(message.configMembership)) + return "configMembership: string expected"; + return null; + }; + + /** + * Creates a FeatureSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.multiclusteringress.v1.FeatureSpec} FeatureSpec + */ + FeatureSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.multiclusteringress.v1.FeatureSpec) + return object; + var message = new $root.google.cloud.gkehub.multiclusteringress.v1.FeatureSpec(); + if (object.configMembership != null) + message.configMembership = String(object.configMembership); + return message; + }; + + /** + * Creates a plain object from a FeatureSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @static + * @param {google.cloud.gkehub.multiclusteringress.v1.FeatureSpec} message FeatureSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.configMembership = ""; + if (message.configMembership != null && message.hasOwnProperty("configMembership")) + object.configMembership = message.configMembership; + return object; + }; + + /** + * Converts this FeatureSpec to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @instance + * @returns {Object.} JSON object + */ + FeatureSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSpec + * @function getTypeUrl + * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.multiclusteringress.v1.FeatureSpec"; + }; + + return FeatureSpec; + })(); + + return v1; + })(); + + multiclusteringress.v1alpha = (function() { + + /** + * Namespace v1alpha. + * @memberof google.cloud.gkehub.multiclusteringress + * @namespace + */ + var v1alpha = {}; + + /** + * Billing enum. + * @name google.cloud.gkehub.multiclusteringress.v1alpha.Billing + * @enum {number} + * @property {number} BILLING_UNSPECIFIED=0 BILLING_UNSPECIFIED value + * @property {number} PAY_AS_YOU_GO=1 PAY_AS_YOU_GO value + * @property {number} ANTHOS_LICENSE=2 ANTHOS_LICENSE value + */ + v1alpha.Billing = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BILLING_UNSPECIFIED"] = 0; + values[valuesById[1] = "PAY_AS_YOU_GO"] = 1; + values[valuesById[2] = "ANTHOS_LICENSE"] = 2; + return values; + })(); + + v1alpha.FeatureSpec = (function() { + + /** + * Properties of a FeatureSpec. + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha + * @interface IFeatureSpec + * @property {string|null} [configMembership] FeatureSpec configMembership + * @property {google.cloud.gkehub.multiclusteringress.v1alpha.Billing|null} [billing] FeatureSpec billing + */ + + /** + * Constructs a new FeatureSpec. + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha + * @classdesc Represents a FeatureSpec. + * @implements IFeatureSpec + * @constructor + * @param {google.cloud.gkehub.multiclusteringress.v1alpha.IFeatureSpec=} [properties] Properties to set + */ + function FeatureSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FeatureSpec configMembership. + * @member {string} configMembership + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @instance + */ + FeatureSpec.prototype.configMembership = ""; + + /** + * FeatureSpec billing. + * @member {google.cloud.gkehub.multiclusteringress.v1alpha.Billing} billing + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @instance + */ + FeatureSpec.prototype.billing = 0; + + /** + * Creates a new FeatureSpec instance using the specified properties. + * @function create + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @static + * @param {google.cloud.gkehub.multiclusteringress.v1alpha.IFeatureSpec=} [properties] Properties to set + * @returns {google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec} FeatureSpec instance + */ + FeatureSpec.create = function create(properties) { + return new FeatureSpec(properties); + }; + + /** + * Encodes the specified FeatureSpec message. Does not implicitly {@link google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @static + * @param {google.cloud.gkehub.multiclusteringress.v1alpha.IFeatureSpec} message FeatureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.configMembership != null && Object.hasOwnProperty.call(message, "configMembership")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.configMembership); + if (message.billing != null && Object.hasOwnProperty.call(message, "billing")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.billing); + return writer; + }; + + /** + * Encodes the specified FeatureSpec message, length delimited. Does not implicitly {@link google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @static + * @param {google.cloud.gkehub.multiclusteringress.v1alpha.IFeatureSpec} message FeatureSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec} FeatureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.configMembership = reader.string(); + break; + } + case 2: { + message.billing = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec} FeatureSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSpec message. + * @function verify + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.configMembership != null && message.hasOwnProperty("configMembership")) + if (!$util.isString(message.configMembership)) + return "configMembership: string expected"; + if (message.billing != null && message.hasOwnProperty("billing")) + switch (message.billing) { + default: + return "billing: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FeatureSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec} FeatureSpec + */ + FeatureSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec) + return object; + var message = new $root.google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec(); + if (object.configMembership != null) + message.configMembership = String(object.configMembership); + switch (object.billing) { + default: + if (typeof object.billing === "number") { + message.billing = object.billing; + break; + } + break; + case "BILLING_UNSPECIFIED": + case 0: + message.billing = 0; + break; + case "PAY_AS_YOU_GO": + case 1: + message.billing = 1; + break; + case "ANTHOS_LICENSE": + case 2: + message.billing = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @static + * @param {google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec} message FeatureSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.configMembership = ""; + object.billing = options.enums === String ? "BILLING_UNSPECIFIED" : 0; + } + if (message.configMembership != null && message.hasOwnProperty("configMembership")) + object.configMembership = message.configMembership; + if (message.billing != null && message.hasOwnProperty("billing")) + object.billing = options.enums === String ? $root.google.cloud.gkehub.multiclusteringress.v1alpha.Billing[message.billing] === undefined ? message.billing : $root.google.cloud.gkehub.multiclusteringress.v1alpha.Billing[message.billing] : message.billing; + return object; + }; - return v1; - })(); + /** + * Converts this FeatureSpec to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @instance + * @returns {Object.} JSON object + */ + FeatureSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - gkehub.multiclusteringress = (function() { + /** + * Gets the default type url for FeatureSpec + * @function getTypeUrl + * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec"; + }; - /** - * Namespace multiclusteringress. - * @memberof google.cloud.gkehub - * @namespace - */ - var multiclusteringress = {}; + return FeatureSpec; + })(); - multiclusteringress.v1 = (function() { + return v1alpha; + })(); + + multiclusteringress.v1beta = (function() { /** - * Namespace v1. + * Namespace v1beta. * @memberof google.cloud.gkehub.multiclusteringress * @namespace */ - var v1 = {}; + var v1beta = {}; - v1.FeatureSpec = (function() { + /** + * Billing enum. + * @name google.cloud.gkehub.multiclusteringress.v1beta.Billing + * @enum {number} + * @property {number} BILLING_UNSPECIFIED=0 BILLING_UNSPECIFIED value + * @property {number} PAY_AS_YOU_GO=1 PAY_AS_YOU_GO value + * @property {number} ANTHOS_LICENSE=2 ANTHOS_LICENSE value + */ + v1beta.Billing = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "BILLING_UNSPECIFIED"] = 0; + values[valuesById[1] = "PAY_AS_YOU_GO"] = 1; + values[valuesById[2] = "ANTHOS_LICENSE"] = 2; + return values; + })(); + + v1beta.FeatureSpec = (function() { /** * Properties of a FeatureSpec. - * @memberof google.cloud.gkehub.multiclusteringress.v1 + * @memberof google.cloud.gkehub.multiclusteringress.v1beta * @interface IFeatureSpec * @property {string|null} [configMembership] FeatureSpec configMembership + * @property {google.cloud.gkehub.multiclusteringress.v1beta.Billing|null} [billing] FeatureSpec billing */ /** * Constructs a new FeatureSpec. - * @memberof google.cloud.gkehub.multiclusteringress.v1 + * @memberof google.cloud.gkehub.multiclusteringress.v1beta * @classdesc Represents a FeatureSpec. * @implements IFeatureSpec * @constructor - * @param {google.cloud.gkehub.multiclusteringress.v1.IFeatureSpec=} [properties] Properties to set + * @param {google.cloud.gkehub.multiclusteringress.v1beta.IFeatureSpec=} [properties] Properties to set */ function FeatureSpec(properties) { if (properties) @@ -47793,29 +65593,37 @@ /** * FeatureSpec configMembership. * @member {string} configMembership - * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec * @instance */ FeatureSpec.prototype.configMembership = ""; + /** + * FeatureSpec billing. + * @member {google.cloud.gkehub.multiclusteringress.v1beta.Billing} billing + * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec + * @instance + */ + FeatureSpec.prototype.billing = 0; + /** * Creates a new FeatureSpec instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec * @static - * @param {google.cloud.gkehub.multiclusteringress.v1.IFeatureSpec=} [properties] Properties to set - * @returns {google.cloud.gkehub.multiclusteringress.v1.FeatureSpec} FeatureSpec instance + * @param {google.cloud.gkehub.multiclusteringress.v1beta.IFeatureSpec=} [properties] Properties to set + * @returns {google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec} FeatureSpec instance */ FeatureSpec.create = function create(properties) { return new FeatureSpec(properties); }; /** - * Encodes the specified FeatureSpec message. Does not implicitly {@link google.cloud.gkehub.multiclusteringress.v1.FeatureSpec.verify|verify} messages. + * Encodes the specified FeatureSpec message. Does not implicitly {@link google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec * @static - * @param {google.cloud.gkehub.multiclusteringress.v1.IFeatureSpec} message FeatureSpec message or plain object to encode + * @param {google.cloud.gkehub.multiclusteringress.v1beta.IFeatureSpec} message FeatureSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -47824,15 +65632,17 @@ writer = $Writer.create(); if (message.configMembership != null && Object.hasOwnProperty.call(message, "configMembership")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.configMembership); + if (message.billing != null && Object.hasOwnProperty.call(message, "billing")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.billing); return writer; }; /** - * Encodes the specified FeatureSpec message, length delimited. Does not implicitly {@link google.cloud.gkehub.multiclusteringress.v1.FeatureSpec.verify|verify} messages. + * Encodes the specified FeatureSpec message, length delimited. Does not implicitly {@link google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec * @static - * @param {google.cloud.gkehub.multiclusteringress.v1.IFeatureSpec} message FeatureSpec message or plain object to encode + * @param {google.cloud.gkehub.multiclusteringress.v1beta.IFeatureSpec} message FeatureSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -47843,18 +65653,18 @@ /** * Decodes a FeatureSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.multiclusteringress.v1.FeatureSpec} FeatureSpec + * @returns {google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec} FeatureSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ FeatureSpec.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.multiclusteringress.v1.FeatureSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -47864,6 +65674,10 @@ message.configMembership = reader.string(); break; } + case 2: { + message.billing = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -47875,10 +65689,10 @@ /** * Decodes a FeatureSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.multiclusteringress.v1.FeatureSpec} FeatureSpec + * @returns {google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec} FeatureSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -47891,7 +65705,7 @@ /** * Verifies a FeatureSpec message. * @function verify - * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -47902,32 +65716,61 @@ if (message.configMembership != null && message.hasOwnProperty("configMembership")) if (!$util.isString(message.configMembership)) return "configMembership: string expected"; + if (message.billing != null && message.hasOwnProperty("billing")) + switch (message.billing) { + default: + return "billing: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** * Creates a FeatureSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.multiclusteringress.v1.FeatureSpec} FeatureSpec + * @returns {google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec} FeatureSpec */ FeatureSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.multiclusteringress.v1.FeatureSpec) + if (object instanceof $root.google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec) return object; - var message = new $root.google.cloud.gkehub.multiclusteringress.v1.FeatureSpec(); + var message = new $root.google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec(); if (object.configMembership != null) message.configMembership = String(object.configMembership); + switch (object.billing) { + default: + if (typeof object.billing === "number") { + message.billing = object.billing; + break; + } + break; + case "BILLING_UNSPECIFIED": + case 0: + message.billing = 0; + break; + case "PAY_AS_YOU_GO": + case 1: + message.billing = 1; + break; + case "ANTHOS_LICENSE": + case 2: + message.billing = 2; + break; + } return message; }; /** * Creates a plain object from a FeatureSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec * @static - * @param {google.cloud.gkehub.multiclusteringress.v1.FeatureSpec} message FeatureSpec + * @param {google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec} message FeatureSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -47935,17 +65778,21 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.configMembership = ""; + object.billing = options.enums === String ? "BILLING_UNSPECIFIED" : 0; + } if (message.configMembership != null && message.hasOwnProperty("configMembership")) object.configMembership = message.configMembership; + if (message.billing != null && message.hasOwnProperty("billing")) + object.billing = options.enums === String ? $root.google.cloud.gkehub.multiclusteringress.v1beta.Billing[message.billing] === undefined ? message.billing : $root.google.cloud.gkehub.multiclusteringress.v1beta.Billing[message.billing] : message.billing; return object; }; /** * Converts this FeatureSpec to JSON. * @function toJSON - * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec * @instance * @returns {Object.} JSON object */ @@ -47956,7 +65803,7 @@ /** * Gets the default type url for FeatureSpec * @function getTypeUrl - * @memberof google.cloud.gkehub.multiclusteringress.v1.FeatureSpec + * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url @@ -47965,59 +65812,55 @@ if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.multiclusteringress.v1.FeatureSpec"; + return typeUrlPrefix + "/google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec"; }; return FeatureSpec; })(); - return v1; + return v1beta; })(); - multiclusteringress.v1alpha = (function() { + return multiclusteringress; + })(); - /** - * Namespace v1alpha. - * @memberof google.cloud.gkehub.multiclusteringress - * @namespace - */ - var v1alpha = {}; + gkehub.rbacrolebindingactuation = (function() { + + /** + * Namespace rbacrolebindingactuation. + * @memberof google.cloud.gkehub + * @namespace + */ + var rbacrolebindingactuation = {}; + + rbacrolebindingactuation.v1 = (function() { /** - * Billing enum. - * @name google.cloud.gkehub.multiclusteringress.v1alpha.Billing - * @enum {number} - * @property {number} BILLING_UNSPECIFIED=0 BILLING_UNSPECIFIED value - * @property {number} PAY_AS_YOU_GO=1 PAY_AS_YOU_GO value - * @property {number} ANTHOS_LICENSE=2 ANTHOS_LICENSE value + * Namespace v1. + * @memberof google.cloud.gkehub.rbacrolebindingactuation + * @namespace */ - v1alpha.Billing = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BILLING_UNSPECIFIED"] = 0; - values[valuesById[1] = "PAY_AS_YOU_GO"] = 1; - values[valuesById[2] = "ANTHOS_LICENSE"] = 2; - return values; - })(); + var v1 = {}; - v1alpha.FeatureSpec = (function() { + v1.FeatureSpec = (function() { /** * Properties of a FeatureSpec. - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1 * @interface IFeatureSpec - * @property {string|null} [configMembership] FeatureSpec configMembership - * @property {google.cloud.gkehub.multiclusteringress.v1alpha.Billing|null} [billing] FeatureSpec billing + * @property {Array.|null} [allowedCustomRoles] FeatureSpec allowedCustomRoles */ /** * Constructs a new FeatureSpec. - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1 * @classdesc Represents a FeatureSpec. * @implements IFeatureSpec * @constructor - * @param {google.cloud.gkehub.multiclusteringress.v1alpha.IFeatureSpec=} [properties] Properties to set + * @param {google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureSpec=} [properties] Properties to set */ function FeatureSpec(properties) { + this.allowedCustomRoles = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48025,58 +65868,49 @@ } /** - * FeatureSpec configMembership. - * @member {string} configMembership - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec - * @instance - */ - FeatureSpec.prototype.configMembership = ""; - - /** - * FeatureSpec billing. - * @member {google.cloud.gkehub.multiclusteringress.v1alpha.Billing} billing - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * FeatureSpec allowedCustomRoles. + * @member {Array.} allowedCustomRoles + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec * @instance */ - FeatureSpec.prototype.billing = 0; + FeatureSpec.prototype.allowedCustomRoles = $util.emptyArray; /** * Creates a new FeatureSpec instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec * @static - * @param {google.cloud.gkehub.multiclusteringress.v1alpha.IFeatureSpec=} [properties] Properties to set - * @returns {google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec} FeatureSpec instance + * @param {google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureSpec=} [properties] Properties to set + * @returns {google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec} FeatureSpec instance */ FeatureSpec.create = function create(properties) { return new FeatureSpec(properties); }; /** - * Encodes the specified FeatureSpec message. Does not implicitly {@link google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec.verify|verify} messages. + * Encodes the specified FeatureSpec message. Does not implicitly {@link google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec * @static - * @param {google.cloud.gkehub.multiclusteringress.v1alpha.IFeatureSpec} message FeatureSpec message or plain object to encode + * @param {google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureSpec} message FeatureSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ FeatureSpec.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.configMembership != null && Object.hasOwnProperty.call(message, "configMembership")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.configMembership); - if (message.billing != null && Object.hasOwnProperty.call(message, "billing")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.billing); + if (message.allowedCustomRoles != null && message.allowedCustomRoles.length) + for (var i = 0; i < message.allowedCustomRoles.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.allowedCustomRoles[i]); return writer; }; /** - * Encodes the specified FeatureSpec message, length delimited. Does not implicitly {@link google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec.verify|verify} messages. + * Encodes the specified FeatureSpec message, length delimited. Does not implicitly {@link google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec * @static - * @param {google.cloud.gkehub.multiclusteringress.v1alpha.IFeatureSpec} message FeatureSpec message or plain object to encode + * @param {google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureSpec} message FeatureSpec message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -48087,29 +65921,27 @@ /** * Decodes a FeatureSpec message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec} FeatureSpec + * @returns {google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec} FeatureSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ FeatureSpec.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.configMembership = reader.string(); - break; - } case 2: { - message.billing = reader.int32(); + if (!(message.allowedCustomRoles && message.allowedCustomRoles.length)) + message.allowedCustomRoles = []; + message.allowedCustomRoles.push(reader.string()); break; } default: @@ -48123,10 +65955,10 @@ /** * Decodes a FeatureSpec message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec} FeatureSpec + * @returns {google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec} FeatureSpec * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -48139,7 +65971,7 @@ /** * Verifies a FeatureSpec message. * @function verify - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -48147,54 +65979,34 @@ FeatureSpec.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.configMembership != null && message.hasOwnProperty("configMembership")) - if (!$util.isString(message.configMembership)) - return "configMembership: string expected"; - if (message.billing != null && message.hasOwnProperty("billing")) - switch (message.billing) { - default: - return "billing: enum value expected"; - case 0: - case 1: - case 2: - break; - } + if (message.allowedCustomRoles != null && message.hasOwnProperty("allowedCustomRoles")) { + if (!Array.isArray(message.allowedCustomRoles)) + return "allowedCustomRoles: array expected"; + for (var i = 0; i < message.allowedCustomRoles.length; ++i) + if (!$util.isString(message.allowedCustomRoles[i])) + return "allowedCustomRoles: string[] expected"; + } return null; }; /** * Creates a FeatureSpec message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec} FeatureSpec + * @returns {google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec} FeatureSpec */ FeatureSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec) + if (object instanceof $root.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec) return object; - var message = new $root.google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec(); - if (object.configMembership != null) - message.configMembership = String(object.configMembership); - switch (object.billing) { - default: - if (typeof object.billing === "number") { - message.billing = object.billing; - break; - } - break; - case "BILLING_UNSPECIFIED": - case 0: - message.billing = 0; - break; - case "PAY_AS_YOU_GO": - case 1: - message.billing = 1; - break; - case "ANTHOS_LICENSE": - case 2: - message.billing = 2; - break; + var message = new $root.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec(); + if (object.allowedCustomRoles) { + if (!Array.isArray(object.allowedCustomRoles)) + throw TypeError(".google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec.allowedCustomRoles: array expected"); + message.allowedCustomRoles = []; + for (var i = 0; i < object.allowedCustomRoles.length; ++i) + message.allowedCustomRoles[i] = String(object.allowedCustomRoles[i]); } return message; }; @@ -48202,9 +66014,9 @@ /** * Creates a plain object from a FeatureSpec message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec * @static - * @param {google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec} message FeatureSpec + * @param {google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec} message FeatureSpec * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -48212,21 +66024,20 @@ if (!options) options = {}; var object = {}; - if (options.defaults) { - object.configMembership = ""; - object.billing = options.enums === String ? "BILLING_UNSPECIFIED" : 0; + if (options.arrays || options.defaults) + object.allowedCustomRoles = []; + if (message.allowedCustomRoles && message.allowedCustomRoles.length) { + object.allowedCustomRoles = []; + for (var j = 0; j < message.allowedCustomRoles.length; ++j) + object.allowedCustomRoles[j] = message.allowedCustomRoles[j]; } - if (message.configMembership != null && message.hasOwnProperty("configMembership")) - object.configMembership = message.configMembership; - if (message.billing != null && message.hasOwnProperty("billing")) - object.billing = options.enums === String ? $root.google.cloud.gkehub.multiclusteringress.v1alpha.Billing[message.billing] === undefined ? message.billing : $root.google.cloud.gkehub.multiclusteringress.v1alpha.Billing[message.billing] : message.billing; return object; }; /** * Converts this FeatureSpec to JSON. * @function toJSON - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec * @instance * @returns {Object.} JSON object */ @@ -48237,7 +66048,7 @@ /** * Gets the default type url for FeatureSpec * @function getTypeUrl - * @memberof google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url @@ -48246,59 +66057,29 @@ if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.multiclusteringress.v1alpha.FeatureSpec"; + return typeUrlPrefix + "/google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureSpec"; }; return FeatureSpec; })(); - return v1alpha; - })(); - - multiclusteringress.v1beta = (function() { - - /** - * Namespace v1beta. - * @memberof google.cloud.gkehub.multiclusteringress - * @namespace - */ - var v1beta = {}; - - /** - * Billing enum. - * @name google.cloud.gkehub.multiclusteringress.v1beta.Billing - * @enum {number} - * @property {number} BILLING_UNSPECIFIED=0 BILLING_UNSPECIFIED value - * @property {number} PAY_AS_YOU_GO=1 PAY_AS_YOU_GO value - * @property {number} ANTHOS_LICENSE=2 ANTHOS_LICENSE value - */ - v1beta.Billing = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "BILLING_UNSPECIFIED"] = 0; - values[valuesById[1] = "PAY_AS_YOU_GO"] = 1; - values[valuesById[2] = "ANTHOS_LICENSE"] = 2; - return values; - })(); - - v1beta.FeatureSpec = (function() { + v1.FeatureState = (function() { /** - * Properties of a FeatureSpec. - * @memberof google.cloud.gkehub.multiclusteringress.v1beta - * @interface IFeatureSpec - * @property {string|null} [configMembership] FeatureSpec configMembership - * @property {google.cloud.gkehub.multiclusteringress.v1beta.Billing|null} [billing] FeatureSpec billing + * Properties of a FeatureState. + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1 + * @interface IFeatureState */ /** - * Constructs a new FeatureSpec. - * @memberof google.cloud.gkehub.multiclusteringress.v1beta - * @classdesc Represents a FeatureSpec. - * @implements IFeatureSpec + * Constructs a new FeatureState. + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1 + * @classdesc Represents a FeatureState. + * @implements IFeatureState * @constructor - * @param {google.cloud.gkehub.multiclusteringress.v1beta.IFeatureSpec=} [properties] Properties to set + * @param {google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureState=} [properties] Properties to set */ - function FeatureSpec(properties) { + function FeatureState(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -48306,93 +66087,65 @@ } /** - * FeatureSpec configMembership. - * @member {string} configMembership - * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec - * @instance - */ - FeatureSpec.prototype.configMembership = ""; - - /** - * FeatureSpec billing. - * @member {google.cloud.gkehub.multiclusteringress.v1beta.Billing} billing - * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec - * @instance - */ - FeatureSpec.prototype.billing = 0; - - /** - * Creates a new FeatureSpec instance using the specified properties. + * Creates a new FeatureState instance using the specified properties. * @function create - * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState * @static - * @param {google.cloud.gkehub.multiclusteringress.v1beta.IFeatureSpec=} [properties] Properties to set - * @returns {google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec} FeatureSpec instance + * @param {google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureState=} [properties] Properties to set + * @returns {google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState} FeatureState instance */ - FeatureSpec.create = function create(properties) { - return new FeatureSpec(properties); + FeatureState.create = function create(properties) { + return new FeatureState(properties); }; /** - * Encodes the specified FeatureSpec message. Does not implicitly {@link google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec.verify|verify} messages. + * Encodes the specified FeatureState message. Does not implicitly {@link google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState.verify|verify} messages. * @function encode - * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState * @static - * @param {google.cloud.gkehub.multiclusteringress.v1beta.IFeatureSpec} message FeatureSpec message or plain object to encode + * @param {google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureState} message FeatureState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSpec.encode = function encode(message, writer) { + FeatureState.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.configMembership != null && Object.hasOwnProperty.call(message, "configMembership")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.configMembership); - if (message.billing != null && Object.hasOwnProperty.call(message, "billing")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.billing); return writer; }; /** - * Encodes the specified FeatureSpec message, length delimited. Does not implicitly {@link google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec.verify|verify} messages. + * Encodes the specified FeatureState message, length delimited. Does not implicitly {@link google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState * @static - * @param {google.cloud.gkehub.multiclusteringress.v1beta.IFeatureSpec} message FeatureSpec message or plain object to encode + * @param {google.cloud.gkehub.rbacrolebindingactuation.v1.IFeatureState} message FeatureState message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - FeatureSpec.encodeDelimited = function encodeDelimited(message, writer) { + FeatureState.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a FeatureSpec message from the specified reader or buffer. + * Decodes a FeatureState message from the specified reader or buffer. * @function decode - * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec} FeatureSpec + * @returns {google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState} FeatureState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeatureSpec.decode = function decode(reader, length, error) { + FeatureState.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.configMembership = reader.string(); - break; - } - case 2: { - message.billing = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -48402,141 +66155,95 @@ }; /** - * Decodes a FeatureSpec message from the specified reader or buffer, length delimited. + * Decodes a FeatureState message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec} FeatureSpec + * @returns {google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState} FeatureState * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - FeatureSpec.decodeDelimited = function decodeDelimited(reader) { + FeatureState.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a FeatureSpec message. + * Verifies a FeatureState message. * @function verify - * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - FeatureSpec.verify = function verify(message) { + FeatureState.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.configMembership != null && message.hasOwnProperty("configMembership")) - if (!$util.isString(message.configMembership)) - return "configMembership: string expected"; - if (message.billing != null && message.hasOwnProperty("billing")) - switch (message.billing) { - default: - return "billing: enum value expected"; - case 0: - case 1: - case 2: - break; - } return null; }; /** - * Creates a FeatureSpec message from a plain object. Also converts values to their respective internal types. + * Creates a FeatureState message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState * @static * @param {Object.} object Plain object - * @returns {google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec} FeatureSpec + * @returns {google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState} FeatureState */ - FeatureSpec.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec) + FeatureState.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState) return object; - var message = new $root.google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec(); - if (object.configMembership != null) - message.configMembership = String(object.configMembership); - switch (object.billing) { - default: - if (typeof object.billing === "number") { - message.billing = object.billing; - break; - } - break; - case "BILLING_UNSPECIFIED": - case 0: - message.billing = 0; - break; - case "PAY_AS_YOU_GO": - case 1: - message.billing = 1; - break; - case "ANTHOS_LICENSE": - case 2: - message.billing = 2; - break; - } - return message; + return new $root.google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState(); }; /** - * Creates a plain object from a FeatureSpec message. Also converts values to other types if specified. + * Creates a plain object from a FeatureState message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState * @static - * @param {google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec} message FeatureSpec + * @param {google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState} message FeatureState * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - FeatureSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.configMembership = ""; - object.billing = options.enums === String ? "BILLING_UNSPECIFIED" : 0; - } - if (message.configMembership != null && message.hasOwnProperty("configMembership")) - object.configMembership = message.configMembership; - if (message.billing != null && message.hasOwnProperty("billing")) - object.billing = options.enums === String ? $root.google.cloud.gkehub.multiclusteringress.v1beta.Billing[message.billing] === undefined ? message.billing : $root.google.cloud.gkehub.multiclusteringress.v1beta.Billing[message.billing] : message.billing; - return object; + FeatureState.toObject = function toObject() { + return {}; }; /** - * Converts this FeatureSpec to JSON. + * Converts this FeatureState to JSON. * @function toJSON - * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState * @instance * @returns {Object.} JSON object */ - FeatureSpec.prototype.toJSON = function toJSON() { + FeatureState.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for FeatureSpec + * Gets the default type url for FeatureState * @function getTypeUrl - * @memberof google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec + * @memberof google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - FeatureSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FeatureState.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.gkehub.multiclusteringress.v1beta.FeatureSpec"; + return typeUrlPrefix + "/google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState"; }; - return FeatureSpec; + return FeatureState; })(); - return v1beta; + return v1; })(); - return multiclusteringress; + return rbacrolebindingactuation; })(); gkehub.cloudauditlogging = (function() { diff --git a/packages/google-cloud-gkehub/protos/protos.json b/packages/google-cloud-gkehub/protos/protos.json index 2687483ec6f..2589e89f64a 100644 --- a/packages/google-cloud-gkehub/protos/protos.json +++ b/packages/google-cloud-gkehub/protos/protos.json @@ -3407,6 +3407,30 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "scopeSpecs": { + "keyType": "string", + "type": "ScopeFeatureSpec", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "scopeStates": { + "keyType": "string", + "type": "ScopeFeatureState", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 15, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -3472,6 +3496,31 @@ } }, "CommonFeatureState": { + "oneofs": { + "featureState": { + "oneof": [ + "rbacrolebindingactuation" + ] + } + }, + "fields": { + "rbacrolebindingactuation": { + "type": "google.cloud.gkehub.rbacrolebindingactuation.v1.FeatureState", + "id": 120 + }, + "state": { + "type": "FeatureState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ScopeFeatureSpec": { + "fields": {} + }, + "ScopeFeatureState": { "fields": { "state": { "type": "FeatureState", @@ -3516,26 +3565,12 @@ } } }, - "Membership": { + "Fleet": { "options": { - "(google.api.resource).type": "gkehub.googleapis.com/Membership", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/memberships/{membership}" - }, - "oneofs": { - "type": { - "oneof": [ - "endpoint" - ] - } + "(google.api.resource).type": "gkehub.googleapis.com/Fleet", + "(google.api.resource).pattern": "organizations/{organization}/locations/{location}/fleets/{fleet}" }, "fields": { - "endpoint": { - "type": "MembershipEndpoint", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, "name": { "type": "string", "id": 1, @@ -3543,297 +3578,405 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "labels": { - "keyType": "string", + "displayName": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "description": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "MembershipState", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 6, + "id": 3, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "updateTime": { "type": "google.protobuf.Timestamp", - "id": 7, + "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, "deleteTime": { "type": "google.protobuf.Timestamp", - "id": 8, + "id": 5, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "externalId": { + "uid": { "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "lastConnectionTime": { - "type": "google.protobuf.Timestamp", - "id": 10, + "id": 6, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "uniqueId": { - "type": "string", - "id": 11, + "state": { + "type": "FleetLifecycleState", + "id": 9, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "authority": { - "type": "Authority", - "id": 12, + "defaultClusterConfig": { + "type": "DefaultClusterConfig", + "id": 10, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "monitoringConfig": { - "type": "MonitoringConfig", - "id": 14, + "labels": { + "keyType": "string", + "type": "string", + "id": 11, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "MembershipEndpoint": { + "DefaultClusterConfig": { "fields": { - "gkeCluster": { - "type": "GkeCluster", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "securityPostureConfig": { + "type": "SecurityPostureConfig", + "id": 1 }, - "kubernetesMetadata": { - "type": "KubernetesMetadata", + "binaryAuthorizationConfig": { + "type": "BinaryAuthorizationConfig", "id": 2, "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "(google.api.field_behavior)": "OPTIONAL" } }, - "kubernetesResource": { - "type": "KubernetesResource", + "compliancePostureConfig": { + "type": "CompliancePostureConfig", "id": 3, "options": { "(google.api.field_behavior)": "OPTIONAL" } - }, - "googleManaged": { - "type": "bool", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } } } }, - "KubernetesResource": { + "SecurityPostureConfig": { "fields": { - "membershipCrManifest": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "INPUT_ONLY" - } - }, - "membershipResources": { - "rule": "repeated", - "type": "ResourceManifest", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "mode": { + "type": "Mode", + "id": 1 }, - "connectResources": { - "rule": "repeated", - "type": "ResourceManifest", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" + "vulnerabilityMode": { + "type": "VulnerabilityMode", + "id": 2 + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "BASIC": 2, + "ENTERPRISE": 3 } }, - "resourceOptions": { - "type": "ResourceOptions", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "VulnerabilityMode": { + "values": { + "VULNERABILITY_MODE_UNSPECIFIED": 0, + "VULNERABILITY_DISABLED": 1, + "VULNERABILITY_BASIC": 2, + "VULNERABILITY_ENTERPRISE": 3 } } } }, - "ResourceOptions": { + "BinaryAuthorizationConfig": { "fields": { - "connectVersion": { - "type": "string", + "evaluationMode": { + "type": "EvaluationMode", "id": 1, "options": { "(google.api.field_behavior)": "OPTIONAL" } }, - "v1beta1Crd": { - "type": "bool", + "policyBindings": { + "rule": "repeated", + "type": "PolicyBinding", "id": 2, "options": { "(google.api.field_behavior)": "OPTIONAL" } - }, - "k8sVersion": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + } + }, + "nested": { + "PolicyBinding": { + "fields": { + "name": { + "type": "string", + "id": 1 + } } }, - "k8sGitVersion": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" + "EvaluationMode": { + "values": { + "EVALUATION_MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "POLICY_BINDINGS": 2 } } } }, - "ResourceManifest": { + "CompliancePostureConfig": { "fields": { - "manifest": { - "type": "string", + "mode": { + "type": "Mode", "id": 1 }, - "clusterScoped": { - "type": "bool", + "complianceStandards": { + "rule": "repeated", + "type": "ComplianceStandard", "id": 2 } + }, + "nested": { + "ComplianceStandard": { + "fields": { + "standard": { + "type": "string", + "id": 1 + } + } + }, + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "ENABLED": 2 + } + } } }, - "GkeCluster": { + "FleetLifecycleState": { "fields": { - "resourceLink": { - "type": "string", + "code": { + "type": "Code", "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "clusterMissing": { - "type": "bool", - "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } } + }, + "nested": { + "Code": { + "values": { + "CODE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + "UPDATING": 4 + } + } } }, - "KubernetesMetadata": { + "Namespace": { + "options": { + "(google.api.resource).type": "gkehub.googleapis.com/Namespace", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/scopes/{scope}/namespaces/{namespace}" + }, "fields": { - "kubernetesApiServerVersion": { + "name": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } + "id": 1 }, - "nodeProviderId": { + "uid": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "nodeCount": { - "type": "int32", + "createTime": { + "type": "google.protobuf.Timestamp", "id": 3, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "vcpuCount": { - "type": "int32", + "updateTime": { + "type": "google.protobuf.Timestamp", "id": 4, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "memoryMb": { - "type": "int32", + "deleteTime": { + "type": "google.protobuf.Timestamp", "id": 5, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 100, + "state": { + "type": "NamespaceLifecycleState", + "id": 6, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } - } - } - }, - "MonitoringConfig": { - "fields": { - "projectId": { + }, + "scope": { "type": "string", - "id": 1, + "id": 8, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/Scope" } }, - "location": { + "namespaceLabels": { + "keyType": "string", "type": "string", - "id": 2, + "id": 9, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "OPTIONAL" } }, - "cluster": { + "labels": { + "keyType": "string", "type": "string", - "id": 3, + "id": 10, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "NamespaceLifecycleState": { + "fields": { + "code": { + "type": "Code", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Code": { + "values": { + "CODE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + "UPDATING": 4 } + } + } + }, + "RBACRoleBinding": { + "options": { + "(google.api.resource).type": "gkehub.googleapis.com/RBACRoleBinding", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}" + }, + "oneofs": { + "principal": { + "oneof": [ + "user", + "group" + ] + } + }, + "fields": { + "user": { + "type": "string", + "id": 7 }, - "kubernetesMetricsPrefix": { + "group": { "type": "string", - "id": 4 + "id": 8 }, - "clusterHash": { + "name": { "type": "string", + "id": 1 + }, + "uid": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleteTime": { + "type": "google.protobuf.Timestamp", "id": 5, "options": { - "(google.api.field_behavior)": "IMMUTABLE" + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "RBACRoleBindingLifecycleState", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "role": { + "type": "Role", + "id": 9, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Role": { + "fields": { + "predefinedRole": { + "type": "PredefinedRoles", + "id": 1 + }, + "customRole": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "PredefinedRoles": { + "values": { + "UNKNOWN": 0, + "ADMIN": 1, + "EDIT": 2, + "VIEW": 3, + "ANTHOS_SUPPORT": 4 + } + } } } } }, - "MembershipState": { + "RBACRoleBindingLifecycleState": { "fields": { "code": { "type": "Code", @@ -3850,310 +3993,2176 @@ "CREATING": 1, "READY": 2, "DELETING": 3, - "UPDATING": 4, - "SERVICE_UPDATING": 5 + "UPDATING": 4 } } } }, - "Authority": { + "Scope": { + "options": { + "(google.api.resource).type": "gkehub.googleapis.com/Scope", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/scopes/{scope}" + }, "fields": { - "issuer": { + "name": { "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } + "id": 1 }, - "workloadIdentityPool": { + "uid": { "type": "string", "id": 2, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "identityProvider": { - "type": "string", + "createTime": { + "type": "google.protobuf.Timestamp", "id": 3, "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } }, - "oidcJwks": { - "type": "bytes", + "updateTime": { + "type": "google.protobuf.Timestamp", "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleteTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "ScopeLifecycleState", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "namespaceLabels": { + "keyType": "string", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 9, "options": { "(google.api.field_behavior)": "OPTIONAL" } } } }, - "GkeHub": { + "ScopeLifecycleState": { + "fields": { + "code": { + "type": "Code", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Code": { + "values": { + "CODE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + "UPDATING": 4 + } + } + } + }, + "MembershipBinding": { "options": { - "(google.api.default_host)": "gkehub.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + "(google.api.resource).type": "gkehub.googleapis.com/MembershipBinding", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}" }, - "methods": { - "ListMemberships": { - "requestType": "ListMembershipsRequest", - "responseType": "ListMembershipsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/memberships", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/memberships" - } - }, - { - "(google.api.method_signature)": "parent" - } + "oneofs": { + "target": { + "oneof": [ + "scope" ] - }, - "ListFeatures": { - "requestType": "ListFeaturesRequest", - "responseType": "ListFeaturesResponse", + } + }, + "fields": { + "scope": { + "type": "string", + "id": 3, "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/features", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/features" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] + "(google.api.resource_reference).type": "gkehub.googleapis.com/Scope" + } }, - "GetMembership": { - "requestType": "GetMembershipRequest", - "responseType": "Membership", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/memberships/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/memberships/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "name": { + "type": "string", + "id": 1 }, - "GetFeature": { - "requestType": "GetFeatureRequest", - "responseType": "Feature", + "uid": { + "type": "string", + "id": 2, "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/features/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/features/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "CreateMembership": { - "requestType": "CreateMembershipRequest", - "responseType": "google.longrunning.Operation", + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/memberships", - "(google.api.http).body": "resource", - "(google.api.method_signature)": "parent,resource,membership_id", - "(google.longrunning.operation_info).response_type": "Membership", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/memberships", - "body": "resource" - } - }, - { - "(google.api.method_signature)": "parent,resource,membership_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Membership", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "CreateFeature": { - "requestType": "CreateFeatureRequest", - "responseType": "google.longrunning.Operation", + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/features", - "(google.api.http).body": "resource", - "(google.api.method_signature)": "parent,resource,feature_id", - "(google.longrunning.operation_info).response_type": "Feature", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/features", - "body": "resource" - } - }, - { - "(google.api.method_signature)": "parent,resource,feature_id" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Feature", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "DeleteMembership": { - "requestType": "DeleteMembershipRequest", - "responseType": "google.longrunning.Operation", + "deleteTime": { + "type": "google.protobuf.Timestamp", + "id": 7, "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/memberships/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/memberships/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "DeleteFeature": { - "requestType": "DeleteFeatureRequest", - "responseType": "google.longrunning.Operation", + "state": { + "type": "MembershipBindingLifecycleState", + "id": 8, "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/features/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/features/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, - "UpdateMembership": { - "requestType": "UpdateMembershipRequest", - "responseType": "google.longrunning.Operation", + "labels": { + "keyType": "string", + "type": "string", + "id": 9, "options": { - "(google.api.http).patch": "/v1/{name=projects/*/locations/*/memberships/*}", - "(google.api.http).body": "resource", - "(google.api.method_signature)": "name,resource,update_mask", - "(google.longrunning.operation_info).response_type": "Membership", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{name=projects/*/locations/*/memberships/*}", - "body": "resource" - } - }, - { - "(google.api.method_signature)": "name,resource,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Membership", - "metadata_type": "OperationMetadata" - } - } + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MembershipBindingLifecycleState": { + "fields": { + "code": { + "type": "Code", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Code": { + "values": { + "CODE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + "UPDATING": 4 + } + } + } + }, + "Membership": { + "options": { + "(google.api.resource).type": "gkehub.googleapis.com/Membership", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/memberships/{membership}" + }, + "oneofs": { + "type": { + "oneof": [ + "endpoint" ] + } + }, + "fields": { + "endpoint": { + "type": "MembershipEndpoint", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, - "UpdateFeature": { - "requestType": "UpdateFeatureRequest", - "responseType": "google.longrunning.Operation", + "name": { + "type": "string", + "id": 1, "options": { - "(google.api.http).patch": "/v1/{name=projects/*/locations/*/features/*}", - "(google.api.http).body": "resource", - "(google.api.method_signature)": "name,resource,update_mask", - "(google.longrunning.operation_info).response_type": "Feature", - "(google.longrunning.operation_info).metadata_type": "OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{name=projects/*/locations/*/features/*}", - "body": "resource" - } - }, - { - "(google.api.method_signature)": "name,resource,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Feature", - "metadata_type": "OperationMetadata" - } - } - ] + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "description": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "MembershipState", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "deleteTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "externalId": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "lastConnectionTime": { + "type": "google.protobuf.Timestamp", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "uniqueId": { + "type": "string", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "authority": { + "type": "Authority", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "monitoringConfig": { + "type": "MonitoringConfig", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MembershipEndpoint": { + "fields": { + "gkeCluster": { + "type": "GkeCluster", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "kubernetesMetadata": { + "type": "KubernetesMetadata", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "kubernetesResource": { + "type": "KubernetesResource", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "googleManaged": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "KubernetesResource": { + "fields": { + "membershipCrManifest": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, + "membershipResources": { + "rule": "repeated", + "type": "ResourceManifest", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "connectResources": { + "rule": "repeated", + "type": "ResourceManifest", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceOptions": { + "type": "ResourceOptions", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ResourceOptions": { + "fields": { + "connectVersion": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "v1beta1Crd": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "k8sVersion": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "k8sGitVersion": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ResourceManifest": { + "fields": { + "manifest": { + "type": "string", + "id": 1 + }, + "clusterScoped": { + "type": "bool", + "id": 2 + } + } + }, + "GkeCluster": { + "fields": { + "resourceLink": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "clusterMissing": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "KubernetesMetadata": { + "fields": { + "kubernetesApiServerVersion": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nodeProviderId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nodeCount": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "vcpuCount": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "memoryMb": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 100, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "MonitoringConfig": { + "fields": { + "projectId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "location": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "cluster": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "kubernetesMetricsPrefix": { + "type": "string", + "id": 4 + }, + "clusterHash": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + } + } + }, + "MembershipState": { + "fields": { + "code": { + "type": "Code", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "Code": { + "values": { + "CODE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2, + "DELETING": 3, + "UPDATING": 4, + "SERVICE_UPDATING": 5 + } + } + } + }, + "Authority": { + "fields": { + "issuer": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "workloadIdentityPool": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "identityProvider": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "oidcJwks": { + "type": "bytes", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GkeHub": { + "options": { + "(google.api.default_host)": "gkehub.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListMemberships": { + "requestType": "ListMembershipsRequest", + "responseType": "ListMembershipsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/memberships", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/memberships" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListBoundMemberships": { + "requestType": "ListBoundMembershipsRequest", + "responseType": "ListBoundMembershipsResponse", + "options": { + "(google.api.http).get": "/v1/{scope_name=projects/*/locations/*/scopes/*}:listMemberships", + "(google.api.method_signature)": "scope_name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{scope_name=projects/*/locations/*/scopes/*}:listMemberships" + } + }, + { + "(google.api.method_signature)": "scope_name" + } + ] + }, + "ListFeatures": { + "requestType": "ListFeaturesRequest", + "responseType": "ListFeaturesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/features", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/features" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetMembership": { + "requestType": "GetMembershipRequest", + "responseType": "Membership", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/memberships/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/memberships/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetFeature": { + "requestType": "GetFeatureRequest", + "responseType": "Feature", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/features/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/features/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateMembership": { + "requestType": "CreateMembershipRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/memberships", + "(google.api.http).body": "resource", + "(google.api.method_signature)": "parent,resource,membership_id", + "(google.longrunning.operation_info).response_type": "Membership", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/memberships", + "body": "resource" + } + }, + { + "(google.api.method_signature)": "parent,resource,membership_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Membership", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "CreateFeature": { + "requestType": "CreateFeatureRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/features", + "(google.api.http).body": "resource", + "(google.api.method_signature)": "parent,resource,feature_id", + "(google.longrunning.operation_info).response_type": "Feature", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/features", + "body": "resource" + } + }, + { + "(google.api.method_signature)": "parent,resource,feature_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Feature", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteMembership": { + "requestType": "DeleteMembershipRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/memberships/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/memberships/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteFeature": { + "requestType": "DeleteFeatureRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/features/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/features/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateMembership": { + "requestType": "UpdateMembershipRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{name=projects/*/locations/*/memberships/*}", + "(google.api.http).body": "resource", + "(google.api.method_signature)": "name,resource,update_mask", + "(google.longrunning.operation_info).response_type": "Membership", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{name=projects/*/locations/*/memberships/*}", + "body": "resource" + } + }, + { + "(google.api.method_signature)": "name,resource,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Membership", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateFeature": { + "requestType": "UpdateFeatureRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{name=projects/*/locations/*/features/*}", + "(google.api.http).body": "resource", + "(google.api.method_signature)": "name,resource,update_mask", + "(google.longrunning.operation_info).response_type": "Feature", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{name=projects/*/locations/*/features/*}", + "body": "resource" + } + }, + { + "(google.api.method_signature)": "name,resource,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Feature", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GenerateConnectManifest": { + "requestType": "GenerateConnectManifestRequest", + "responseType": "GenerateConnectManifestResponse", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest" + } + } + ] + }, + "CreateFleet": { + "requestType": "CreateFleetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/fleets", + "(google.api.http).body": "fleet", + "(google.api.method_signature)": "parent,fleet", + "(google.longrunning.operation_info).response_type": "Fleet", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/fleets", + "body": "fleet" + } + }, + { + "(google.api.method_signature)": "parent,fleet" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Fleet", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "GetFleet": { + "requestType": "GetFleetRequest", + "responseType": "Fleet", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/fleets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/fleets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateFleet": { + "requestType": "UpdateFleetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{fleet.name=projects/*/locations/*/fleets/*}", + "(google.api.http).body": "fleet", + "(google.api.method_signature)": "fleet,update_mask", + "(google.longrunning.operation_info).response_type": "Fleet", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{fleet.name=projects/*/locations/*/fleets/*}", + "body": "fleet" + } + }, + { + "(google.api.method_signature)": "fleet,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Fleet", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteFleet": { + "requestType": "DeleteFleetRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/fleets/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/fleets/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListFleets": { + "requestType": "ListFleetsRequest", + "responseType": "ListFleetsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/fleets", + "(google.api.http).additional_bindings.get": "/v1/{parent=organizations/*/locations/*}/fleets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/fleets", + "additional_bindings": { + "get": "/v1/{parent=organizations/*/locations/*}/fleets" + } + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetScopeNamespace": { + "requestType": "GetScopeNamespaceRequest", + "responseType": "Namespace", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateScopeNamespace": { + "requestType": "CreateScopeNamespaceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/scopes/*}/namespaces", + "(google.api.http).body": "scope_namespace", + "(google.api.method_signature)": "parent,scope_namespace,scope_namespace_id", + "(google.longrunning.operation_info).response_type": "Namespace", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/scopes/*}/namespaces", + "body": "scope_namespace" + } + }, + { + "(google.api.method_signature)": "parent,scope_namespace,scope_namespace_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Namespace", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateScopeNamespace": { + "requestType": "UpdateScopeNamespaceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{scope_namespace.name=projects/*/locations/*/scopes/*/namespaces/*}", + "(google.api.http).body": "scope_namespace", + "(google.api.method_signature)": "scope_namespace,update_mask", + "(google.longrunning.operation_info).response_type": "Namespace", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{scope_namespace.name=projects/*/locations/*/scopes/*/namespaces/*}", + "body": "scope_namespace" + } + }, + { + "(google.api.method_signature)": "scope_namespace,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Namespace", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteScopeNamespace": { + "requestType": "DeleteScopeNamespaceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/scopes/*/namespaces/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListScopeNamespaces": { + "requestType": "ListScopeNamespacesRequest", + "responseType": "ListScopeNamespacesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/scopes/*}/namespaces", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/scopes/*}/namespaces" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetScopeRBACRoleBinding": { + "requestType": "GetScopeRBACRoleBindingRequest", + "responseType": "RBACRoleBinding", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateScopeRBACRoleBinding": { + "requestType": "CreateScopeRBACRoleBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings", + "(google.api.http).body": "rbacrolebinding", + "(google.api.method_signature)": "parent,rbacrolebinding,rbacrolebinding_id", + "(google.longrunning.operation_info).response_type": "RBACRoleBinding", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings", + "body": "rbacrolebinding" + } + }, + { + "(google.api.method_signature)": "parent,rbacrolebinding,rbacrolebinding_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "RBACRoleBinding", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateScopeRBACRoleBinding": { + "requestType": "UpdateScopeRBACRoleBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{rbacrolebinding.name=projects/*/locations/*/scopes/*/rbacrolebindings/*}", + "(google.api.http).body": "rbacrolebinding", + "(google.api.method_signature)": "rbacrolebinding,update_mask", + "(google.longrunning.operation_info).response_type": "RBACRoleBinding", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{rbacrolebinding.name=projects/*/locations/*/scopes/*/rbacrolebindings/*}", + "body": "rbacrolebinding" + } + }, + { + "(google.api.method_signature)": "rbacrolebinding,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "RBACRoleBinding", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteScopeRBACRoleBinding": { + "requestType": "DeleteScopeRBACRoleBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/scopes/*/rbacrolebindings/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListScopeRBACRoleBindings": { + "requestType": "ListScopeRBACRoleBindingsRequest", + "responseType": "ListScopeRBACRoleBindingsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/scopes/*}/rbacrolebindings" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetScope": { + "requestType": "GetScopeRequest", + "responseType": "Scope", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/scopes/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/scopes/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateScope": { + "requestType": "CreateScopeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/scopes", + "(google.api.http).body": "scope", + "(google.api.method_signature)": "parent,scope,scope_id", + "(google.longrunning.operation_info).response_type": "Scope", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/scopes", + "body": "scope" + } + }, + { + "(google.api.method_signature)": "parent,scope,scope_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Scope", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateScope": { + "requestType": "UpdateScopeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{scope.name=projects/*/locations/*/scopes/*}", + "(google.api.http).body": "scope", + "(google.api.method_signature)": "scope,update_mask", + "(google.longrunning.operation_info).response_type": "Scope", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{scope.name=projects/*/locations/*/scopes/*}", + "body": "scope" + } + }, + { + "(google.api.method_signature)": "scope,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Scope", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteScope": { + "requestType": "DeleteScopeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/scopes/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/scopes/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListScopes": { + "requestType": "ListScopesRequest", + "responseType": "ListScopesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/scopes", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/scopes" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "ListPermittedScopes": { + "requestType": "ListPermittedScopesRequest", + "responseType": "ListPermittedScopesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/scopes:listPermitted", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/scopes:listPermitted" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetMembershipBinding": { + "requestType": "GetMembershipBindingRequest", + "responseType": "MembershipBinding", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/memberships/*/bindings/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/memberships/*/bindings/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateMembershipBinding": { + "requestType": "CreateMembershipBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/memberships/*}/bindings", + "(google.api.http).body": "membership_binding", + "(google.api.method_signature)": "parent,membership_binding,membership_binding_id", + "(google.longrunning.operation_info).response_type": "MembershipBinding", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/memberships/*}/bindings", + "body": "membership_binding" + } + }, + { + "(google.api.method_signature)": "parent,membership_binding,membership_binding_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "MembershipBinding", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateMembershipBinding": { + "requestType": "UpdateMembershipBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{membership_binding.name=projects/*/locations/*/memberships/*/bindings/*}", + "(google.api.http).body": "membership_binding", + "(google.api.method_signature)": "membership_binding,update_mask", + "(google.longrunning.operation_info).response_type": "MembershipBinding", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{membership_binding.name=projects/*/locations/*/memberships/*/bindings/*}", + "body": "membership_binding" + } + }, + { + "(google.api.method_signature)": "membership_binding,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "MembershipBinding", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteMembershipBinding": { + "requestType": "DeleteMembershipBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/memberships/*/bindings/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/memberships/*/bindings/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListMembershipBindings": { + "requestType": "ListMembershipBindingsRequest", + "responseType": "ListMembershipBindingsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/memberships/*}/bindings", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/memberships/*}/bindings" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GetMembershipRBACRoleBinding": { + "requestType": "GetMembershipRBACRoleBindingRequest", + "responseType": "RBACRoleBinding", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateMembershipRBACRoleBinding": { + "requestType": "CreateMembershipRBACRoleBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings", + "(google.api.http).body": "rbacrolebinding", + "(google.api.method_signature)": "parent,rbacrolebinding,rbacrolebinding_id", + "(google.longrunning.operation_info).response_type": "RBACRoleBinding", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings", + "body": "rbacrolebinding" + } + }, + { + "(google.api.method_signature)": "parent,rbacrolebinding,rbacrolebinding_id" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "RBACRoleBinding", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "UpdateMembershipRBACRoleBinding": { + "requestType": "UpdateMembershipRBACRoleBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{rbacrolebinding.name=projects/*/locations/*/memberships/*/rbacrolebindings/*}", + "(google.api.http).body": "rbacrolebinding", + "(google.api.method_signature)": "rbacrolebinding,update_mask", + "(google.longrunning.operation_info).response_type": "RBACRoleBinding", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{rbacrolebinding.name=projects/*/locations/*/memberships/*/rbacrolebindings/*}", + "body": "rbacrolebinding" + } + }, + { + "(google.api.method_signature)": "rbacrolebinding,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "RBACRoleBinding", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "DeleteMembershipRBACRoleBinding": { + "requestType": "DeleteMembershipRBACRoleBindingRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/memberships/*/rbacrolebindings/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "OperationMetadata" + } + } + ] + }, + "ListMembershipRBACRoleBindings": { + "requestType": "ListMembershipRBACRoleBindingsRequest", + "responseType": "ListMembershipRBACRoleBindingsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "GenerateMembershipRBACRoleBindingYAML": { + "requestType": "GenerateMembershipRBACRoleBindingYAMLRequest", + "responseType": "GenerateMembershipRBACRoleBindingYAMLResponse", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:generateMembershipRBACRoleBindingYAML", + "(google.api.http).body": "rbacrolebinding" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/memberships/*}/rbacrolebindings:generateMembershipRBACRoleBindingYAML", + "body": "rbacrolebinding" + } + } + ] + } + } + }, + "GetScopeNamespaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/Namespace" + } + } + } + }, + "CreateScopeNamespaceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkehub.googleapis.com/Namespace" + } + }, + "scopeNamespaceId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "scopeNamespace": { + "type": "Namespace", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateScopeNamespaceRequest": { + "fields": { + "scopeNamespace": { + "type": "Namespace", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteScopeNamespaceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/Namespace" + } + } + } + }, + "ListScopeNamespacesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkehub.googleapis.com/Namespace" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListScopeNamespacesResponse": { + "fields": { + "scopeNamespaces": { + "rule": "repeated", + "type": "Namespace", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetScopeRBACRoleBindingRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/RBACRoleBinding" + } + } + } + }, + "CreateScopeRBACRoleBindingRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkehub.googleapis.com/RBACRoleBinding" + } + }, + "rbacrolebindingId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rbacrolebinding": { + "type": "RBACRoleBinding", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateScopeRBACRoleBindingRequest": { + "fields": { + "rbacrolebinding": { + "type": "RBACRoleBinding", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteScopeRBACRoleBindingRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/RBACRoleBinding" + } + } + } + }, + "ListScopeRBACRoleBindingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkehub.googleapis.com/RBACRoleBinding" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListScopeRBACRoleBindingsResponse": { + "fields": { + "rbacrolebindings": { + "rule": "repeated", + "type": "RBACRoleBinding", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetScopeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/Scope" + } + } + } + }, + "CreateScopeRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkehub.googleapis.com/Scope" + } + }, + "scopeId": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "scope": { + "type": "Scope", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateScopeRequest": { + "fields": { + "scope": { + "type": "Scope", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteScopeRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/Scope" + } + } + } + }, + "ListScopesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkehub.googleapis.com/Scope" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListScopesResponse": { + "fields": { + "scopes": { + "rule": "repeated", + "type": "Scope", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListPermittedScopesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkehub.googleapis.com/Scope" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListPermittedScopesResponse": { + "fields": { + "scopes": { + "rule": "repeated", + "type": "Scope", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "GetMembershipBindingRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/MembershipBinding" + } + } + } + }, + "CreateMembershipBindingRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkehub.googleapis.com/MembershipBinding" + } + }, + "membershipBinding": { + "type": "MembershipBinding", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "membershipBindingId": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateMembershipBindingRequest": { + "fields": { + "membershipBinding": { + "type": "MembershipBinding", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteMembershipBindingRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/MembershipBinding" + } + } + } + }, + "ListMembershipBindingsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkehub.googleapis.com/MembershipBinding" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMembershipBindingsResponse": { + "fields": { + "membershipBindings": { + "rule": "repeated", + "type": "MembershipBinding", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "ListMembershipsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkehub.googleapis.com/Membership" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "orderBy": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "GetMembershipRBACRoleBindingRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/RBACRoleBinding" + } + } + } + }, + "CreateMembershipRBACRoleBindingRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "gkehub.googleapis.com/RBACRoleBinding" + } }, - "GenerateConnectManifest": { - "requestType": "GenerateConnectManifestRequest", - "responseType": "GenerateConnectManifestResponse", + "rbacrolebindingId": { + "type": "string", + "id": 2, "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest" - } - } - ] + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rbacrolebinding": { + "type": "RBACRoleBinding", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } } } }, - "ListMembershipsRequest": { + "UpdateMembershipRBACRoleBindingRequest": { + "fields": { + "rbacrolebinding": { + "type": "RBACRoleBinding", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteMembershipRBACRoleBindingRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/RBACRoleBinding" + } + } + } + }, + "ListMembershipRBACRoleBindingsRequest": { "fields": { "parent": { "type": "string", "id": 1, "options": { "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).child_type": "gkehub.googleapis.com/Membership" + "(google.api.resource_reference).child_type": "gkehub.googleapis.com/RBACRoleBinding" } }, "pageSize": { @@ -4169,23 +6178,61 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + } + } + }, + "ListMembershipRBACRoleBindingsResponse": { + "fields": { + "rbacrolebindings": { + "rule": "repeated", + "type": "RBACRoleBinding", + "id": 1 }, - "filter": { + "nextPageToken": { "type": "string", - "id": 4, + "id": 2 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "GenerateMembershipRBACRoleBindingYAMLRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/Membership" } }, - "orderBy": { + "rbacrolebindingId": { "type": "string", - "id": 5, + "id": 2, "options": { - "(google.api.field_behavior)": "OPTIONAL" + "(google.api.field_behavior)": "REQUIRED" + } + }, + "rbacrolebinding": { + "type": "RBACRoleBinding", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" } } } }, + "GenerateMembershipRBACRoleBindingYAMLResponse": { + "fields": { + "roleBindingsYaml": { + "type": "string", + "id": 1 + } + } + }, "ListMembershipsResponse": { "fields": { "resources": { @@ -4216,6 +6263,57 @@ } } }, + "ListBoundMembershipsRequest": { + "fields": { + "scopeName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/Scope" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListBoundMembershipsResponse": { + "fields": { + "memberships": { + "rule": "repeated", + "type": "Membership", + "id": 1 + }, + "unreachable": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nextPageToken": { + "type": "string", + "id": 3 + } + } + }, "CreateMembershipRequest": { "fields": { "parent": { @@ -4419,6 +6517,13 @@ "orderBy": { "type": "string", "id": 5 + }, + "returnPartialSuccess": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -4443,6 +6548,13 @@ "options": { "(google.api.resource_reference).type": "gkehub.googleapis.com/Feature" } + }, + "returnPartialSuccess": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -4514,6 +6626,106 @@ } } }, + "CreateFleetRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "fleet": { + "type": "Fleet", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetFleetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/Fleet" + } + } + } + }, + "UpdateFleetRequest": { + "fields": { + "fleet": { + "type": "Fleet", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteFleetRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "gkehub.googleapis.com/Fleet" + } + } + } + }, + "ListFleetsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "pageToken": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListFleetsResponse": { + "fields": { + "fleets": { + "rule": "repeated", + "type": "Fleet", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, "OperationMetadata": { "fields": { "createTime": { @@ -4658,6 +6870,35 @@ } } }, + "rbacrolebindingactuation": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.GkeHub.RbacRoleBindingActuation.V1", + "go_package": "cloud.google.com/go/gkehub/rbacrolebindingactuation/apiv1/rbacrolebindingactuationpb;rbacrolebindingactuationpb", + "java_multiple_files": true, + "java_outer_classname": "RBACRoleBindingActuationProto", + "java_package": "com.google.cloud.gkehub.rbacrolebindingactuation.v1", + "php_namespace": "Google\\Cloud\\GkeHub\\RbacRoleBindingActuation\\V1", + "ruby_package": "Google::Cloud::GkeHub::RbacRoleBindingActuation::V1" + }, + "nested": { + "FeatureSpec": { + "fields": { + "allowedCustomRoles": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "FeatureState": { + "fields": {} + } + } + } + } + }, "cloudauditlogging": { "nested": { "v1alpha": { diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_feature.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_feature.js index d324f079977..846c0f222f8 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_feature.js +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_feature.js @@ -42,7 +42,7 @@ function main() { */ // const resource = {} /** - * Optional. A request ID to identify requests. Specify a unique request ID + * A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server will guarantee * that for at least 60 minutes after the first request. diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_fleet.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_fleet.js new file mode 100644 index 00000000000..15b8db43d33 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_fleet.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, fleet) { + // [START gkehub_v1_generated_GkeHub_CreateFleet_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent (project and location) where the Fleet will be + * created. Specified in the format `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. The fleet to create. + */ + // const fleet = {} + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callCreateFleet() { + // Construct request + const request = { + parent, + fleet, + }; + + // Run request + const [operation] = await gkehubClient.createFleet(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateFleet(); + // [END gkehub_v1_generated_GkeHub_CreateFleet_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership_binding.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership_binding.js new file mode 100644 index 00000000000..a03ed3236a2 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership_binding.js @@ -0,0 +1,74 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, membershipBinding, membershipBindingId) { + // [START gkehub_v1_generated_GkeHub_CreateMembershipBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent (project and location) where the MembershipBinding + * will be created. Specified in the format + * `projects/* /locations/* /memberships/*`. + */ + // const parent = 'abc123' + /** + * Required. The MembershipBinding to create. + */ + // const membershipBinding = {} + /** + * Required. The ID to use for the MembershipBinding. + */ + // const membershipBindingId = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callCreateMembershipBinding() { + // Construct request + const request = { + parent, + membershipBinding, + membershipBindingId, + }; + + // Run request + const [operation] = await gkehubClient.createMembershipBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateMembershipBinding(); + // [END gkehub_v1_generated_GkeHub_CreateMembershipBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership_r_b_a_c_role_binding.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership_r_b_a_c_role_binding.js new file mode 100644 index 00000000000..0b5cec2677c --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership_r_b_a_c_role_binding.js @@ -0,0 +1,79 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, rbacrolebindingId, rbacrolebinding) { + // [START gkehub_v1_generated_GkeHub_CreateMembershipRBACRoleBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/* /locations/* /memberships/*`. + */ + // const parent = 'abc123' + /** + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + */ + // const rbacrolebindingId = 'abc123' + /** + * Required. The rbacrolebindings to create. + */ + // const rbacrolebinding = {} + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callCreateMembershipRBACRoleBinding() { + // Construct request + const request = { + parent, + rbacrolebindingId, + rbacrolebinding, + }; + + // Run request + const [operation] = await gkehubClient.createMembershipRBACRoleBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateMembershipRBACRoleBinding(); + // [END gkehub_v1_generated_GkeHub_CreateMembershipRBACRoleBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_scope.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_scope.js new file mode 100644 index 00000000000..8d57267baac --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_scope.js @@ -0,0 +1,74 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, scopeId, scope) { + // [START gkehub_v1_generated_GkeHub_CreateScope_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent (project and location) where the Scope will be + * created. Specified in the format `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Required. Client chosen ID for the Scope. `scope_id` must be a + * ???? + */ + // const scopeId = 'abc123' + /** + * Required. The Scope to create. + */ + // const scope = {} + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callCreateScope() { + // Construct request + const request = { + parent, + scopeId, + scope, + }; + + // Run request + const [operation] = await gkehubClient.createScope(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateScope(); + // [END gkehub_v1_generated_GkeHub_CreateScope_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_scope_namespace.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_scope_namespace.js new file mode 100644 index 00000000000..dff0efd078d --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_scope_namespace.js @@ -0,0 +1,79 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, scopeNamespaceId, scopeNamespace) { + // [START gkehub_v1_generated_GkeHub_CreateScopeNamespace_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent (project and location) where the Namespace will be + * created. Specified in the format `projects/* /locations/* /scopes/*`. + */ + // const parent = 'abc123' + /** + * Required. Client chosen ID for the Namespace. `namespace_id` must be a + * valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + */ + // const scopeNamespaceId = 'abc123' + /** + * Required. The fleet namespace to create. + */ + // const scopeNamespace = {} + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callCreateScopeNamespace() { + // Construct request + const request = { + parent, + scopeNamespaceId, + scopeNamespace, + }; + + // Run request + const [operation] = await gkehubClient.createScopeNamespace(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateScopeNamespace(); + // [END gkehub_v1_generated_GkeHub_CreateScopeNamespace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_scope_r_b_a_c_role_binding.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_scope_r_b_a_c_role_binding.js new file mode 100644 index 00000000000..6a935e6ce11 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_scope_r_b_a_c_role_binding.js @@ -0,0 +1,79 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, rbacrolebindingId, rbacrolebinding) { + // [START gkehub_v1_generated_GkeHub_CreateScopeRBACRoleBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/* /locations/* /scopes/*`. + */ + // const parent = 'abc123' + /** + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + */ + // const rbacrolebindingId = 'abc123' + /** + * Required. The rbacrolebindings to create. + */ + // const rbacrolebinding = {} + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callCreateScopeRBACRoleBinding() { + // Construct request + const request = { + parent, + rbacrolebindingId, + rbacrolebinding, + }; + + // Run request + const [operation] = await gkehubClient.createScopeRBACRoleBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateScopeRBACRoleBinding(); + // [END gkehub_v1_generated_GkeHub_CreateScopeRBACRoleBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_fleet.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_fleet.js new file mode 100644 index 00000000000..d79b6e79853 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_fleet.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkehub_v1_generated_GkeHub_DeleteFleet_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Fleet resource name in the format + * `projects/* /locations/* /fleets/*`. + */ + // const name = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callDeleteFleet() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await gkehubClient.deleteFleet(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteFleet(); + // [END gkehub_v1_generated_GkeHub_DeleteFleet_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership_binding.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership_binding.js new file mode 100644 index 00000000000..10197731412 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership_binding.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkehub_v1_generated_GkeHub_DeleteMembershipBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The MembershipBinding resource name in the format + * `projects/* /locations/* /memberships/* /bindings/*`. + */ + // const name = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callDeleteMembershipBinding() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await gkehubClient.deleteMembershipBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteMembershipBinding(); + // [END gkehub_v1_generated_GkeHub_DeleteMembershipBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership_r_b_a_c_role_binding.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership_r_b_a_c_role_binding.js new file mode 100644 index 00000000000..0138d3e20ea --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership_r_b_a_c_role_binding.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkehub_v1_generated_GkeHub_DeleteMembershipRBACRoleBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The RBACRoleBinding resource name in the format + * `projects/* /locations/* /memberships/* /rbacrolebindings/*`. + */ + // const name = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callDeleteMembershipRBACRoleBinding() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await gkehubClient.deleteMembershipRBACRoleBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteMembershipRBACRoleBinding(); + // [END gkehub_v1_generated_GkeHub_DeleteMembershipRBACRoleBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_scope.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_scope.js new file mode 100644 index 00000000000..50c4b84b3ca --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_scope.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkehub_v1_generated_GkeHub_DeleteScope_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Scope resource name in the format + * `projects/* /locations/* /scopes/*`. + */ + // const name = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callDeleteScope() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await gkehubClient.deleteScope(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteScope(); + // [END gkehub_v1_generated_GkeHub_DeleteScope_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_scope_namespace.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_scope_namespace.js new file mode 100644 index 00000000000..7f39e3eac53 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_scope_namespace.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkehub_v1_generated_GkeHub_DeleteScopeNamespace_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Namespace resource name in the format + * `projects/* /locations/* /scopes/* /namespaces/*`. + */ + // const name = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callDeleteScopeNamespace() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await gkehubClient.deleteScopeNamespace(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteScopeNamespace(); + // [END gkehub_v1_generated_GkeHub_DeleteScopeNamespace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_scope_r_b_a_c_role_binding.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_scope_r_b_a_c_role_binding.js new file mode 100644 index 00000000000..1fcba64b498 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_scope_r_b_a_c_role_binding.js @@ -0,0 +1,63 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkehub_v1_generated_GkeHub_DeleteScopeRBACRoleBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The RBACRoleBinding resource name in the format + * `projects/* /locations/* /scopes/* /rbacrolebindings/*`. + */ + // const name = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callDeleteScopeRBACRoleBinding() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await gkehubClient.deleteScopeRBACRoleBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteScopeRBACRoleBinding(); + // [END gkehub_v1_generated_GkeHub_DeleteScopeRBACRoleBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.generate_membership_r_b_a_c_role_binding_y_a_m_l.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.generate_membership_r_b_a_c_role_binding_y_a_m_l.js new file mode 100644 index 00000000000..a105c392bfe --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.generate_membership_r_b_a_c_role_binding_y_a_m_l.js @@ -0,0 +1,78 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, rbacrolebindingId, rbacrolebinding) { + // [START gkehub_v1_generated_GkeHub_GenerateMembershipRBACRoleBindingYAML_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/* /locations/* /memberships/*`. + */ + // const parent = 'abc123' + /** + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + */ + // const rbacrolebindingId = 'abc123' + /** + * Required. The rbacrolebindings to generate the YAML for. + */ + // const rbacrolebinding = {} + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callGenerateMembershipRBACRoleBindingYAML() { + // Construct request + const request = { + parent, + rbacrolebindingId, + rbacrolebinding, + }; + + // Run request + const response = await gkehubClient.generateMembershipRBACRoleBindingYAML(request); + console.log(response); + } + + callGenerateMembershipRBACRoleBindingYAML(); + // [END gkehub_v1_generated_GkeHub_GenerateMembershipRBACRoleBindingYAML_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_feature.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_feature.js index 5ec23d83570..3c1d93eae89 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_feature.js +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_feature.js @@ -33,6 +33,13 @@ function main() { * `projects/* /locations/* /features/*` */ // const name = 'abc123' + /** + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. + */ + // const returnPartialSuccess = true // Imports the Gkehub library const {GkeHubClient} = require('@google-cloud/gke-hub').v1; diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_fleet.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_fleet.js new file mode 100644 index 00000000000..1e8308a4163 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_fleet.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkehub_v1_generated_GkeHub_GetFleet_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Fleet resource name in the format + * `projects/* /locations/* /fleets/*`. + */ + // const name = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callGetFleet() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkehubClient.getFleet(request); + console.log(response); + } + + callGetFleet(); + // [END gkehub_v1_generated_GkeHub_GetFleet_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_membership_binding.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_membership_binding.js new file mode 100644 index 00000000000..cf4a516096b --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_membership_binding.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkehub_v1_generated_GkeHub_GetMembershipBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The MembershipBinding resource name in the format + * `projects/* /locations/* /memberships/* /bindings/*`. + */ + // const name = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callGetMembershipBinding() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkehubClient.getMembershipBinding(request); + console.log(response); + } + + callGetMembershipBinding(); + // [END gkehub_v1_generated_GkeHub_GetMembershipBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_membership_r_b_a_c_role_binding.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_membership_r_b_a_c_role_binding.js new file mode 100644 index 00000000000..d46da9845d6 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_membership_r_b_a_c_role_binding.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkehub_v1_generated_GkeHub_GetMembershipRBACRoleBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The RBACRoleBinding resource name in the format + * `projects/* /locations/* /memberships/* /rbacrolebindings/*`. + */ + // const name = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callGetMembershipRBACRoleBinding() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkehubClient.getMembershipRBACRoleBinding(request); + console.log(response); + } + + callGetMembershipRBACRoleBinding(); + // [END gkehub_v1_generated_GkeHub_GetMembershipRBACRoleBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_scope.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_scope.js new file mode 100644 index 00000000000..7b9b48bfb7e --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_scope.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkehub_v1_generated_GkeHub_GetScope_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Scope resource name in the format + * `projects/* /locations/* /scopes/*`. + */ + // const name = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callGetScope() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkehubClient.getScope(request); + console.log(response); + } + + callGetScope(); + // [END gkehub_v1_generated_GkeHub_GetScope_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_scope_namespace.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_scope_namespace.js new file mode 100644 index 00000000000..45cf1cf0f19 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_scope_namespace.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkehub_v1_generated_GkeHub_GetScopeNamespace_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Namespace resource name in the format + * `projects/* /locations/* /scopes/* /namespaces/*`. + */ + // const name = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callGetScopeNamespace() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkehubClient.getScopeNamespace(request); + console.log(response); + } + + callGetScopeNamespace(); + // [END gkehub_v1_generated_GkeHub_GetScopeNamespace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_scope_r_b_a_c_role_binding.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_scope_r_b_a_c_role_binding.js new file mode 100644 index 00000000000..f551d370ce8 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.get_scope_r_b_a_c_role_binding.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START gkehub_v1_generated_GkeHub_GetScopeRBACRoleBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The RBACRoleBinding resource name in the format + * `projects/* /locations/* /scopes/* /rbacrolebindings/*`. + */ + // const name = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callGetScopeRBACRoleBinding() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await gkehubClient.getScopeRBACRoleBinding(request); + console.log(response); + } + + callGetScopeRBACRoleBinding(); + // [END gkehub_v1_generated_GkeHub_GetScopeRBACRoleBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_bound_memberships.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_bound_memberships.js new file mode 100644 index 00000000000..c22a15bdb0f --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_bound_memberships.js @@ -0,0 +1,84 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(scopeName) { + // [START gkehub_v1_generated_GkeHub_ListBoundMemberships_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the Scope, in the format + * `projects/* /locations/global/scopes/*`, to which the Memberships are bound. + */ + // const scopeName = 'abc123' + /** + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. Currently, filtering + * can be done only based on Memberships's `name`, `labels`, `create_time`, + * `update_time`, and `unique_id`. + */ + // const filter = 'abc123' + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. Pagination is currently not supported; therefore, setting + * this field does not have any impact for now. + */ + // const pageSize = 1234 + /** + * Optional. Token returned by previous call to `ListBoundMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + */ + // const pageToken = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callListBoundMemberships() { + // Construct request + const request = { + scopeName, + }; + + // Run request + const iterable = gkehubClient.listBoundMembershipsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListBoundMemberships(); + // [END gkehub_v1_generated_GkeHub_ListBoundMemberships_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_features.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_features.js index 3f48f64aec0..7301d94a1e8 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_features.js +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_features.js @@ -62,6 +62,13 @@ function main() { * See https://google.aip.dev/132#ordering. */ // const orderBy = 'abc123' + /** + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. + */ + // const returnPartialSuccess = true // Imports the Gkehub library const {GkeHubClient} = require('@google-cloud/gke-hub').v1; diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_fleets.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_fleets.js new file mode 100644 index 00000000000..7c7f72b7fe6 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_fleets.js @@ -0,0 +1,77 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START gkehub_v1_generated_GkeHub_ListFleets_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The organization or project to list for Fleets under, in the + * format `organizations/* /locations/*` or `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. A page token, received from a previous `ListFleets` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListFleets` must match + * the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. The maximum number of fleets to return. The service may return + * fewer than this value. If unspecified, at most 200 fleets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callListFleets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = gkehubClient.listFleetsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListFleets(); + // [END gkehub_v1_generated_GkeHub_ListFleets_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_membership_bindings.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_membership_bindings.js new file mode 100644 index 00000000000..0672f46675c --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_membership_bindings.js @@ -0,0 +1,81 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START gkehub_v1_generated_GkeHub_ListMembershipBindings_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent Membership for which the MembershipBindings will be + * listed. Specified in the format `projects/* /locations/* /memberships/*`. + */ + // const parent = 'abc123' + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + */ + // const pageSize = 1234 + /** + * Optional. Token returned by previous call to `ListMembershipBindings` which + * specifies the position in the list from where to continue listing the + * resources. + */ + // const pageToken = 'abc123' + /** + * Optional. Lists MembershipBindings that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + */ + // const filter = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callListMembershipBindings() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = gkehubClient.listMembershipBindingsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMembershipBindings(); + // [END gkehub_v1_generated_GkeHub_ListMembershipBindings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_membership_r_b_a_c_role_bindings.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_membership_r_b_a_c_role_bindings.js new file mode 100644 index 00000000000..34816538528 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_membership_r_b_a_c_role_bindings.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START gkehub_v1_generated_GkeHub_ListMembershipRBACRoleBindings_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/* /locations/* /memberships/*`. + */ + // const parent = 'abc123' + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + */ + // const pageSize = 1234 + /** + * Optional. Token returned by previous call to + * `ListMembershipRBACRoleBindings` which specifies the position in the list + * from where to continue listing the resources. + */ + // const pageToken = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callListMembershipRBACRoleBindings() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = gkehubClient.listMembershipRBACRoleBindingsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMembershipRBACRoleBindings(); + // [END gkehub_v1_generated_GkeHub_ListMembershipRBACRoleBindings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_permitted_scopes.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_permitted_scopes.js new file mode 100644 index 00000000000..8b8479b2459 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_permitted_scopes.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START gkehub_v1_generated_GkeHub_ListPermittedScopes_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + */ + // const pageSize = 1234 + /** + * Optional. Token returned by previous call to `ListPermittedScopes` which + * specifies the position in the list from where to continue listing the + * resources. + */ + // const pageToken = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callListPermittedScopes() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = gkehubClient.listPermittedScopesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListPermittedScopes(); + // [END gkehub_v1_generated_GkeHub_ListPermittedScopes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_scope_namespaces.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_scope_namespaces.js new file mode 100644 index 00000000000..533d71b896d --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_scope_namespaces.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START gkehub_v1_generated_GkeHub_ListScopeNamespaces_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/* /locations/* /scopes/*`. + */ + // const parent = 'abc123' + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + */ + // const pageSize = 1234 + /** + * Optional. Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + */ + // const pageToken = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callListScopeNamespaces() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = gkehubClient.listScopeNamespacesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListScopeNamespaces(); + // [END gkehub_v1_generated_GkeHub_ListScopeNamespaces_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_scope_r_b_a_c_role_bindings.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_scope_r_b_a_c_role_bindings.js new file mode 100644 index 00000000000..ff57813f23c --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_scope_r_b_a_c_role_bindings.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START gkehub_v1_generated_GkeHub_ListScopeRBACRoleBindings_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/* /locations/* /scopes/*`. + */ + // const parent = 'abc123' + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + */ + // const pageSize = 1234 + /** + * Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + * which specifies the position in the list from where to continue listing the + * resources. + */ + // const pageToken = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callListScopeRBACRoleBindings() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = gkehubClient.listScopeRBACRoleBindingsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListScopeRBACRoleBindings(); + // [END gkehub_v1_generated_GkeHub_ListScopeRBACRoleBindings_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_scopes.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_scopes.js new file mode 100644 index 00000000000..514d22d1f07 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_scopes.js @@ -0,0 +1,76 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START gkehub_v1_generated_GkeHub_ListScopes_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/* /locations/*`. + */ + // const parent = 'abc123' + /** + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + */ + // const pageSize = 1234 + /** + * Optional. Token returned by previous call to `ListScopes` which + * specifies the position in the list from where to continue listing the + * resources. + */ + // const pageToken = 'abc123' + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callListScopes() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = gkehubClient.listScopesAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListScopes(); + // [END gkehub_v1_generated_GkeHub_ListScopes_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_feature.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_feature.js index ac715a01ea9..e36cf446bae 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_feature.js +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_feature.js @@ -49,7 +49,7 @@ function main() { */ // const resource = {} /** - * Optional. A request ID to identify requests. Specify a unique request ID + * A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server will guarantee * that for at least 60 minutes after the first request. diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_fleet.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_fleet.js new file mode 100644 index 00000000000..5575e6e526b --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_fleet.js @@ -0,0 +1,69 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(fleet, updateMask) { + // [START gkehub_v1_generated_GkeHub_UpdateFleet_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Fleet to update. + * The `name` field of the Fleet object identifies which fleet will be + * updated. + */ + // const fleet = {} + /** + * Required. The fields to be updated; + */ + // const updateMask = {} + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callUpdateFleet() { + // Construct request + const request = { + fleet, + updateMask, + }; + + // Run request + const [operation] = await gkehubClient.updateFleet(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateFleet(); + // [END gkehub_v1_generated_GkeHub_UpdateFleet_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_membership_binding.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_membership_binding.js new file mode 100644 index 00000000000..f6e0dd6e5b1 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_membership_binding.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(membershipBinding, updateMask) { + // [START gkehub_v1_generated_GkeHub_UpdateMembershipBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The MembershipBinding object with fields updated. + */ + // const membershipBinding = {} + /** + * Required. The fields to be updated. + */ + // const updateMask = {} + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callUpdateMembershipBinding() { + // Construct request + const request = { + membershipBinding, + updateMask, + }; + + // Run request + const [operation] = await gkehubClient.updateMembershipBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateMembershipBinding(); + // [END gkehub_v1_generated_GkeHub_UpdateMembershipBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_membership_r_b_a_c_role_binding.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_membership_r_b_a_c_role_binding.js new file mode 100644 index 00000000000..76dd23ea1b7 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_membership_r_b_a_c_role_binding.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(rbacrolebinding, updateMask) { + // [START gkehub_v1_generated_GkeHub_UpdateMembershipRBACRoleBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + */ + // const rbacrolebinding = {} + /** + * Required. The fields to be updated. + */ + // const updateMask = {} + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callUpdateMembershipRBACRoleBinding() { + // Construct request + const request = { + rbacrolebinding, + updateMask, + }; + + // Run request + const [operation] = await gkehubClient.updateMembershipRBACRoleBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateMembershipRBACRoleBinding(); + // [END gkehub_v1_generated_GkeHub_UpdateMembershipRBACRoleBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_scope.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_scope.js new file mode 100644 index 00000000000..cfec14f1664 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_scope.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(scope, updateMask) { + // [START gkehub_v1_generated_GkeHub_UpdateScope_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. A Scope with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. + */ + // const scope = {} + /** + * Required. The fields to be updated. + */ + // const updateMask = {} + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callUpdateScope() { + // Construct request + const request = { + scope, + updateMask, + }; + + // Run request + const [operation] = await gkehubClient.updateScope(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateScope(); + // [END gkehub_v1_generated_GkeHub_UpdateScope_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_scope_namespace.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_scope_namespace.js new file mode 100644 index 00000000000..1116bdf2c3b --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_scope_namespace.js @@ -0,0 +1,69 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(scopeNamespace, updateMask) { + // [START gkehub_v1_generated_GkeHub_UpdateScopeNamespace_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. A namespace with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. Given 'updated' + * prefix to follow go/proto-best-practices-checkers#keyword_conflict + */ + // const scopeNamespace = {} + /** + * Required. The fields to be updated. + */ + // const updateMask = {} + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callUpdateScopeNamespace() { + // Construct request + const request = { + scopeNamespace, + updateMask, + }; + + // Run request + const [operation] = await gkehubClient.updateScopeNamespace(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateScopeNamespace(); + // [END gkehub_v1_generated_GkeHub_UpdateScopeNamespace_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_scope_r_b_a_c_role_binding.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_scope_r_b_a_c_role_binding.js new file mode 100644 index 00000000000..65bbc529020 --- /dev/null +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.update_scope_r_b_a_c_role_binding.js @@ -0,0 +1,68 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(rbacrolebinding, updateMask) { + // [START gkehub_v1_generated_GkeHub_UpdateScopeRBACRoleBinding_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + */ + // const rbacrolebinding = {} + /** + * Required. The fields to be updated. + */ + // const updateMask = {} + + // Imports the Gkehub library + const {GkeHubClient} = require('@google-cloud/gke-hub').v1; + + // Instantiates a client + const gkehubClient = new GkeHubClient(); + + async function callUpdateScopeRBACRoleBinding() { + // Construct request + const request = { + rbacrolebinding, + updateMask, + }; + + // Run request + const [operation] = await gkehubClient.updateScopeRBACRoleBinding(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateScopeRBACRoleBinding(); + // [END gkehub_v1_generated_GkeHub_UpdateScopeRBACRoleBinding_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata_google.cloud.gkehub.v1.json b/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata_google.cloud.gkehub.v1.json index 70bea948783..ff3c561623f 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata_google.cloud.gkehub.v1.json +++ b/packages/google-cloud-gkehub/samples/generated/v1/snippet_metadata_google.cloud.gkehub.v1.json @@ -67,6 +67,58 @@ } } }, + { + "regionTag": "gkehub_v1_generated_GkeHub_ListBoundMemberships_async", + "title": "GkeHub listBoundMemberships Sample", + "origin": "API_DEFINITION", + "description": " Lists Memberships bound to a Scope. The response includes relevant Memberships from all regions.", + "canonical": true, + "file": "gke_hub.list_bound_memberships.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 76, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListBoundMemberships", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListBoundMemberships", + "async": true, + "parameters": [ + { + "name": "scope_name", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkehub.v1.ListBoundMembershipsResponse", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "ListBoundMemberships", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListBoundMemberships", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, { "regionTag": "gkehub_v1_generated_GkeHub_ListFeatures_async", "title": "GkeHub listFeatures Sample", @@ -78,7 +130,7 @@ "segments": [ { "start": 25, - "end": 84, + "end": 91, "type": "FULL" } ], @@ -106,6 +158,10 @@ { "name": "order_by", "type": "TYPE_STRING" + }, + { + "name": "return_partial_success", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.gkehub.v1.ListFeaturesResponse", @@ -174,7 +230,7 @@ "segments": [ { "start": 25, - "end": 53, + "end": 60, "type": "FULL" } ], @@ -186,6 +242,10 @@ { "name": "name", "type": "TYPE_STRING" + }, + { + "name": "return_partial_success", + "type": "TYPE_BOOL" } ], "resultType": ".google.cloud.gkehub.v1.Feature", @@ -570,6 +630,1422 @@ } } } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_CreateFleet_async", + "title": "GkeHub createFleet Sample", + "origin": "API_DEFINITION", + "description": " Creates a fleet.", + "canonical": true, + "file": "gke_hub.create_fleet.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateFleet", + "fullName": "google.cloud.gkehub.v1.GkeHub.CreateFleet", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "fleet", + "type": ".google.cloud.gkehub.v1.Fleet" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "CreateFleet", + "fullName": "google.cloud.gkehub.v1.GkeHub.CreateFleet", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_GetFleet_async", + "title": "GkeHub getFleet Sample", + "origin": "API_DEFINITION", + "description": " Returns the details of a fleet.", + "canonical": true, + "file": "gke_hub.get_fleet.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetFleet", + "fullName": "google.cloud.gkehub.v1.GkeHub.GetFleet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkehub.v1.Fleet", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "GetFleet", + "fullName": "google.cloud.gkehub.v1.GkeHub.GetFleet", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_UpdateFleet_async", + "title": "GkeHub updateFleet Sample", + "origin": "API_DEFINITION", + "description": " Updates a fleet.", + "canonical": true, + "file": "gke_hub.update_fleet.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateFleet", + "fullName": "google.cloud.gkehub.v1.GkeHub.UpdateFleet", + "async": true, + "parameters": [ + { + "name": "fleet", + "type": ".google.cloud.gkehub.v1.Fleet" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "UpdateFleet", + "fullName": "google.cloud.gkehub.v1.GkeHub.UpdateFleet", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_DeleteFleet_async", + "title": "GkeHub deleteFleet Sample", + "origin": "API_DEFINITION", + "description": " Removes a Fleet. There must be no memberships remaining in the Fleet.", + "canonical": true, + "file": "gke_hub.delete_fleet.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteFleet", + "fullName": "google.cloud.gkehub.v1.GkeHub.DeleteFleet", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "DeleteFleet", + "fullName": "google.cloud.gkehub.v1.GkeHub.DeleteFleet", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_ListFleets_async", + "title": "GkeHub listFleets Sample", + "origin": "API_DEFINITION", + "description": " Returns all fleets within an organization or a project that the caller has access to.", + "canonical": true, + "file": "gke_hub.list_fleets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListFleets", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListFleets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.gkehub.v1.ListFleetsResponse", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "ListFleets", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListFleets", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_GetScopeNamespace_async", + "title": "GkeHub getScopeNamespace Sample", + "origin": "API_DEFINITION", + "description": " Returns the details of a fleet namespace.", + "canonical": true, + "file": "gke_hub.get_scope_namespace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetScopeNamespace", + "fullName": "google.cloud.gkehub.v1.GkeHub.GetScopeNamespace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkehub.v1.Namespace", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "GetScopeNamespace", + "fullName": "google.cloud.gkehub.v1.GkeHub.GetScopeNamespace", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_CreateScopeNamespace_async", + "title": "GkeHub createScopeNamespace Sample", + "origin": "API_DEFINITION", + "description": " Creates a fleet namespace.", + "canonical": true, + "file": "gke_hub.create_scope_namespace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateScopeNamespace", + "fullName": "google.cloud.gkehub.v1.GkeHub.CreateScopeNamespace", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "scope_namespace_id", + "type": "TYPE_STRING" + }, + { + "name": "scope_namespace", + "type": ".google.cloud.gkehub.v1.Namespace" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "CreateScopeNamespace", + "fullName": "google.cloud.gkehub.v1.GkeHub.CreateScopeNamespace", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_UpdateScopeNamespace_async", + "title": "GkeHub updateScopeNamespace Sample", + "origin": "API_DEFINITION", + "description": " Updates a fleet namespace.", + "canonical": true, + "file": "gke_hub.update_scope_namespace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateScopeNamespace", + "fullName": "google.cloud.gkehub.v1.GkeHub.UpdateScopeNamespace", + "async": true, + "parameters": [ + { + "name": "scope_namespace", + "type": ".google.cloud.gkehub.v1.Namespace" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "UpdateScopeNamespace", + "fullName": "google.cloud.gkehub.v1.GkeHub.UpdateScopeNamespace", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_DeleteScopeNamespace_async", + "title": "GkeHub deleteScopeNamespace Sample", + "origin": "API_DEFINITION", + "description": " Deletes a fleet namespace.", + "canonical": true, + "file": "gke_hub.delete_scope_namespace.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteScopeNamespace", + "fullName": "google.cloud.gkehub.v1.GkeHub.DeleteScopeNamespace", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "DeleteScopeNamespace", + "fullName": "google.cloud.gkehub.v1.GkeHub.DeleteScopeNamespace", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_ListScopeNamespaces_async", + "title": "GkeHub listScopeNamespaces Sample", + "origin": "API_DEFINITION", + "description": " Lists fleet namespaces.", + "canonical": true, + "file": "gke_hub.list_scope_namespaces.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListScopeNamespaces", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListScopeNamespaces", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkehub.v1.ListScopeNamespacesResponse", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "ListScopeNamespaces", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListScopeNamespaces", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_GetScopeRBACRoleBinding_async", + "title": "GkeHub getScopeRBACRoleBinding Sample", + "origin": "API_DEFINITION", + "description": " Returns the details of a Scope RBACRoleBinding.", + "canonical": true, + "file": "gke_hub.get_scope_r_b_a_c_role_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetScopeRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.GetScopeRBACRoleBinding", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkehub.v1.RBACRoleBinding", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "GetScopeRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.GetScopeRBACRoleBinding", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_CreateScopeRBACRoleBinding_async", + "title": "GkeHub createScopeRBACRoleBinding Sample", + "origin": "API_DEFINITION", + "description": " Creates a Scope RBACRoleBinding.", + "canonical": true, + "file": "gke_hub.create_scope_r_b_a_c_role_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateScopeRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.CreateScopeRBACRoleBinding", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "rbacrolebinding_id", + "type": "TYPE_STRING" + }, + { + "name": "rbacrolebinding", + "type": ".google.cloud.gkehub.v1.RBACRoleBinding" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "CreateScopeRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.CreateScopeRBACRoleBinding", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_UpdateScopeRBACRoleBinding_async", + "title": "GkeHub updateScopeRBACRoleBinding Sample", + "origin": "API_DEFINITION", + "description": " Updates a Scope RBACRoleBinding.", + "canonical": true, + "file": "gke_hub.update_scope_r_b_a_c_role_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateScopeRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.UpdateScopeRBACRoleBinding", + "async": true, + "parameters": [ + { + "name": "rbacrolebinding", + "type": ".google.cloud.gkehub.v1.RBACRoleBinding" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "UpdateScopeRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.UpdateScopeRBACRoleBinding", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_DeleteScopeRBACRoleBinding_async", + "title": "GkeHub deleteScopeRBACRoleBinding Sample", + "origin": "API_DEFINITION", + "description": " Deletes a Scope RBACRoleBinding.", + "canonical": true, + "file": "gke_hub.delete_scope_r_b_a_c_role_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteScopeRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.DeleteScopeRBACRoleBinding", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "DeleteScopeRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.DeleteScopeRBACRoleBinding", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_ListScopeRBACRoleBindings_async", + "title": "GkeHub listScopeRBACRoleBindings Sample", + "origin": "API_DEFINITION", + "description": " Lists all Scope RBACRoleBindings.", + "canonical": true, + "file": "gke_hub.list_scope_r_b_a_c_role_bindings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListScopeRBACRoleBindings", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListScopeRBACRoleBindings", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkehub.v1.ListScopeRBACRoleBindingsResponse", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "ListScopeRBACRoleBindings", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListScopeRBACRoleBindings", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_GetScope_async", + "title": "GkeHub getScope Sample", + "origin": "API_DEFINITION", + "description": " Returns the details of a Scope.", + "canonical": true, + "file": "gke_hub.get_scope.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetScope", + "fullName": "google.cloud.gkehub.v1.GkeHub.GetScope", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkehub.v1.Scope", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "GetScope", + "fullName": "google.cloud.gkehub.v1.GkeHub.GetScope", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_CreateScope_async", + "title": "GkeHub createScope Sample", + "origin": "API_DEFINITION", + "description": " Creates a Scope.", + "canonical": true, + "file": "gke_hub.create_scope.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateScope", + "fullName": "google.cloud.gkehub.v1.GkeHub.CreateScope", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "scope_id", + "type": "TYPE_STRING" + }, + { + "name": "scope", + "type": ".google.cloud.gkehub.v1.Scope" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "CreateScope", + "fullName": "google.cloud.gkehub.v1.GkeHub.CreateScope", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_UpdateScope_async", + "title": "GkeHub updateScope Sample", + "origin": "API_DEFINITION", + "description": " Updates a scopes.", + "canonical": true, + "file": "gke_hub.update_scope.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateScope", + "fullName": "google.cloud.gkehub.v1.GkeHub.UpdateScope", + "async": true, + "parameters": [ + { + "name": "scope", + "type": ".google.cloud.gkehub.v1.Scope" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "UpdateScope", + "fullName": "google.cloud.gkehub.v1.GkeHub.UpdateScope", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_DeleteScope_async", + "title": "GkeHub deleteScope Sample", + "origin": "API_DEFINITION", + "description": " Deletes a Scope.", + "canonical": true, + "file": "gke_hub.delete_scope.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteScope", + "fullName": "google.cloud.gkehub.v1.GkeHub.DeleteScope", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "DeleteScope", + "fullName": "google.cloud.gkehub.v1.GkeHub.DeleteScope", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_ListScopes_async", + "title": "GkeHub listScopes Sample", + "origin": "API_DEFINITION", + "description": " Lists Scopes.", + "canonical": true, + "file": "gke_hub.list_scopes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListScopes", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListScopes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkehub.v1.ListScopesResponse", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "ListScopes", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListScopes", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_ListPermittedScopes_async", + "title": "GkeHub listPermittedScopes Sample", + "origin": "API_DEFINITION", + "description": " Lists permitted Scopes.", + "canonical": true, + "file": "gke_hub.list_permitted_scopes.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListPermittedScopes", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListPermittedScopes", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkehub.v1.ListPermittedScopesResponse", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "ListPermittedScopes", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListPermittedScopes", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_GetMembershipBinding_async", + "title": "GkeHub getMembershipBinding Sample", + "origin": "API_DEFINITION", + "description": " Returns the details of a MembershipBinding.", + "canonical": true, + "file": "gke_hub.get_membership_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMembershipBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.GetMembershipBinding", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkehub.v1.MembershipBinding", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "GetMembershipBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.GetMembershipBinding", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_CreateMembershipBinding_async", + "title": "GkeHub createMembershipBinding Sample", + "origin": "API_DEFINITION", + "description": " Creates a MembershipBinding.", + "canonical": true, + "file": "gke_hub.create_membership_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateMembershipBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.CreateMembershipBinding", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "membership_binding", + "type": ".google.cloud.gkehub.v1.MembershipBinding" + }, + { + "name": "membership_binding_id", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "CreateMembershipBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.CreateMembershipBinding", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_UpdateMembershipBinding_async", + "title": "GkeHub updateMembershipBinding Sample", + "origin": "API_DEFINITION", + "description": " Updates a MembershipBinding.", + "canonical": true, + "file": "gke_hub.update_membership_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateMembershipBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.UpdateMembershipBinding", + "async": true, + "parameters": [ + { + "name": "membership_binding", + "type": ".google.cloud.gkehub.v1.MembershipBinding" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "UpdateMembershipBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.UpdateMembershipBinding", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_DeleteMembershipBinding_async", + "title": "GkeHub deleteMembershipBinding Sample", + "origin": "API_DEFINITION", + "description": " Deletes a MembershipBinding.", + "canonical": true, + "file": "gke_hub.delete_membership_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteMembershipBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.DeleteMembershipBinding", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "DeleteMembershipBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.DeleteMembershipBinding", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_ListMembershipBindings_async", + "title": "GkeHub listMembershipBindings Sample", + "origin": "API_DEFINITION", + "description": " Lists MembershipBindings.", + "canonical": true, + "file": "gke_hub.list_membership_bindings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 73, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMembershipBindings", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListMembershipBindings", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkehub.v1.ListMembershipBindingsResponse", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "ListMembershipBindings", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListMembershipBindings", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_GetMembershipRBACRoleBinding_async", + "title": "GkeHub getMembershipRBACRoleBinding Sample", + "origin": "API_DEFINITION", + "description": " Returns the details of a Membership RBACRoleBinding.", + "canonical": true, + "file": "gke_hub.get_membership_r_b_a_c_role_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMembershipRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.GetMembershipRBACRoleBinding", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkehub.v1.RBACRoleBinding", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "GetMembershipRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.GetMembershipRBACRoleBinding", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_CreateMembershipRBACRoleBinding_async", + "title": "GkeHub createMembershipRBACRoleBinding Sample", + "origin": "API_DEFINITION", + "description": " Creates a Membership RBACRoleBinding.", + "canonical": true, + "file": "gke_hub.create_membership_r_b_a_c_role_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateMembershipRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.CreateMembershipRBACRoleBinding", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "rbacrolebinding_id", + "type": "TYPE_STRING" + }, + { + "name": "rbacrolebinding", + "type": ".google.cloud.gkehub.v1.RBACRoleBinding" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "CreateMembershipRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.CreateMembershipRBACRoleBinding", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_UpdateMembershipRBACRoleBinding_async", + "title": "GkeHub updateMembershipRBACRoleBinding Sample", + "origin": "API_DEFINITION", + "description": " Updates a Membership RBACRoleBinding.", + "canonical": true, + "file": "gke_hub.update_membership_r_b_a_c_role_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 60, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateMembershipRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.UpdateMembershipRBACRoleBinding", + "async": true, + "parameters": [ + { + "name": "rbacrolebinding", + "type": ".google.cloud.gkehub.v1.RBACRoleBinding" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "UpdateMembershipRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.UpdateMembershipRBACRoleBinding", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_DeleteMembershipRBACRoleBinding_async", + "title": "GkeHub deleteMembershipRBACRoleBinding Sample", + "origin": "API_DEFINITION", + "description": " Deletes a Membership RBACRoleBinding.", + "canonical": true, + "file": "gke_hub.delete_membership_r_b_a_c_role_binding.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteMembershipRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.DeleteMembershipRBACRoleBinding", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "DeleteMembershipRBACRoleBinding", + "fullName": "google.cloud.gkehub.v1.GkeHub.DeleteMembershipRBACRoleBinding", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_ListMembershipRBACRoleBindings_async", + "title": "GkeHub listMembershipRBACRoleBindings Sample", + "origin": "API_DEFINITION", + "description": " Lists all Membership RBACRoleBindings.", + "canonical": true, + "file": "gke_hub.list_membership_r_b_a_c_role_bindings.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMembershipRBACRoleBindings", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListMembershipRBACRoleBindings", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsResponse", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "ListMembershipRBACRoleBindings", + "fullName": "google.cloud.gkehub.v1.GkeHub.ListMembershipRBACRoleBindings", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } + }, + { + "regionTag": "gkehub_v1_generated_GkeHub_GenerateMembershipRBACRoleBindingYAML_async", + "title": "GkeHub generateMembershipRBACRoleBindingYAML Sample", + "origin": "API_DEFINITION", + "description": " Generates a YAML of the RBAC policies for the specified RoleBinding and its associated impersonation resources.", + "canonical": true, + "file": "gke_hub.generate_membership_r_b_a_c_role_binding_y_a_m_l.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GenerateMembershipRBACRoleBindingYAML", + "fullName": "google.cloud.gkehub.v1.GkeHub.GenerateMembershipRBACRoleBindingYAML", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "rbacrolebinding_id", + "type": "TYPE_STRING" + }, + { + "name": "rbacrolebinding", + "type": ".google.cloud.gkehub.v1.RBACRoleBinding" + } + ], + "resultType": ".google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse", + "client": { + "shortName": "GkeHubClient", + "fullName": "google.cloud.gkehub.v1.GkeHubClient" + }, + "method": { + "shortName": "GenerateMembershipRBACRoleBindingYAML", + "fullName": "google.cloud.gkehub.v1.GkeHub.GenerateMembershipRBACRoleBindingYAML", + "service": { + "shortName": "GkeHub", + "fullName": "google.cloud.gkehub.v1.GkeHub" + } + } + } } ] } diff --git a/packages/google-cloud-gkehub/src/v1/gapic_metadata.json b/packages/google-cloud-gkehub/src/v1/gapic_metadata.json index d63689a48a5..79258ee44b7 100644 --- a/packages/google-cloud-gkehub/src/v1/gapic_metadata.json +++ b/packages/google-cloud-gkehub/src/v1/gapic_metadata.json @@ -25,6 +25,41 @@ "generateConnectManifest" ] }, + "GetFleet": { + "methods": [ + "getFleet" + ] + }, + "GetScopeNamespace": { + "methods": [ + "getScopeNamespace" + ] + }, + "GetScopeRBACRoleBinding": { + "methods": [ + "getScopeRBACRoleBinding" + ] + }, + "GetScope": { + "methods": [ + "getScope" + ] + }, + "GetMembershipBinding": { + "methods": [ + "getMembershipBinding" + ] + }, + "GetMembershipRBACRoleBinding": { + "methods": [ + "getMembershipRBACRoleBinding" + ] + }, + "GenerateMembershipRBACRoleBindingYAML": { + "methods": [ + "generateMembershipRBACRoleBindingYAML" + ] + }, "CreateMembership": { "methods": [ "createMembership" @@ -55,6 +90,96 @@ "updateFeature" ] }, + "CreateFleet": { + "methods": [ + "createFleet" + ] + }, + "UpdateFleet": { + "methods": [ + "updateFleet" + ] + }, + "DeleteFleet": { + "methods": [ + "deleteFleet" + ] + }, + "CreateScopeNamespace": { + "methods": [ + "createScopeNamespace" + ] + }, + "UpdateScopeNamespace": { + "methods": [ + "updateScopeNamespace" + ] + }, + "DeleteScopeNamespace": { + "methods": [ + "deleteScopeNamespace" + ] + }, + "CreateScopeRBACRoleBinding": { + "methods": [ + "createScopeRBACRoleBinding" + ] + }, + "UpdateScopeRBACRoleBinding": { + "methods": [ + "updateScopeRBACRoleBinding" + ] + }, + "DeleteScopeRBACRoleBinding": { + "methods": [ + "deleteScopeRBACRoleBinding" + ] + }, + "CreateScope": { + "methods": [ + "createScope" + ] + }, + "UpdateScope": { + "methods": [ + "updateScope" + ] + }, + "DeleteScope": { + "methods": [ + "deleteScope" + ] + }, + "CreateMembershipBinding": { + "methods": [ + "createMembershipBinding" + ] + }, + "UpdateMembershipBinding": { + "methods": [ + "updateMembershipBinding" + ] + }, + "DeleteMembershipBinding": { + "methods": [ + "deleteMembershipBinding" + ] + }, + "CreateMembershipRBACRoleBinding": { + "methods": [ + "createMembershipRBACRoleBinding" + ] + }, + "UpdateMembershipRBACRoleBinding": { + "methods": [ + "updateMembershipRBACRoleBinding" + ] + }, + "DeleteMembershipRBACRoleBinding": { + "methods": [ + "deleteMembershipRBACRoleBinding" + ] + }, "ListMemberships": { "methods": [ "listMemberships", @@ -62,12 +187,68 @@ "listMembershipsAsync" ] }, + "ListBoundMemberships": { + "methods": [ + "listBoundMemberships", + "listBoundMembershipsStream", + "listBoundMembershipsAsync" + ] + }, "ListFeatures": { "methods": [ "listFeatures", "listFeaturesStream", "listFeaturesAsync" ] + }, + "ListFleets": { + "methods": [ + "listFleets", + "listFleetsStream", + "listFleetsAsync" + ] + }, + "ListScopeNamespaces": { + "methods": [ + "listScopeNamespaces", + "listScopeNamespacesStream", + "listScopeNamespacesAsync" + ] + }, + "ListScopeRBACRoleBindings": { + "methods": [ + "listScopeRBACRoleBindings", + "listScopeRBACRoleBindingsStream", + "listScopeRBACRoleBindingsAsync" + ] + }, + "ListScopes": { + "methods": [ + "listScopes", + "listScopesStream", + "listScopesAsync" + ] + }, + "ListPermittedScopes": { + "methods": [ + "listPermittedScopes", + "listPermittedScopesStream", + "listPermittedScopesAsync" + ] + }, + "ListMembershipBindings": { + "methods": [ + "listMembershipBindings", + "listMembershipBindingsStream", + "listMembershipBindingsAsync" + ] + }, + "ListMembershipRBACRoleBindings": { + "methods": [ + "listMembershipRBACRoleBindings", + "listMembershipRBACRoleBindingsStream", + "listMembershipRBACRoleBindingsAsync" + ] } } }, @@ -89,6 +270,41 @@ "generateConnectManifest" ] }, + "GetFleet": { + "methods": [ + "getFleet" + ] + }, + "GetScopeNamespace": { + "methods": [ + "getScopeNamespace" + ] + }, + "GetScopeRBACRoleBinding": { + "methods": [ + "getScopeRBACRoleBinding" + ] + }, + "GetScope": { + "methods": [ + "getScope" + ] + }, + "GetMembershipBinding": { + "methods": [ + "getMembershipBinding" + ] + }, + "GetMembershipRBACRoleBinding": { + "methods": [ + "getMembershipRBACRoleBinding" + ] + }, + "GenerateMembershipRBACRoleBindingYAML": { + "methods": [ + "generateMembershipRBACRoleBindingYAML" + ] + }, "CreateMembership": { "methods": [ "createMembership" @@ -119,6 +335,96 @@ "updateFeature" ] }, + "CreateFleet": { + "methods": [ + "createFleet" + ] + }, + "UpdateFleet": { + "methods": [ + "updateFleet" + ] + }, + "DeleteFleet": { + "methods": [ + "deleteFleet" + ] + }, + "CreateScopeNamespace": { + "methods": [ + "createScopeNamespace" + ] + }, + "UpdateScopeNamespace": { + "methods": [ + "updateScopeNamespace" + ] + }, + "DeleteScopeNamespace": { + "methods": [ + "deleteScopeNamespace" + ] + }, + "CreateScopeRBACRoleBinding": { + "methods": [ + "createScopeRBACRoleBinding" + ] + }, + "UpdateScopeRBACRoleBinding": { + "methods": [ + "updateScopeRBACRoleBinding" + ] + }, + "DeleteScopeRBACRoleBinding": { + "methods": [ + "deleteScopeRBACRoleBinding" + ] + }, + "CreateScope": { + "methods": [ + "createScope" + ] + }, + "UpdateScope": { + "methods": [ + "updateScope" + ] + }, + "DeleteScope": { + "methods": [ + "deleteScope" + ] + }, + "CreateMembershipBinding": { + "methods": [ + "createMembershipBinding" + ] + }, + "UpdateMembershipBinding": { + "methods": [ + "updateMembershipBinding" + ] + }, + "DeleteMembershipBinding": { + "methods": [ + "deleteMembershipBinding" + ] + }, + "CreateMembershipRBACRoleBinding": { + "methods": [ + "createMembershipRBACRoleBinding" + ] + }, + "UpdateMembershipRBACRoleBinding": { + "methods": [ + "updateMembershipRBACRoleBinding" + ] + }, + "DeleteMembershipRBACRoleBinding": { + "methods": [ + "deleteMembershipRBACRoleBinding" + ] + }, "ListMemberships": { "methods": [ "listMemberships", @@ -126,12 +432,68 @@ "listMembershipsAsync" ] }, + "ListBoundMemberships": { + "methods": [ + "listBoundMemberships", + "listBoundMembershipsStream", + "listBoundMembershipsAsync" + ] + }, "ListFeatures": { "methods": [ "listFeatures", "listFeaturesStream", "listFeaturesAsync" ] + }, + "ListFleets": { + "methods": [ + "listFleets", + "listFleetsStream", + "listFleetsAsync" + ] + }, + "ListScopeNamespaces": { + "methods": [ + "listScopeNamespaces", + "listScopeNamespacesStream", + "listScopeNamespacesAsync" + ] + }, + "ListScopeRBACRoleBindings": { + "methods": [ + "listScopeRBACRoleBindings", + "listScopeRBACRoleBindingsStream", + "listScopeRBACRoleBindingsAsync" + ] + }, + "ListScopes": { + "methods": [ + "listScopes", + "listScopesStream", + "listScopesAsync" + ] + }, + "ListPermittedScopes": { + "methods": [ + "listPermittedScopes", + "listPermittedScopesStream", + "listPermittedScopesAsync" + ] + }, + "ListMembershipBindings": { + "methods": [ + "listMembershipBindings", + "listMembershipBindingsStream", + "listMembershipBindingsAsync" + ] + }, + "ListMembershipRBACRoleBindings": { + "methods": [ + "listMembershipRBACRoleBindings", + "listMembershipRBACRoleBindingsStream", + "listMembershipRBACRoleBindingsAsync" + ] } } } diff --git a/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts b/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts index 022b2b12b7e..e107b4508a9 100644 --- a/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts +++ b/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts @@ -203,9 +203,30 @@ export class GkeHubClient { membershipPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/memberships/{membership}' ), + membershipBindingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/memberships/{membership}/bindings/{membershipbinding}' + ), + namespacePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/scopes/{scope}/namespaces/{namespace}' + ), + organizationLocationFleetPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/locations/{location}/fleets/{fleet}' + ), projectPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}' ), + projectLocationFleetPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/fleets/{fleet}' + ), + projectLocationMembershipRbacrolebindingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/memberships/{membership}/rbacrolebindings/{rbacrolebinding}' + ), + projectLocationScopeRbacrolebindingPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/scopes/{scope}/rbacrolebindings/{rbacrolebinding}' + ), + scopePathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/scopes/{scope}' + ), }; // Some of the methods on this service return "paged" results, @@ -214,8 +235,24 @@ export class GkeHubClient { this.descriptors.page = { listMemberships: new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resources'), + listBoundMemberships: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'memberships'), listFeatures: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resources') + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'resources'), + listFleets: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'fleets'), + listScopeNamespaces: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'scopeNamespaces'), + listScopeRBACRoleBindings: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'rbacrolebindings'), + listScopes: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'scopes'), + listPermittedScopes: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'scopes'), + listMembershipBindings: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'membershipBindings'), + listMembershipRBACRoleBindings: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'rbacrolebindings') }; const protoFilesRoot = this._gaxModule.protobufFromJSON(jsonProtos); @@ -258,6 +295,78 @@ export class GkeHubClient { '.google.cloud.gkehub.v1.Feature') as gax.protobuf.Type; const updateFeatureMetadata = protoFilesRoot.lookup( '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const createFleetResponse = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.Fleet') as gax.protobuf.Type; + const createFleetMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const updateFleetResponse = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.Fleet') as gax.protobuf.Type; + const updateFleetMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const deleteFleetResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteFleetMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const createScopeNamespaceResponse = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.Namespace') as gax.protobuf.Type; + const createScopeNamespaceMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const updateScopeNamespaceResponse = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.Namespace') as gax.protobuf.Type; + const updateScopeNamespaceMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const deleteScopeNamespaceResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteScopeNamespaceMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const createScopeRBACRoleBindingResponse = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.RBACRoleBinding') as gax.protobuf.Type; + const createScopeRBACRoleBindingMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const updateScopeRBACRoleBindingResponse = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.RBACRoleBinding') as gax.protobuf.Type; + const updateScopeRBACRoleBindingMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const deleteScopeRBACRoleBindingResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteScopeRBACRoleBindingMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const createScopeResponse = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.Scope') as gax.protobuf.Type; + const createScopeMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const updateScopeResponse = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.Scope') as gax.protobuf.Type; + const updateScopeMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const deleteScopeResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteScopeMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const createMembershipBindingResponse = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.MembershipBinding') as gax.protobuf.Type; + const createMembershipBindingMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const updateMembershipBindingResponse = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.MembershipBinding') as gax.protobuf.Type; + const updateMembershipBindingMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const deleteMembershipBindingResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteMembershipBindingMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const createMembershipRBACRoleBindingResponse = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.RBACRoleBinding') as gax.protobuf.Type; + const createMembershipRBACRoleBindingMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const updateMembershipRBACRoleBindingResponse = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.RBACRoleBinding') as gax.protobuf.Type; + const updateMembershipRBACRoleBindingMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; + const deleteMembershipRBACRoleBindingResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteMembershipRBACRoleBindingMetadata = protoFilesRoot.lookup( + '.google.cloud.gkehub.v1.OperationMetadata') as gax.protobuf.Type; this.descriptors.longrunning = { createMembership: new this._gaxModule.LongrunningDescriptor( @@ -283,7 +392,79 @@ export class GkeHubClient { updateFeature: new this._gaxModule.LongrunningDescriptor( this.operationsClient, updateFeatureResponse.decode.bind(updateFeatureResponse), - updateFeatureMetadata.decode.bind(updateFeatureMetadata)) + updateFeatureMetadata.decode.bind(updateFeatureMetadata)), + createFleet: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createFleetResponse.decode.bind(createFleetResponse), + createFleetMetadata.decode.bind(createFleetMetadata)), + updateFleet: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateFleetResponse.decode.bind(updateFleetResponse), + updateFleetMetadata.decode.bind(updateFleetMetadata)), + deleteFleet: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteFleetResponse.decode.bind(deleteFleetResponse), + deleteFleetMetadata.decode.bind(deleteFleetMetadata)), + createScopeNamespace: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createScopeNamespaceResponse.decode.bind(createScopeNamespaceResponse), + createScopeNamespaceMetadata.decode.bind(createScopeNamespaceMetadata)), + updateScopeNamespace: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateScopeNamespaceResponse.decode.bind(updateScopeNamespaceResponse), + updateScopeNamespaceMetadata.decode.bind(updateScopeNamespaceMetadata)), + deleteScopeNamespace: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteScopeNamespaceResponse.decode.bind(deleteScopeNamespaceResponse), + deleteScopeNamespaceMetadata.decode.bind(deleteScopeNamespaceMetadata)), + createScopeRBACRoleBinding: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createScopeRBACRoleBindingResponse.decode.bind(createScopeRBACRoleBindingResponse), + createScopeRBACRoleBindingMetadata.decode.bind(createScopeRBACRoleBindingMetadata)), + updateScopeRBACRoleBinding: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateScopeRBACRoleBindingResponse.decode.bind(updateScopeRBACRoleBindingResponse), + updateScopeRBACRoleBindingMetadata.decode.bind(updateScopeRBACRoleBindingMetadata)), + deleteScopeRBACRoleBinding: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteScopeRBACRoleBindingResponse.decode.bind(deleteScopeRBACRoleBindingResponse), + deleteScopeRBACRoleBindingMetadata.decode.bind(deleteScopeRBACRoleBindingMetadata)), + createScope: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createScopeResponse.decode.bind(createScopeResponse), + createScopeMetadata.decode.bind(createScopeMetadata)), + updateScope: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateScopeResponse.decode.bind(updateScopeResponse), + updateScopeMetadata.decode.bind(updateScopeMetadata)), + deleteScope: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteScopeResponse.decode.bind(deleteScopeResponse), + deleteScopeMetadata.decode.bind(deleteScopeMetadata)), + createMembershipBinding: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createMembershipBindingResponse.decode.bind(createMembershipBindingResponse), + createMembershipBindingMetadata.decode.bind(createMembershipBindingMetadata)), + updateMembershipBinding: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateMembershipBindingResponse.decode.bind(updateMembershipBindingResponse), + updateMembershipBindingMetadata.decode.bind(updateMembershipBindingMetadata)), + deleteMembershipBinding: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteMembershipBindingResponse.decode.bind(deleteMembershipBindingResponse), + deleteMembershipBindingMetadata.decode.bind(deleteMembershipBindingMetadata)), + createMembershipRBACRoleBinding: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createMembershipRBACRoleBindingResponse.decode.bind(createMembershipRBACRoleBindingResponse), + createMembershipRBACRoleBindingMetadata.decode.bind(createMembershipRBACRoleBindingMetadata)), + updateMembershipRBACRoleBinding: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateMembershipRBACRoleBindingResponse.decode.bind(updateMembershipRBACRoleBindingResponse), + updateMembershipRBACRoleBindingMetadata.decode.bind(updateMembershipRBACRoleBindingMetadata)), + deleteMembershipRBACRoleBinding: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteMembershipRBACRoleBindingResponse.decode.bind(deleteMembershipRBACRoleBindingResponse), + deleteMembershipRBACRoleBindingMetadata.decode.bind(deleteMembershipRBACRoleBindingMetadata)) }; // Put together the default options sent with requests. @@ -329,7 +510,7 @@ export class GkeHubClient { // Iterate over each of the methods that the service provides // and create an API call method for each. const gkeHubStubMethods = - ['listMemberships', 'listFeatures', 'getMembership', 'getFeature', 'createMembership', 'createFeature', 'deleteMembership', 'deleteFeature', 'updateMembership', 'updateFeature', 'generateConnectManifest']; + ['listMemberships', 'listBoundMemberships', 'listFeatures', 'getMembership', 'getFeature', 'createMembership', 'createFeature', 'deleteMembership', 'deleteFeature', 'updateMembership', 'updateFeature', 'generateConnectManifest', 'createFleet', 'getFleet', 'updateFleet', 'deleteFleet', 'listFleets', 'getScopeNamespace', 'createScopeNamespace', 'updateScopeNamespace', 'deleteScopeNamespace', 'listScopeNamespaces', 'getScopeRbacRoleBinding', 'createScopeRbacRoleBinding', 'updateScopeRbacRoleBinding', 'deleteScopeRbacRoleBinding', 'listScopeRbacRoleBindings', 'getScope', 'createScope', 'updateScope', 'deleteScope', 'listScopes', 'listPermittedScopes', 'getMembershipBinding', 'createMembershipBinding', 'updateMembershipBinding', 'deleteMembershipBinding', 'listMembershipBindings', 'getMembershipRbacRoleBinding', 'createMembershipRbacRoleBinding', 'updateMembershipRbacRoleBinding', 'deleteMembershipRbacRoleBinding', 'listMembershipRbacRoleBindings', 'generateMembershipRbacRoleBindingYamL']; for (const methodName of gkeHubStubMethods) { const callPromise = this.gkeHubStub.then( stub => (...args: Array<{}>) => { @@ -536,6 +717,11 @@ export class GkeHubClient { * @param {string} request.name * Required. The Feature resource name in the format * `projects/* /locations/* /features/*` + * @param {boolean} [request.returnPartialSuccess] + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -745,89 +931,56 @@ export class GkeHubClient { throw error; }); } - /** - * Creates a new Membership. - * - * **This is currently only supported for GKE clusters on Google Cloud**. - * To register other clusters, follow the instructions at - * https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. + * Returns the details of a fleet. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent (project and location) where the Memberships will be - * created. Specified in the format `projects/* /locations/*`. - * @param {string} request.membershipId - * Required. Client chosen ID for the membership. `membership_id` must be a - * valid RFC 1123 compliant DNS label: - * - * 1. At most 63 characters in length - * 2. It must consist of lower case alphanumeric characters or `-` - * 3. It must start and end with an alphanumeric character - * - * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, - * with a maximum length of 63 characters. - * @param {google.cloud.gkehub.v1.Membership} request.resource - * Required. The membership to create. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). + * @param {string} request.name + * Required. The Fleet resource name in the format + * `projects/* /locations/* /fleets/*`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.gkehub.v1.Fleet|Fleet}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/gke_hub.create_membership.js - * region_tag:gkehub_v1_generated_GkeHub_CreateMembership_async + * @example include:samples/generated/v1/gke_hub.get_fleet.js + * region_tag:gkehub_v1_generated_GkeHub_GetFleet_async */ - createMembership( - request?: protos.google.cloud.gkehub.v1.ICreateMembershipRequest, + getFleet( + request?: protos.google.cloud.gkehub.v1.IGetFleetRequest, options?: CallOptions): Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined + protos.google.cloud.gkehub.v1.IFleet, + protos.google.cloud.gkehub.v1.IGetFleetRequest|undefined, {}|undefined ]>; - createMembership( - request: protos.google.cloud.gkehub.v1.ICreateMembershipRequest, + getFleet( + request: protos.google.cloud.gkehub.v1.IGetFleetRequest, options: CallOptions, callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IFleet, + protos.google.cloud.gkehub.v1.IGetFleetRequest|null|undefined, {}|null|undefined>): void; - createMembership( - request: protos.google.cloud.gkehub.v1.ICreateMembershipRequest, + getFleet( + request: protos.google.cloud.gkehub.v1.IGetFleetRequest, callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IFleet, + protos.google.cloud.gkehub.v1.IGetFleetRequest|null|undefined, {}|null|undefined>): void; - createMembership( - request?: protos.google.cloud.gkehub.v1.ICreateMembershipRequest, + getFleet( + request?: protos.google.cloud.gkehub.v1.IGetFleetRequest, optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IFleet, + protos.google.cloud.gkehub.v1.IGetFleetRequest|null|undefined, {}|null|undefined>, callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IFleet, + protos.google.cloud.gkehub.v1.IGetFleetRequest|null|undefined, {}|null|undefined>): Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined + protos.google.cloud.gkehub.v1.IFleet, + protos.google.cloud.gkehub.v1.IGetFleetRequest|undefined, {}|undefined ]>|void { request = request || {}; let options: CallOptions; @@ -844,116 +997,85 @@ export class GkeHubClient { options.otherArgs.headers[ 'x-goog-request-params' ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', + 'name': request.name ?? '', }); this.initialize().catch(err => {throw err}); + this._log.info('getFleet request %j', request); const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createMembership response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. + protos.google.cloud.gkehub.v1.IFleet, + protos.google.cloud.gkehub.v1.IGetFleetRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getFleet response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. } : undefined; - this._log.info('createMembership request %j', request); - return this.innerApiCalls.createMembership(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createMembership response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `createMembership()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/gke_hub.create_membership.js - * region_tag:gkehub_v1_generated_GkeHub_CreateMembership_async - */ - async checkCreateMembershipProgress(name: string): Promise>{ - this._log.info('createMembership long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createMembership, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; + return this.innerApiCalls.getFleet(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.gkehub.v1.IFleet, + protos.google.cloud.gkehub.v1.IGetFleetRequest|undefined, + {}|undefined + ]) => { + this._log.info('getFleet response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); } /** - * Adds a new Feature. + * Returns the details of a fleet namespace. * * @param {Object} request * The request object that will be sent. - * @param {string} request.parent - * Required. The parent (project and location) where the Feature will be - * created. Specified in the format `projects/* /locations/*`. - * @param {string} request.featureId - * The ID of the feature to create. - * @param {google.cloud.gkehub.v1.Feature} request.resource - * The Feature resource to create. - * @param {string} request.requestId - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). + * @param {string} request.name + * Required. The Namespace resource name in the format + * `projects/* /locations/* /scopes/* /namespaces/*`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.gkehub.v1.Namespace|Namespace}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/gke_hub.create_feature.js - * region_tag:gkehub_v1_generated_GkeHub_CreateFeature_async + * @example include:samples/generated/v1/gke_hub.get_scope_namespace.js + * region_tag:gkehub_v1_generated_GkeHub_GetScopeNamespace_async */ - createFeature( - request?: protos.google.cloud.gkehub.v1.ICreateFeatureRequest, + getScopeNamespace( + request?: protos.google.cloud.gkehub.v1.IGetScopeNamespaceRequest, options?: CallOptions): Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined + protos.google.cloud.gkehub.v1.INamespace, + protos.google.cloud.gkehub.v1.IGetScopeNamespaceRequest|undefined, {}|undefined ]>; - createFeature( - request: protos.google.cloud.gkehub.v1.ICreateFeatureRequest, + getScopeNamespace( + request: protos.google.cloud.gkehub.v1.IGetScopeNamespaceRequest, options: CallOptions, callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.INamespace, + protos.google.cloud.gkehub.v1.IGetScopeNamespaceRequest|null|undefined, {}|null|undefined>): void; - createFeature( - request: protos.google.cloud.gkehub.v1.ICreateFeatureRequest, + getScopeNamespace( + request: protos.google.cloud.gkehub.v1.IGetScopeNamespaceRequest, callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.INamespace, + protos.google.cloud.gkehub.v1.IGetScopeNamespaceRequest|null|undefined, {}|null|undefined>): void; - createFeature( - request?: protos.google.cloud.gkehub.v1.ICreateFeatureRequest, + getScopeNamespace( + request?: protos.google.cloud.gkehub.v1.IGetScopeNamespaceRequest, optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.INamespace, + protos.google.cloud.gkehub.v1.IGetScopeNamespaceRequest|null|undefined, {}|null|undefined>, callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.INamespace, + protos.google.cloud.gkehub.v1.IGetScopeNamespaceRequest|null|undefined, {}|null|undefined>): Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined + protos.google.cloud.gkehub.v1.INamespace, + protos.google.cloud.gkehub.v1.IGetScopeNamespaceRequest|undefined, {}|undefined ]>|void { request = request || {}; let options: CallOptions; @@ -970,120 +1092,85 @@ export class GkeHubClient { options.otherArgs.headers[ 'x-goog-request-params' ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', + 'name': request.name ?? '', }); this.initialize().catch(err => {throw err}); + this._log.info('getScopeNamespace request %j', request); const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('createFeature response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. + protos.google.cloud.gkehub.v1.INamespace, + protos.google.cloud.gkehub.v1.IGetScopeNamespaceRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getScopeNamespace response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. } : undefined; - this._log.info('createFeature request %j', request); - return this.innerApiCalls.createFeature(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('createFeature response %j', rawResponse); - return [response, rawResponse, _]; - }); + return this.innerApiCalls.getScopeNamespace(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.gkehub.v1.INamespace, + protos.google.cloud.gkehub.v1.IGetScopeNamespaceRequest|undefined, + {}|undefined + ]) => { + this._log.info('getScopeNamespace response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); } /** - * Check the status of the long running operation returned by `createFeature()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/gke_hub.create_feature.js - * region_tag:gkehub_v1_generated_GkeHub_CreateFeature_async - */ - async checkCreateFeatureProgress(name: string): Promise>{ - this._log.info('createFeature long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createFeature, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Removes a Membership. - * - * **This is currently only supported for GKE clusters on Google Cloud**. - * To unregister other clusters, follow the instructions at - * https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. + * Returns the details of a Scope RBACRoleBinding. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The Membership resource name in the format - * `projects/* /locations/* /memberships/*`. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). - * @param {boolean} [request.force] - * Optional. If set to true, any subresource from this Membership will also be - * deleted. Otherwise, the request will only work if the Membership has no - * subresource. + * Required. The RBACRoleBinding resource name in the format + * `projects/* /locations/* /scopes/* /rbacrolebindings/*`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.gkehub.v1.RBACRoleBinding|RBACRoleBinding}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/gke_hub.delete_membership.js - * region_tag:gkehub_v1_generated_GkeHub_DeleteMembership_async + * @example include:samples/generated/v1/gke_hub.get_scope_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_GetScopeRBACRoleBinding_async */ - deleteMembership( - request?: protos.google.cloud.gkehub.v1.IDeleteMembershipRequest, + getScopeRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest, options?: CallOptions): Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest|undefined, {}|undefined ]>; - deleteMembership( - request: protos.google.cloud.gkehub.v1.IDeleteMembershipRequest, + getScopeRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest, options: CallOptions, callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest|null|undefined, {}|null|undefined>): void; - deleteMembership( - request: protos.google.cloud.gkehub.v1.IDeleteMembershipRequest, + getScopeRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest, callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest|null|undefined, {}|null|undefined>): void; - deleteMembership( - request?: protos.google.cloud.gkehub.v1.IDeleteMembershipRequest, + getScopeRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest, optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest|null|undefined, {}|null|undefined>, callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest|null|undefined, {}|null|undefined>): Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest|undefined, {}|undefined ]>|void { request = request || {}; let options: CallOptions; @@ -1103,113 +1190,82 @@ export class GkeHubClient { 'name': request.name ?? '', }); this.initialize().catch(err => {throw err}); + this._log.info('getScopeRBACRoleBinding request %j', request); const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteMembership response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getScopeRBACRoleBinding response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. } : undefined; - this._log.info('deleteMembership request %j', request); - return this.innerApiCalls.deleteMembership(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteMembership response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteMembership()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/gke_hub.delete_membership.js - * region_tag:gkehub_v1_generated_GkeHub_DeleteMembership_async - */ - async checkDeleteMembershipProgress(name: string): Promise>{ - this._log.info('deleteMembership long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteMembership, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; + return this.innerApiCalls.getScopeRbacRoleBinding(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetScopeRBACRoleBindingRequest|undefined, + {}|undefined + ]) => { + this._log.info('getScopeRBACRoleBinding response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); } /** - * Removes a Feature. + * Returns the details of a Scope. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The Feature resource name in the format - * `projects/* /locations/* /features/*`. - * @param {boolean} request.force - * If set to true, the delete will ignore any outstanding resources for - * this Feature (that is, `FeatureState.has_resources` is set to true). These - * resources will NOT be cleaned up or modified in any way. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). + * Required. The Scope resource name in the format + * `projects/* /locations/* /scopes/*`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.gkehub.v1.Scope|Scope}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/gke_hub.delete_feature.js - * region_tag:gkehub_v1_generated_GkeHub_DeleteFeature_async + * @example include:samples/generated/v1/gke_hub.get_scope.js + * region_tag:gkehub_v1_generated_GkeHub_GetScope_async */ - deleteFeature( - request?: protos.google.cloud.gkehub.v1.IDeleteFeatureRequest, + getScope( + request?: protos.google.cloud.gkehub.v1.IGetScopeRequest, options?: CallOptions): Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined + protos.google.cloud.gkehub.v1.IScope, + protos.google.cloud.gkehub.v1.IGetScopeRequest|undefined, {}|undefined ]>; - deleteFeature( - request: protos.google.cloud.gkehub.v1.IDeleteFeatureRequest, + getScope( + request: protos.google.cloud.gkehub.v1.IGetScopeRequest, options: CallOptions, callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IScope, + protos.google.cloud.gkehub.v1.IGetScopeRequest|null|undefined, {}|null|undefined>): void; - deleteFeature( - request: protos.google.cloud.gkehub.v1.IDeleteFeatureRequest, + getScope( + request: protos.google.cloud.gkehub.v1.IGetScopeRequest, callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IScope, + protos.google.cloud.gkehub.v1.IGetScopeRequest|null|undefined, {}|null|undefined>): void; - deleteFeature( - request?: protos.google.cloud.gkehub.v1.IDeleteFeatureRequest, + getScope( + request?: protos.google.cloud.gkehub.v1.IGetScopeRequest, optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IScope, + protos.google.cloud.gkehub.v1.IGetScopeRequest|null|undefined, {}|null|undefined>, callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IScope, + protos.google.cloud.gkehub.v1.IGetScopeRequest|null|undefined, {}|null|undefined>): Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined + protos.google.cloud.gkehub.v1.IScope, + protos.google.cloud.gkehub.v1.IGetScopeRequest|undefined, {}|undefined ]>|void { request = request || {}; let options: CallOptions; @@ -1229,120 +1285,82 @@ export class GkeHubClient { 'name': request.name ?? '', }); this.initialize().catch(err => {throw err}); + this._log.info('getScope request %j', request); const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('deleteFeature response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. + protos.google.cloud.gkehub.v1.IScope, + protos.google.cloud.gkehub.v1.IGetScopeRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getScope response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. } : undefined; - this._log.info('deleteFeature request %j', request); - return this.innerApiCalls.deleteFeature(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('deleteFeature response %j', rawResponse); - return [response, rawResponse, _]; - }); - } -/** - * Check the status of the long running operation returned by `deleteFeature()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/gke_hub.delete_feature.js - * region_tag:gkehub_v1_generated_GkeHub_DeleteFeature_async - */ - async checkDeleteFeatureProgress(name: string): Promise>{ - this._log.info('deleteFeature long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteFeature, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; + return this.innerApiCalls.getScope(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.gkehub.v1.IScope, + protos.google.cloud.gkehub.v1.IGetScopeRequest|undefined, + {}|undefined + ]) => { + this._log.info('getScope response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); } /** - * Updates an existing Membership. + * Returns the details of a MembershipBinding. * * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The Membership resource name in the format - * `projects/* /locations/* /memberships/*`. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. Mask of fields to update. - * @param {google.cloud.gkehub.v1.Membership} request.resource - * Required. Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * @param {string} [request.requestId] - * Optional. A request ID to identify requests. Specify a unique request ID - * so that if you must retry your request, the server will know to ignore - * the request if it has already been completed. The server will guarantee - * that for at least 60 minutes after the first request. - * - * For example, consider a situation where you make an initial request and - * the request times out. If you make the request again with the same request - * ID, the server can check if original operation with the same request ID - * was received, and if so, will ignore the second request. This prevents - * clients from accidentally creating duplicate commitments. - * - * The request ID must be a valid UUID with the exception that zero UUID is - * not supported (00000000-0000-0000-0000-000000000000). + * Required. The MembershipBinding resource name in the format + * `projects/* /locations/* /memberships/* /bindings/*`. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * The first element of the array is an object representing {@link protos.google.cloud.gkehub.v1.MembershipBinding|MembershipBinding}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/gke_hub.update_membership.js - * region_tag:gkehub_v1_generated_GkeHub_UpdateMembership_async + * @example include:samples/generated/v1/gke_hub.get_membership_binding.js + * region_tag:gkehub_v1_generated_GkeHub_GetMembershipBinding_async */ - updateMembership( - request?: protos.google.cloud.gkehub.v1.IUpdateMembershipRequest, + getMembershipBinding( + request?: protos.google.cloud.gkehub.v1.IGetMembershipBindingRequest, options?: CallOptions): Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined + protos.google.cloud.gkehub.v1.IMembershipBinding, + protos.google.cloud.gkehub.v1.IGetMembershipBindingRequest|undefined, {}|undefined ]>; - updateMembership( - request: protos.google.cloud.gkehub.v1.IUpdateMembershipRequest, + getMembershipBinding( + request: protos.google.cloud.gkehub.v1.IGetMembershipBindingRequest, options: CallOptions, callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IMembershipBinding, + protos.google.cloud.gkehub.v1.IGetMembershipBindingRequest|null|undefined, {}|null|undefined>): void; - updateMembership( - request: protos.google.cloud.gkehub.v1.IUpdateMembershipRequest, + getMembershipBinding( + request: protos.google.cloud.gkehub.v1.IGetMembershipBindingRequest, callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IMembershipBinding, + protos.google.cloud.gkehub.v1.IGetMembershipBindingRequest|null|undefined, {}|null|undefined>): void; - updateMembership( - request?: protos.google.cloud.gkehub.v1.IUpdateMembershipRequest, + getMembershipBinding( + request?: protos.google.cloud.gkehub.v1.IGetMembershipBindingRequest, optionsOrCallback?: CallOptions|Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IMembershipBinding, + protos.google.cloud.gkehub.v1.IGetMembershipBindingRequest|null|undefined, {}|null|undefined>, callback?: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, + protos.google.cloud.gkehub.v1.IMembershipBinding, + protos.google.cloud.gkehub.v1.IGetMembershipBindingRequest|null|undefined, {}|null|undefined>): Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined + protos.google.cloud.gkehub.v1.IMembershipBinding, + protos.google.cloud.gkehub.v1.IGetMembershipBindingRequest|undefined, {}|undefined ]>|void { request = request || {}; let options: CallOptions; @@ -1362,63 +1380,261 @@ export class GkeHubClient { 'name': request.name ?? '', }); this.initialize().catch(err => {throw err}); + this._log.info('getMembershipBinding request %j', request); const wrappedCallback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>|undefined = callback - ? (error, response, rawResponse, _) => { - this._log.info('updateMembership response %j', rawResponse); - callback!(error, response, rawResponse, _); // We verified callback above. + protos.google.cloud.gkehub.v1.IMembershipBinding, + protos.google.cloud.gkehub.v1.IGetMembershipBindingRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMembershipBinding response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. } : undefined; - this._log.info('updateMembership request %j', request); - return this.innerApiCalls.updateMembership(request, options, wrappedCallback) - ?.then(([response, rawResponse, _]: [ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]) => { - this._log.info('updateMembership response %j', rawResponse); - return [response, rawResponse, _]; + return this.innerApiCalls.getMembershipBinding(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.gkehub.v1.IMembershipBinding, + protos.google.cloud.gkehub.v1.IGetMembershipBindingRequest|undefined, + {}|undefined + ]) => { + this._log.info('getMembershipBinding response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); + } +/** + * Returns the details of a Membership RBACRoleBinding. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The RBACRoleBinding resource name in the format + * `projects/* /locations/* /memberships/* /rbacrolebindings/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.gkehub.v1.RBACRoleBinding|RBACRoleBinding}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.get_membership_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_GetMembershipRBACRoleBinding_async + */ + getMembershipRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest|undefined, {}|undefined + ]>; + getMembershipRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest|null|undefined, + {}|null|undefined>): void; + getMembershipRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest, + callback: Callback< + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest|null|undefined, + {}|null|undefined>): void; + getMembershipRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', }); + this.initialize().catch(err => {throw err}); + this._log.info('getMembershipRBACRoleBinding request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMembershipRBACRoleBinding response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.getMembershipRbacRoleBinding(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.gkehub.v1.IRBACRoleBinding, + protos.google.cloud.gkehub.v1.IGetMembershipRBACRoleBindingRequest|undefined, + {}|undefined + ]) => { + this._log.info('getMembershipRBACRoleBinding response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); } /** - * Check the status of the long running operation returned by `updateMembership()`. - * @param {String} name - * The operation name that will be passed. - * @returns {Promise} - The promise which resolves to an object. - * The decoded operation object has result and metadata field to get information from. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * Generates a YAML of the RBAC policies for the specified + * RoleBinding and its associated impersonation resources. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/* /locations/* /memberships/*`. + * @param {string} request.rbacrolebindingId + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @param {google.cloud.gkehub.v1.RBACRoleBinding} request.rbacrolebinding + * Required. The rbacrolebindings to generate the YAML for. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse|GenerateMembershipRBACRoleBindingYAMLResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } * for more details and examples. - * @example include:samples/generated/v1/gke_hub.update_membership.js - * region_tag:gkehub_v1_generated_GkeHub_UpdateMembership_async + * @example include:samples/generated/v1/gke_hub.generate_membership_r_b_a_c_role_binding_y_a_m_l.js + * region_tag:gkehub_v1_generated_GkeHub_GenerateMembershipRBACRoleBindingYAML_async */ - async checkUpdateMembershipProgress(name: string): Promise>{ - this._log.info('updateMembership long-running'); - const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); - const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateMembership, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; + generateMembershipRBACRoleBindingYAML( + request?: protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse, + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest|undefined, {}|undefined + ]>; + generateMembershipRBACRoleBindingYAML( + request: protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse, + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest|null|undefined, + {}|null|undefined>): void; + generateMembershipRBACRoleBindingYAML( + request: protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest, + callback: Callback< + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse, + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest|null|undefined, + {}|null|undefined>): void; + generateMembershipRBACRoleBindingYAML( + request?: protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse, + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse, + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse, + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + this._log.info('generateMembershipRBACRoleBindingYAML request %j', request); + const wrappedCallback: Callback< + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse, + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('generateMembershipRBACRoleBindingYAML response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls.generateMembershipRbacRoleBindingYamL(request, options, wrappedCallback) + ?.then(([response, options, rawResponse]: [ + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse, + protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLRequest|undefined, + {}|undefined + ]) => { + this._log.info('generateMembershipRBACRoleBindingYAML response %j', response); + return [response, options, rawResponse]; + }).catch((error: any) => { + if (error && 'statusDetails' in error && error.statusDetails instanceof Array) { + const protos = this._gaxModule.protobuf.Root.fromJSON(jsonProtos) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray(error.statusDetails, protos); + } + throw error; + }); } + /** - * Updates an existing Feature. + * Creates a new Membership. + * + * **This is currently only supported for GKE clusters on Google Cloud**. + * To register other clusters, follow the instructions at + * https://cloud.google.com/anthos/multicluster-management/connect/registering-a-cluster. * * @param {Object} request * The request object that will be sent. - * @param {string} request.name - * Required. The Feature resource name in the format - * `projects/* /locations/* /features/*`. - * @param {google.protobuf.FieldMask} request.updateMask - * Mask of fields to update. - * @param {google.cloud.gkehub.v1.Feature} request.resource - * Only fields specified in update_mask are updated. - * If you specify a field in the update_mask but don't specify its value here - * that field will be deleted. - * If you are updating a map field, set the value of a key to null or empty - * string to delete the key from the map. It's not possible to update a key's - * value to the empty string. - * If you specify the update_mask to be a special path "*", fully replaces all - * user-modifiable fields to match `resource`. - * @param {string} request.requestId + * @param {string} request.parent + * Required. The parent (project and location) where the Memberships will be + * created. Specified in the format `projects/* /locations/*`. + * @param {string} request.membershipId + * Required. Client chosen ID for the membership. `membership_id` must be a + * valid RFC 1123 compliant DNS label: + * + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @param {google.cloud.gkehub.v1.Membership} request.resource + * Required. The membership to create. + * @param {string} [request.requestId] * Optional. A request ID to identify requests. Specify a unique request ID * so that if you must retry your request, the server will know to ignore * the request if it has already been completed. The server will guarantee @@ -1440,41 +1656,41 @@ export class GkeHubClient { * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/gke_hub.update_feature.js - * region_tag:gkehub_v1_generated_GkeHub_UpdateFeature_async + * @example include:samples/generated/v1/gke_hub.create_membership.js + * region_tag:gkehub_v1_generated_GkeHub_CreateMembership_async */ - updateFeature( - request?: protos.google.cloud.gkehub.v1.IUpdateFeatureRequest, + createMembership( + request?: protos.google.cloud.gkehub.v1.ICreateMembershipRequest, options?: CallOptions): Promise<[ - LROperation, + LROperation, protos.google.longrunning.IOperation|undefined, {}|undefined ]>; - updateFeature( - request: protos.google.cloud.gkehub.v1.IUpdateFeatureRequest, + createMembership( + request: protos.google.cloud.gkehub.v1.ICreateMembershipRequest, options: CallOptions, callback: Callback< - LROperation, + LROperation, protos.google.longrunning.IOperation|null|undefined, {}|null|undefined>): void; - updateFeature( - request: protos.google.cloud.gkehub.v1.IUpdateFeatureRequest, + createMembership( + request: protos.google.cloud.gkehub.v1.ICreateMembershipRequest, callback: Callback< - LROperation, + LROperation, protos.google.longrunning.IOperation|null|undefined, {}|null|undefined>): void; - updateFeature( - request?: protos.google.cloud.gkehub.v1.IUpdateFeatureRequest, + createMembership( + request?: protos.google.cloud.gkehub.v1.ICreateMembershipRequest, optionsOrCallback?: CallOptions|Callback< - LROperation, + LROperation, protos.google.longrunning.IOperation|null|undefined, {}|null|undefined>, callback?: Callback< - LROperation, + LROperation, protos.google.longrunning.IOperation|null|undefined, {}|null|undefined>): Promise<[ - LROperation, + LROperation, protos.google.longrunning.IOperation|undefined, {}|undefined ]>|void { request = request || {}; @@ -1492,134 +1708,4590 @@ export class GkeHubClient { options.otherArgs.headers[ 'x-goog-request-params' ] = this._gaxModule.routingHeader.fromParams({ - 'name': request.name ?? '', + 'parent': request.parent ?? '', }); this.initialize().catch(err => {throw err}); const wrappedCallback: Callback< - LROperation, + LROperation, protos.google.longrunning.IOperation|null|undefined, {}|null|undefined>|undefined = callback ? (error, response, rawResponse, _) => { - this._log.info('updateFeature response %j', rawResponse); + this._log.info('createMembership response %j', rawResponse); callback!(error, response, rawResponse, _); // We verified callback above. } : undefined; - this._log.info('updateFeature request %j', request); - return this.innerApiCalls.updateFeature(request, options, wrappedCallback) + this._log.info('createMembership request %j', request); + return this.innerApiCalls.createMembership(request, options, wrappedCallback) ?.then(([response, rawResponse, _]: [ - LROperation, + LROperation, protos.google.longrunning.IOperation|undefined, {}|undefined ]) => { - this._log.info('updateFeature response %j', rawResponse); + this._log.info('createMembership response %j', rawResponse); return [response, rawResponse, _]; }); } /** - * Check the status of the long running operation returned by `updateFeature()`. + * Check the status of the long running operation returned by `createMembership()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. - * @example include:samples/generated/v1/gke_hub.update_feature.js - * region_tag:gkehub_v1_generated_GkeHub_UpdateFeature_async + * @example include:samples/generated/v1/gke_hub.create_membership.js + * region_tag:gkehub_v1_generated_GkeHub_CreateMembership_async */ - async checkUpdateFeatureProgress(name: string): Promise>{ - this._log.info('updateFeature long-running'); + async checkCreateMembershipProgress(name: string): Promise>{ + this._log.info('createMembership long-running'); const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); const [operation] = await this.operationsClient.getOperation(request); - const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateFeature, this._gaxModule.createDefaultBackoffSettings()); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createMembership, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Adds a new Feature. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Feature will be + * created. Specified in the format `projects/* /locations/*`. + * @param {string} request.featureId + * The ID of the feature to create. + * @param {google.cloud.gkehub.v1.Feature} request.resource + * The Feature resource to create. + * @param {string} request.requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_feature.js + * region_tag:gkehub_v1_generated_GkeHub_CreateFeature_async + */ + createFeature( + request?: protos.google.cloud.gkehub.v1.ICreateFeatureRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createFeature( + request: protos.google.cloud.gkehub.v1.ICreateFeatureRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createFeature( + request: protos.google.cloud.gkehub.v1.ICreateFeatureRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createFeature( + request?: protos.google.cloud.gkehub.v1.ICreateFeatureRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createFeature response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createFeature request %j', request); + return this.innerApiCalls.createFeature(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createFeature response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createFeature()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_feature.js + * region_tag:gkehub_v1_generated_GkeHub_CreateFeature_async + */ + async checkCreateFeatureProgress(name: string): Promise>{ + this._log.info('createFeature long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createFeature, this._gaxModule.createDefaultBackoffSettings()); return decodeOperation as LROperation; } - /** - * Lists Memberships in a given project and location. +/** + * Removes a Membership. + * + * **This is currently only supported for GKE clusters on Google Cloud**. + * To unregister other clusters, follow the instructions at + * https://cloud.google.com/anthos/multicluster-management/connect/unregistering-a-cluster. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The Membership resource name in the format + * `projects/* /locations/* /memberships/*`. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {boolean} [request.force] + * Optional. If set to true, any subresource from this Membership will also be + * deleted. Otherwise, the request will only work if the Membership has no + * subresource. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_membership.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteMembership_async + */ + deleteMembership( + request?: protos.google.cloud.gkehub.v1.IDeleteMembershipRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteMembership( + request: protos.google.cloud.gkehub.v1.IDeleteMembershipRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteMembership( + request: protos.google.cloud.gkehub.v1.IDeleteMembershipRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteMembership( + request?: protos.google.cloud.gkehub.v1.IDeleteMembershipRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteMembership response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteMembership request %j', request); + return this.innerApiCalls.deleteMembership(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteMembership response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteMembership()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_membership.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteMembership_async + */ + async checkDeleteMembershipProgress(name: string): Promise>{ + this._log.info('deleteMembership long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteMembership, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Removes a Feature. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The Feature resource name in the format + * `projects/* /locations/* /features/*`. + * @param {boolean} request.force + * If set to true, the delete will ignore any outstanding resources for + * this Feature (that is, `FeatureState.has_resources` is set to true). These + * resources will NOT be cleaned up or modified in any way. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_feature.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteFeature_async + */ + deleteFeature( + request?: protos.google.cloud.gkehub.v1.IDeleteFeatureRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteFeature( + request: protos.google.cloud.gkehub.v1.IDeleteFeatureRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteFeature( + request: protos.google.cloud.gkehub.v1.IDeleteFeatureRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteFeature( + request?: protos.google.cloud.gkehub.v1.IDeleteFeatureRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteFeature response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteFeature request %j', request); + return this.innerApiCalls.deleteFeature(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteFeature response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteFeature()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_feature.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteFeature_async + */ + async checkDeleteFeatureProgress(name: string): Promise>{ + this._log.info('deleteFeature long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteFeature, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an existing Membership. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The Membership resource name in the format + * `projects/* /locations/* /memberships/*`. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. Mask of fields to update. + * @param {google.cloud.gkehub.v1.Membership} request.resource + * Required. Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * @param {string} [request.requestId] + * Optional. A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_membership.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateMembership_async + */ + updateMembership( + request?: protos.google.cloud.gkehub.v1.IUpdateMembershipRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateMembership( + request: protos.google.cloud.gkehub.v1.IUpdateMembershipRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateMembership( + request: protos.google.cloud.gkehub.v1.IUpdateMembershipRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateMembership( + request?: protos.google.cloud.gkehub.v1.IUpdateMembershipRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateMembership response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateMembership request %j', request); + return this.innerApiCalls.updateMembership(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateMembership response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateMembership()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_membership.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateMembership_async + */ + async checkUpdateMembershipProgress(name: string): Promise>{ + this._log.info('updateMembership long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateMembership, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates an existing Feature. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The Feature resource name in the format + * `projects/* /locations/* /features/*`. + * @param {google.protobuf.FieldMask} request.updateMask + * Mask of fields to update. + * @param {google.cloud.gkehub.v1.Feature} request.resource + * Only fields specified in update_mask are updated. + * If you specify a field in the update_mask but don't specify its value here + * that field will be deleted. + * If you are updating a map field, set the value of a key to null or empty + * string to delete the key from the map. It's not possible to update a key's + * value to the empty string. + * If you specify the update_mask to be a special path "*", fully replaces all + * user-modifiable fields to match `resource`. + * @param {string} request.requestId + * A request ID to identify requests. Specify a unique request ID + * so that if you must retry your request, the server will know to ignore + * the request if it has already been completed. The server will guarantee + * that for at least 60 minutes after the first request. + * + * For example, consider a situation where you make an initial request and + * the request times out. If you make the request again with the same request + * ID, the server can check if original operation with the same request ID + * was received, and if so, will ignore the second request. This prevents + * clients from accidentally creating duplicate commitments. + * + * The request ID must be a valid UUID with the exception that zero UUID is + * not supported (00000000-0000-0000-0000-000000000000). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_feature.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateFeature_async + */ + updateFeature( + request?: protos.google.cloud.gkehub.v1.IUpdateFeatureRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateFeature( + request: protos.google.cloud.gkehub.v1.IUpdateFeatureRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateFeature( + request: protos.google.cloud.gkehub.v1.IUpdateFeatureRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateFeature( + request?: protos.google.cloud.gkehub.v1.IUpdateFeatureRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateFeature response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateFeature request %j', request); + return this.innerApiCalls.updateFeature(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateFeature response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateFeature()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_feature.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateFeature_async + */ + async checkUpdateFeatureProgress(name: string): Promise>{ + this._log.info('updateFeature long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateFeature, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a fleet. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Fleet will be + * created. Specified in the format `projects/* /locations/*`. + * @param {google.cloud.gkehub.v1.Fleet} request.fleet + * Required. The fleet to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_fleet.js + * region_tag:gkehub_v1_generated_GkeHub_CreateFleet_async + */ + createFleet( + request?: protos.google.cloud.gkehub.v1.ICreateFleetRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createFleet( + request: protos.google.cloud.gkehub.v1.ICreateFleetRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createFleet( + request: protos.google.cloud.gkehub.v1.ICreateFleetRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createFleet( + request?: protos.google.cloud.gkehub.v1.ICreateFleetRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createFleet response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createFleet request %j', request); + return this.innerApiCalls.createFleet(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createFleet response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createFleet()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_fleet.js + * region_tag:gkehub_v1_generated_GkeHub_CreateFleet_async + */ + async checkCreateFleetProgress(name: string): Promise>{ + this._log.info('createFleet long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createFleet, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a fleet. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.gkehub.v1.Fleet} request.fleet + * Required. The Fleet to update. + * + * The `name` field of the Fleet object identifies which fleet will be + * updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The fields to be updated; + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_fleet.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateFleet_async + */ + updateFleet( + request?: protos.google.cloud.gkehub.v1.IUpdateFleetRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateFleet( + request: protos.google.cloud.gkehub.v1.IUpdateFleetRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateFleet( + request: protos.google.cloud.gkehub.v1.IUpdateFleetRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateFleet( + request?: protos.google.cloud.gkehub.v1.IUpdateFleetRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'fleet.name': request.fleet!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateFleet response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateFleet request %j', request); + return this.innerApiCalls.updateFleet(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateFleet response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateFleet()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_fleet.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateFleet_async + */ + async checkUpdateFleetProgress(name: string): Promise>{ + this._log.info('updateFleet long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateFleet, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Removes a Fleet. There must be no memberships remaining in the Fleet. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The Fleet resource name in the format + * `projects/* /locations/* /fleets/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_fleet.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteFleet_async + */ + deleteFleet( + request?: protos.google.cloud.gkehub.v1.IDeleteFleetRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteFleet( + request: protos.google.cloud.gkehub.v1.IDeleteFleetRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteFleet( + request: protos.google.cloud.gkehub.v1.IDeleteFleetRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteFleet( + request?: protos.google.cloud.gkehub.v1.IDeleteFleetRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteFleet response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteFleet request %j', request); + return this.innerApiCalls.deleteFleet(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteFleet response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteFleet()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_fleet.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteFleet_async + */ + async checkDeleteFleetProgress(name: string): Promise>{ + this._log.info('deleteFleet long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteFleet, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a fleet namespace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Namespace will be + * created. Specified in the format `projects/* /locations/* /scopes/*`. + * @param {string} request.scopeNamespaceId + * Required. Client chosen ID for the Namespace. `namespace_id` must be a + * valid RFC 1123 compliant DNS label: + * + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @param {google.cloud.gkehub.v1.Namespace} request.scopeNamespace + * Required. The fleet namespace to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_scope_namespace.js + * region_tag:gkehub_v1_generated_GkeHub_CreateScopeNamespace_async + */ + createScopeNamespace( + request?: protos.google.cloud.gkehub.v1.ICreateScopeNamespaceRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createScopeNamespace( + request: protos.google.cloud.gkehub.v1.ICreateScopeNamespaceRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createScopeNamespace( + request: protos.google.cloud.gkehub.v1.ICreateScopeNamespaceRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createScopeNamespace( + request?: protos.google.cloud.gkehub.v1.ICreateScopeNamespaceRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createScopeNamespace response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createScopeNamespace request %j', request); + return this.innerApiCalls.createScopeNamespace(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createScopeNamespace response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createScopeNamespace()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_scope_namespace.js + * region_tag:gkehub_v1_generated_GkeHub_CreateScopeNamespace_async + */ + async checkCreateScopeNamespaceProgress(name: string): Promise>{ + this._log.info('createScopeNamespace long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createScopeNamespace, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a fleet namespace. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.gkehub.v1.Namespace} request.scopeNamespace + * Required. A namespace with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. Given 'updated' + * prefix to follow go/proto-best-practices-checkers#keyword_conflict + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The fields to be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_scope_namespace.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateScopeNamespace_async + */ + updateScopeNamespace( + request?: protos.google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateScopeNamespace( + request: protos.google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateScopeNamespace( + request: protos.google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateScopeNamespace( + request?: protos.google.cloud.gkehub.v1.IUpdateScopeNamespaceRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'scope_namespace.name': request.scopeNamespace!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateScopeNamespace response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateScopeNamespace request %j', request); + return this.innerApiCalls.updateScopeNamespace(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateScopeNamespace response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateScopeNamespace()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_scope_namespace.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateScopeNamespace_async + */ + async checkUpdateScopeNamespaceProgress(name: string): Promise>{ + this._log.info('updateScopeNamespace long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateScopeNamespace, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a fleet namespace. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The Namespace resource name in the format + * `projects/* /locations/* /scopes/* /namespaces/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_scope_namespace.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteScopeNamespace_async + */ + deleteScopeNamespace( + request?: protos.google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteScopeNamespace( + request: protos.google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteScopeNamespace( + request: protos.google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteScopeNamespace( + request?: protos.google.cloud.gkehub.v1.IDeleteScopeNamespaceRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteScopeNamespace response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteScopeNamespace request %j', request); + return this.innerApiCalls.deleteScopeNamespace(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteScopeNamespace response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteScopeNamespace()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_scope_namespace.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteScopeNamespace_async + */ + async checkDeleteScopeNamespaceProgress(name: string): Promise>{ + this._log.info('deleteScopeNamespace long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteScopeNamespace, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a Scope RBACRoleBinding. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/* /locations/* /scopes/*`. + * @param {string} request.rbacrolebindingId + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @param {google.cloud.gkehub.v1.RBACRoleBinding} request.rbacrolebinding + * Required. The rbacrolebindings to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_scope_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_CreateScopeRBACRoleBinding_async + */ + createScopeRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createScopeRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createScopeRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createScopeRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.ICreateScopeRBACRoleBindingRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createScopeRBACRoleBinding response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createScopeRBACRoleBinding request %j', request); + return this.innerApiCalls.createScopeRbacRoleBinding(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createScopeRBACRoleBinding response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createScopeRBACRoleBinding()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_scope_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_CreateScopeRBACRoleBinding_async + */ + async checkCreateScopeRBACRoleBindingProgress(name: string): Promise>{ + this._log.info('createScopeRBACRoleBinding long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createScopeRBACRoleBinding, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a Scope RBACRoleBinding. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.gkehub.v1.RBACRoleBinding} request.rbacrolebinding + * Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The fields to be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_scope_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateScopeRBACRoleBinding_async + */ + updateScopeRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateScopeRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateScopeRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateScopeRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.IUpdateScopeRBACRoleBindingRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'rbacrolebinding.name': request.rbacrolebinding!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateScopeRBACRoleBinding response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateScopeRBACRoleBinding request %j', request); + return this.innerApiCalls.updateScopeRbacRoleBinding(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateScopeRBACRoleBinding response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateScopeRBACRoleBinding()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_scope_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateScopeRBACRoleBinding_async + */ + async checkUpdateScopeRBACRoleBindingProgress(name: string): Promise>{ + this._log.info('updateScopeRBACRoleBinding long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateScopeRBACRoleBinding, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a Scope RBACRoleBinding. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The RBACRoleBinding resource name in the format + * `projects/* /locations/* /scopes/* /rbacrolebindings/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_scope_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteScopeRBACRoleBinding_async + */ + deleteScopeRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteScopeRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteScopeRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteScopeRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.IDeleteScopeRBACRoleBindingRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteScopeRBACRoleBinding response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteScopeRBACRoleBinding request %j', request); + return this.innerApiCalls.deleteScopeRbacRoleBinding(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteScopeRBACRoleBinding response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteScopeRBACRoleBinding()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_scope_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteScopeRBACRoleBinding_async + */ + async checkDeleteScopeRBACRoleBindingProgress(name: string): Promise>{ + this._log.info('deleteScopeRBACRoleBinding long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteScopeRBACRoleBinding, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a Scope. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Scope will be + * created. Specified in the format `projects/* /locations/*`. + * @param {string} request.scopeId + * Required. Client chosen ID for the Scope. `scope_id` must be a + * ???? + * @param {google.cloud.gkehub.v1.Scope} request.scope + * Required. The Scope to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_scope.js + * region_tag:gkehub_v1_generated_GkeHub_CreateScope_async + */ + createScope( + request?: protos.google.cloud.gkehub.v1.ICreateScopeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createScope( + request: protos.google.cloud.gkehub.v1.ICreateScopeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createScope( + request: protos.google.cloud.gkehub.v1.ICreateScopeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createScope( + request?: protos.google.cloud.gkehub.v1.ICreateScopeRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createScope response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createScope request %j', request); + return this.innerApiCalls.createScope(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createScope response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createScope()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_scope.js + * region_tag:gkehub_v1_generated_GkeHub_CreateScope_async + */ + async checkCreateScopeProgress(name: string): Promise>{ + this._log.info('createScope long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createScope, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a scopes. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.gkehub.v1.Scope} request.scope + * Required. A Scope with fields updated. The 'name' field in this + * namespace is used to identify the resource to update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The fields to be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_scope.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateScope_async + */ + updateScope( + request?: protos.google.cloud.gkehub.v1.IUpdateScopeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateScope( + request: protos.google.cloud.gkehub.v1.IUpdateScopeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateScope( + request: protos.google.cloud.gkehub.v1.IUpdateScopeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateScope( + request?: protos.google.cloud.gkehub.v1.IUpdateScopeRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'scope.name': request.scope!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateScope response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateScope request %j', request); + return this.innerApiCalls.updateScope(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateScope response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateScope()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_scope.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateScope_async + */ + async checkUpdateScopeProgress(name: string): Promise>{ + this._log.info('updateScope long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateScope, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a Scope. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The Scope resource name in the format + * `projects/* /locations/* /scopes/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_scope.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteScope_async + */ + deleteScope( + request?: protos.google.cloud.gkehub.v1.IDeleteScopeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteScope( + request: protos.google.cloud.gkehub.v1.IDeleteScopeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteScope( + request: protos.google.cloud.gkehub.v1.IDeleteScopeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteScope( + request?: protos.google.cloud.gkehub.v1.IDeleteScopeRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteScope response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteScope request %j', request); + return this.innerApiCalls.deleteScope(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteScope response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteScope()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_scope.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteScope_async + */ + async checkDeleteScopeProgress(name: string): Promise>{ + this._log.info('deleteScope long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteScope, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a MembershipBinding. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the MembershipBinding + * will be created. Specified in the format + * `projects/* /locations/* /memberships/*`. + * @param {google.cloud.gkehub.v1.MembershipBinding} request.membershipBinding + * Required. The MembershipBinding to create. + * @param {string} request.membershipBindingId + * Required. The ID to use for the MembershipBinding. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_membership_binding.js + * region_tag:gkehub_v1_generated_GkeHub_CreateMembershipBinding_async + */ + createMembershipBinding( + request?: protos.google.cloud.gkehub.v1.ICreateMembershipBindingRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createMembershipBinding( + request: protos.google.cloud.gkehub.v1.ICreateMembershipBindingRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createMembershipBinding( + request: protos.google.cloud.gkehub.v1.ICreateMembershipBindingRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createMembershipBinding( + request?: protos.google.cloud.gkehub.v1.ICreateMembershipBindingRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createMembershipBinding response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createMembershipBinding request %j', request); + return this.innerApiCalls.createMembershipBinding(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createMembershipBinding response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createMembershipBinding()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_membership_binding.js + * region_tag:gkehub_v1_generated_GkeHub_CreateMembershipBinding_async + */ + async checkCreateMembershipBindingProgress(name: string): Promise>{ + this._log.info('createMembershipBinding long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createMembershipBinding, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a MembershipBinding. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.gkehub.v1.MembershipBinding} request.membershipBinding + * Required. The MembershipBinding object with fields updated. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The fields to be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_membership_binding.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateMembershipBinding_async + */ + updateMembershipBinding( + request?: protos.google.cloud.gkehub.v1.IUpdateMembershipBindingRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateMembershipBinding( + request: protos.google.cloud.gkehub.v1.IUpdateMembershipBindingRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateMembershipBinding( + request: protos.google.cloud.gkehub.v1.IUpdateMembershipBindingRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateMembershipBinding( + request?: protos.google.cloud.gkehub.v1.IUpdateMembershipBindingRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'membership_binding.name': request.membershipBinding!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateMembershipBinding response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateMembershipBinding request %j', request); + return this.innerApiCalls.updateMembershipBinding(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateMembershipBinding response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateMembershipBinding()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_membership_binding.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateMembershipBinding_async + */ + async checkUpdateMembershipBindingProgress(name: string): Promise>{ + this._log.info('updateMembershipBinding long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateMembershipBinding, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a MembershipBinding. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The MembershipBinding resource name in the format + * `projects/* /locations/* /memberships/* /bindings/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_membership_binding.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteMembershipBinding_async + */ + deleteMembershipBinding( + request?: protos.google.cloud.gkehub.v1.IDeleteMembershipBindingRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteMembershipBinding( + request: protos.google.cloud.gkehub.v1.IDeleteMembershipBindingRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteMembershipBinding( + request: protos.google.cloud.gkehub.v1.IDeleteMembershipBindingRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteMembershipBinding( + request?: protos.google.cloud.gkehub.v1.IDeleteMembershipBindingRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteMembershipBinding response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteMembershipBinding request %j', request); + return this.innerApiCalls.deleteMembershipBinding(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteMembershipBinding response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteMembershipBinding()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_membership_binding.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteMembershipBinding_async + */ + async checkDeleteMembershipBindingProgress(name: string): Promise>{ + this._log.info('deleteMembershipBinding long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteMembershipBinding, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a Membership RBACRoleBinding. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the RBACRoleBinding will + * be created. Specified in the format `projects/* /locations/* /memberships/*`. + * @param {string} request.rbacrolebindingId + * Required. Client chosen ID for the RBACRoleBinding. `rbacrolebinding_id` + * must be a valid RFC 1123 compliant DNS label: + * + * 1. At most 63 characters in length + * 2. It must consist of lower case alphanumeric characters or `-` + * 3. It must start and end with an alphanumeric character + * + * Which can be expressed as the regex: `[a-z0-9]([-a-z0-9]*[a-z0-9])?`, + * with a maximum length of 63 characters. + * @param {google.cloud.gkehub.v1.RBACRoleBinding} request.rbacrolebinding + * Required. The rbacrolebindings to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_membership_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_CreateMembershipRBACRoleBinding_async + */ + createMembershipRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createMembershipRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createMembershipRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createMembershipRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.ICreateMembershipRBACRoleBindingRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('createMembershipRBACRoleBinding response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('createMembershipRBACRoleBinding request %j', request); + return this.innerApiCalls.createMembershipRbacRoleBinding(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('createMembershipRBACRoleBinding response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `createMembershipRBACRoleBinding()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.create_membership_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_CreateMembershipRBACRoleBinding_async + */ + async checkCreateMembershipRBACRoleBindingProgress(name: string): Promise>{ + this._log.info('createMembershipRBACRoleBinding long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.createMembershipRBACRoleBinding, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Updates a Membership RBACRoleBinding. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.gkehub.v1.RBACRoleBinding} request.rbacrolebinding + * Required. A rbacrolebinding with fields updated. The 'name' field in this + * rbacrolebinding is used to identify the resource to update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The fields to be updated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_membership_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateMembershipRBACRoleBinding_async + */ + updateMembershipRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateMembershipRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateMembershipRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateMembershipRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.IUpdateMembershipRBACRoleBindingRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'rbacrolebinding.name': request.rbacrolebinding!.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('updateMembershipRBACRoleBinding response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('updateMembershipRBACRoleBinding request %j', request); + return this.innerApiCalls.updateMembershipRbacRoleBinding(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('updateMembershipRBACRoleBinding response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `updateMembershipRBACRoleBinding()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.update_membership_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_UpdateMembershipRBACRoleBinding_async + */ + async checkUpdateMembershipRBACRoleBindingProgress(name: string): Promise>{ + this._log.info('updateMembershipRBACRoleBinding long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.updateMembershipRBACRoleBinding, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Deletes a Membership RBACRoleBinding. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The RBACRoleBinding resource name in the format + * `projects/* /locations/* /memberships/* /rbacrolebindings/*`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_membership_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteMembershipRBACRoleBinding_async + */ + deleteMembershipRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteMembershipRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteMembershipRBACRoleBinding( + request: protos.google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteMembershipRBACRoleBinding( + request?: protos.google.cloud.gkehub.v1.IDeleteMembershipRBACRoleBindingRequest, + optionsOrCallback?: CallOptions|Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>, + callback?: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'name': request.name ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>|undefined = callback + ? (error, response, rawResponse, _) => { + this._log.info('deleteMembershipRBACRoleBinding response %j', rawResponse); + callback!(error, response, rawResponse, _); // We verified callback above. + } + : undefined; + this._log.info('deleteMembershipRBACRoleBinding request %j', request); + return this.innerApiCalls.deleteMembershipRbacRoleBinding(request, options, wrappedCallback) + ?.then(([response, rawResponse, _]: [ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]) => { + this._log.info('deleteMembershipRBACRoleBinding response %j', rawResponse); + return [response, rawResponse, _]; + }); + } +/** + * Check the status of the long running operation returned by `deleteMembershipRBACRoleBinding()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.delete_membership_r_b_a_c_role_binding.js + * region_tag:gkehub_v1_generated_GkeHub_DeleteMembershipRBACRoleBinding_async + */ + async checkDeleteMembershipRBACRoleBindingProgress(name: string): Promise>{ + this._log.info('deleteMembershipRBACRoleBinding long-running'); + const request = new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest({name}); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation(operation, this.descriptors.longrunning.deleteMembershipRBACRoleBinding, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * Lists Memberships in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/* /locations/*`. + * `projects/* /locations/-` list memberships in all the regions. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {string} [request.filter] + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. + * + * Examples: + * + * - Name is `bar` in project `foo-proj` and location `global`: + * + * name = "projects/foo-proj/locations/global/membership/bar" + * + * - Memberships that have a label called `foo`: + * + * labels.foo:* + * + * - Memberships that have a label called `foo` whose value is `bar`: + * + * labels.foo = bar + * + * - Memberships in the CREATING state: + * + * state = CREATING + * @param {string} [request.orderBy] + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.gkehub.v1.Membership|Membership}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listMembershipsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMemberships( + request?: protos.google.cloud.gkehub.v1.IListMembershipsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkehub.v1.IMembership[], + protos.google.cloud.gkehub.v1.IListMembershipsRequest|null, + protos.google.cloud.gkehub.v1.IListMembershipsResponse + ]>; + listMemberships( + request: protos.google.cloud.gkehub.v1.IListMembershipsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListMembershipsRequest, + protos.google.cloud.gkehub.v1.IListMembershipsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembership>): void; + listMemberships( + request: protos.google.cloud.gkehub.v1.IListMembershipsRequest, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListMembershipsRequest, + protos.google.cloud.gkehub.v1.IListMembershipsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembership>): void; + listMemberships( + request?: protos.google.cloud.gkehub.v1.IListMembershipsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkehub.v1.IListMembershipsRequest, + protos.google.cloud.gkehub.v1.IListMembershipsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembership>, + callback?: PaginationCallback< + protos.google.cloud.gkehub.v1.IListMembershipsRequest, + protos.google.cloud.gkehub.v1.IListMembershipsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembership>): + Promise<[ + protos.google.cloud.gkehub.v1.IMembership[], + protos.google.cloud.gkehub.v1.IListMembershipsRequest|null, + protos.google.cloud.gkehub.v1.IListMembershipsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListMembershipsRequest, + protos.google.cloud.gkehub.v1.IListMembershipsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembership>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listMemberships values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listMemberships request %j', request); + return this.innerApiCalls + .listMemberships(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.gkehub.v1.IMembership[], + protos.google.cloud.gkehub.v1.IListMembershipsRequest|null, + protos.google.cloud.gkehub.v1.IListMembershipsResponse + ]) => { + this._log.info('listMemberships values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listMemberships`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/* /locations/*`. + * `projects/* /locations/-` list memberships in all the regions. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {string} [request.filter] + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. + * + * Examples: + * + * - Name is `bar` in project `foo-proj` and location `global`: + * + * name = "projects/foo-proj/locations/global/membership/bar" + * + * - Memberships that have a label called `foo`: + * + * labels.foo:* + * + * - Memberships that have a label called `foo` whose value is `bar`: + * + * labels.foo = bar + * + * - Memberships in the CREATING state: + * + * state = CREATING + * @param {string} [request.orderBy] + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.gkehub.v1.Membership|Membership} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listMembershipsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMembershipsStream( + request?: protos.google.cloud.gkehub.v1.IListMembershipsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMemberships']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMemberships stream %j', request); + return this.descriptors.page.listMemberships.createStream( + this.innerApiCalls.listMemberships as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listMemberships`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Memberships will be + * listed. Specified in the format `projects/* /locations/*`. + * `projects/* /locations/-` list memberships in all the regions. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {string} [request.filter] + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. + * + * Examples: + * + * - Name is `bar` in project `foo-proj` and location `global`: + * + * name = "projects/foo-proj/locations/global/membership/bar" + * + * - Memberships that have a label called `foo`: + * + * labels.foo:* + * + * - Memberships that have a label called `foo` whose value is `bar`: + * + * labels.foo = bar + * + * - Memberships in the CREATING state: + * + * state = CREATING + * @param {string} [request.orderBy] + * Optional. One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.gkehub.v1.Membership|Membership}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.list_memberships.js + * region_tag:gkehub_v1_generated_GkeHub_ListMemberships_async + */ + listMembershipsAsync( + request?: protos.google.cloud.gkehub.v1.IListMembershipsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMemberships']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMemberships iterate %j', request); + return this.descriptors.page.listMemberships.asyncIterate( + this.innerApiCalls['listMemberships'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Memberships bound to a Scope. The response includes relevant + * Memberships from all regions. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.scopeName + * Required. Name of the Scope, in the format + * `projects/* /locations/global/scopes/*`, to which the Memberships are bound. + * @param {string} [request.filter] + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. Currently, filtering + * can be done only based on Memberships's `name`, `labels`, `create_time`, + * `update_time`, and `unique_id`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. Pagination is currently not supported; therefore, setting + * this field does not have any impact for now. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListBoundMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.gkehub.v1.Membership|Membership}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listBoundMembershipsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBoundMemberships( + request?: protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkehub.v1.IMembership[], + protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest|null, + protos.google.cloud.gkehub.v1.IListBoundMembershipsResponse + ]>; + listBoundMemberships( + request: protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest, + protos.google.cloud.gkehub.v1.IListBoundMembershipsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembership>): void; + listBoundMemberships( + request: protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest, + protos.google.cloud.gkehub.v1.IListBoundMembershipsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembership>): void; + listBoundMemberships( + request?: protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest, + protos.google.cloud.gkehub.v1.IListBoundMembershipsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembership>, + callback?: PaginationCallback< + protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest, + protos.google.cloud.gkehub.v1.IListBoundMembershipsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembership>): + Promise<[ + protos.google.cloud.gkehub.v1.IMembership[], + protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest|null, + protos.google.cloud.gkehub.v1.IListBoundMembershipsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'scope_name': request.scopeName ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest, + protos.google.cloud.gkehub.v1.IListBoundMembershipsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembership>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listBoundMemberships values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listBoundMemberships request %j', request); + return this.innerApiCalls + .listBoundMemberships(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.gkehub.v1.IMembership[], + protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest|null, + protos.google.cloud.gkehub.v1.IListBoundMembershipsResponse + ]) => { + this._log.info('listBoundMemberships values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listBoundMemberships`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.scopeName + * Required. Name of the Scope, in the format + * `projects/* /locations/global/scopes/*`, to which the Memberships are bound. + * @param {string} [request.filter] + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. Currently, filtering + * can be done only based on Memberships's `name`, `labels`, `create_time`, + * `update_time`, and `unique_id`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. Pagination is currently not supported; therefore, setting + * this field does not have any impact for now. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListBoundMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.gkehub.v1.Membership|Membership} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listBoundMembershipsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listBoundMembershipsStream( + request?: protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'scope_name': request.scopeName ?? '', + }); + const defaultCallSettings = this._defaults['listBoundMemberships']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listBoundMemberships stream %j', request); + return this.descriptors.page.listBoundMemberships.createStream( + this.innerApiCalls.listBoundMemberships as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listBoundMemberships`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.scopeName + * Required. Name of the Scope, in the format + * `projects/* /locations/global/scopes/*`, to which the Memberships are bound. + * @param {string} [request.filter] + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. Currently, filtering + * can be done only based on Memberships's `name`, `labels`, `create_time`, + * `update_time`, and `unique_id`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. Pagination is currently not supported; therefore, setting + * this field does not have any impact for now. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListBoundMemberships` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.gkehub.v1.Membership|Membership}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.list_bound_memberships.js + * region_tag:gkehub_v1_generated_GkeHub_ListBoundMemberships_async + */ + listBoundMembershipsAsync( + request?: protos.google.cloud.gkehub.v1.IListBoundMembershipsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'scope_name': request.scopeName ?? '', + }); + const defaultCallSettings = this._defaults['listBoundMemberships']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listBoundMemberships iterate %j', request); + return this.descriptors.page.listBoundMemberships.asyncIterate( + this.innerApiCalls['listBoundMemberships'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Features in a given project and location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/* /locations/*`. + * @param {number} request.pageSize + * When requesting a 'page' of resources, `page_size` specifies number of + * resources to return. If unspecified or set to 0, all resources will + * be returned. + * @param {string} request.pageToken + * Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {string} request.filter + * Lists Features that match the filter expression, following the syntax + * outlined in https://google.aip.dev/160. + * + * Examples: + * + * - Feature with the name "servicemesh" in project "foo-proj": + * + * name = "projects/foo-proj/locations/global/features/servicemesh" + * + * - Features that have a label called `foo`: + * + * labels.foo:* + * + * - Features that have a label called `foo` whose value is `bar`: + * + * labels.foo = bar + * @param {string} request.orderBy + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @param {boolean} [request.returnPartialSuccess] + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.gkehub.v1.Feature|Feature}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listFeaturesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFeatures( + request?: protos.google.cloud.gkehub.v1.IListFeaturesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkehub.v1.IFeature[], + protos.google.cloud.gkehub.v1.IListFeaturesRequest|null, + protos.google.cloud.gkehub.v1.IListFeaturesResponse + ]>; + listFeatures( + request: protos.google.cloud.gkehub.v1.IListFeaturesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListFeaturesRequest, + protos.google.cloud.gkehub.v1.IListFeaturesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IFeature>): void; + listFeatures( + request: protos.google.cloud.gkehub.v1.IListFeaturesRequest, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListFeaturesRequest, + protos.google.cloud.gkehub.v1.IListFeaturesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IFeature>): void; + listFeatures( + request?: protos.google.cloud.gkehub.v1.IListFeaturesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkehub.v1.IListFeaturesRequest, + protos.google.cloud.gkehub.v1.IListFeaturesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IFeature>, + callback?: PaginationCallback< + protos.google.cloud.gkehub.v1.IListFeaturesRequest, + protos.google.cloud.gkehub.v1.IListFeaturesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IFeature>): + Promise<[ + protos.google.cloud.gkehub.v1.IFeature[], + protos.google.cloud.gkehub.v1.IListFeaturesRequest|null, + protos.google.cloud.gkehub.v1.IListFeaturesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListFeaturesRequest, + protos.google.cloud.gkehub.v1.IListFeaturesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IFeature>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listFeatures values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listFeatures request %j', request); + return this.innerApiCalls + .listFeatures(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.gkehub.v1.IFeature[], + protos.google.cloud.gkehub.v1.IListFeaturesRequest|null, + protos.google.cloud.gkehub.v1.IListFeaturesResponse + ]) => { + this._log.info('listFeatures values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listFeatures`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/* /locations/*`. + * @param {number} request.pageSize + * When requesting a 'page' of resources, `page_size` specifies number of + * resources to return. If unspecified or set to 0, all resources will + * be returned. + * @param {string} request.pageToken + * Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {string} request.filter + * Lists Features that match the filter expression, following the syntax + * outlined in https://google.aip.dev/160. + * + * Examples: + * + * - Feature with the name "servicemesh" in project "foo-proj": + * + * name = "projects/foo-proj/locations/global/features/servicemesh" + * + * - Features that have a label called `foo`: + * + * labels.foo:* + * + * - Features that have a label called `foo` whose value is `bar`: + * + * labels.foo = bar + * @param {string} request.orderBy + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @param {boolean} [request.returnPartialSuccess] + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.gkehub.v1.Feature|Feature} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listFeaturesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFeaturesStream( + request?: protos.google.cloud.gkehub.v1.IListFeaturesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFeatures']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFeatures stream %j', request); + return this.descriptors.page.listFeatures.createStream( + this.innerApiCalls.listFeatures as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listFeatures`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/* /locations/*`. + * @param {number} request.pageSize + * When requesting a 'page' of resources, `page_size` specifies number of + * resources to return. If unspecified or set to 0, all resources will + * be returned. + * @param {string} request.pageToken + * Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {string} request.filter + * Lists Features that match the filter expression, following the syntax + * outlined in https://google.aip.dev/160. + * + * Examples: + * + * - Feature with the name "servicemesh" in project "foo-proj": + * + * name = "projects/foo-proj/locations/global/features/servicemesh" + * + * - Features that have a label called `foo`: + * + * labels.foo:* + * + * - Features that have a label called `foo` whose value is `bar`: + * + * labels.foo = bar + * @param {string} request.orderBy + * One or more fields to compare and use to sort the output. + * See https://google.aip.dev/132#ordering. + * @param {boolean} [request.returnPartialSuccess] + * Optional. If set to true, the response will return partial results when + * some regions are unreachable and the unreachable field in Feature proto + * will be populated. If set to false, the request will fail when some regions + * are unreachable. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.gkehub.v1.Feature|Feature}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.list_features.js + * region_tag:gkehub_v1_generated_GkeHub_ListFeatures_async + */ + listFeaturesAsync( + request?: protos.google.cloud.gkehub.v1.IListFeaturesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFeatures']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFeatures iterate %j', request); + return this.descriptors.page.listFeatures.asyncIterate( + this.innerApiCalls['listFeatures'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Returns all fleets within an organization or a project that the caller has + * access to. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The organization or project to list for Fleets under, in the + * format `organizations/* /locations/*` or `projects/* /locations/*`. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListFleets` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListFleets` must match + * the call that provided the page token. + * @param {number} [request.pageSize] + * Optional. The maximum number of fleets to return. The service may return + * fewer than this value. If unspecified, at most 200 fleets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.gkehub.v1.Fleet|Fleet}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listFleetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFleets( + request?: protos.google.cloud.gkehub.v1.IListFleetsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkehub.v1.IFleet[], + protos.google.cloud.gkehub.v1.IListFleetsRequest|null, + protos.google.cloud.gkehub.v1.IListFleetsResponse + ]>; + listFleets( + request: protos.google.cloud.gkehub.v1.IListFleetsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListFleetsRequest, + protos.google.cloud.gkehub.v1.IListFleetsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IFleet>): void; + listFleets( + request: protos.google.cloud.gkehub.v1.IListFleetsRequest, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListFleetsRequest, + protos.google.cloud.gkehub.v1.IListFleetsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IFleet>): void; + listFleets( + request?: protos.google.cloud.gkehub.v1.IListFleetsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkehub.v1.IListFleetsRequest, + protos.google.cloud.gkehub.v1.IListFleetsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IFleet>, + callback?: PaginationCallback< + protos.google.cloud.gkehub.v1.IListFleetsRequest, + protos.google.cloud.gkehub.v1.IListFleetsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IFleet>): + Promise<[ + protos.google.cloud.gkehub.v1.IFleet[], + protos.google.cloud.gkehub.v1.IListFleetsRequest|null, + protos.google.cloud.gkehub.v1.IListFleetsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListFleetsRequest, + protos.google.cloud.gkehub.v1.IListFleetsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IFleet>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listFleets values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listFleets request %j', request); + return this.innerApiCalls + .listFleets(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.gkehub.v1.IFleet[], + protos.google.cloud.gkehub.v1.IListFleetsRequest|null, + protos.google.cloud.gkehub.v1.IListFleetsResponse + ]) => { + this._log.info('listFleets values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listFleets`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The organization or project to list for Fleets under, in the + * format `organizations/* /locations/*` or `projects/* /locations/*`. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListFleets` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListFleets` must match + * the call that provided the page token. + * @param {number} [request.pageSize] + * Optional. The maximum number of fleets to return. The service may return + * fewer than this value. If unspecified, at most 200 fleets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.gkehub.v1.Fleet|Fleet} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listFleetsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listFleetsStream( + request?: protos.google.cloud.gkehub.v1.IListFleetsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFleets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFleets stream %j', request); + return this.descriptors.page.listFleets.createStream( + this.innerApiCalls.listFleets as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listFleets`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The organization or project to list for Fleets under, in the + * format `organizations/* /locations/*` or `projects/* /locations/*`. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `ListFleets` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListFleets` must match + * the call that provided the page token. + * @param {number} [request.pageSize] + * Optional. The maximum number of fleets to return. The service may return + * fewer than this value. If unspecified, at most 200 fleets will be returned. + * The maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.gkehub.v1.Fleet|Fleet}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.list_fleets.js + * region_tag:gkehub_v1_generated_GkeHub_ListFleets_async + */ + listFleetsAsync( + request?: protos.google.cloud.gkehub.v1.IListFleetsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listFleets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listFleets iterate %j', request); + return this.descriptors.page.listFleets.asyncIterate( + this.innerApiCalls['listFleets'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists fleet namespaces. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/* /locations/* /scopes/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.gkehub.v1.Namespace|Namespace}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listScopeNamespacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listScopeNamespaces( + request?: protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkehub.v1.INamespace[], + protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest|null, + protos.google.cloud.gkehub.v1.IListScopeNamespacesResponse + ]>; + listScopeNamespaces( + request: protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest, + protos.google.cloud.gkehub.v1.IListScopeNamespacesResponse|null|undefined, + protos.google.cloud.gkehub.v1.INamespace>): void; + listScopeNamespaces( + request: protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest, + protos.google.cloud.gkehub.v1.IListScopeNamespacesResponse|null|undefined, + protos.google.cloud.gkehub.v1.INamespace>): void; + listScopeNamespaces( + request?: protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest, + protos.google.cloud.gkehub.v1.IListScopeNamespacesResponse|null|undefined, + protos.google.cloud.gkehub.v1.INamespace>, + callback?: PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest, + protos.google.cloud.gkehub.v1.IListScopeNamespacesResponse|null|undefined, + protos.google.cloud.gkehub.v1.INamespace>): + Promise<[ + protos.google.cloud.gkehub.v1.INamespace[], + protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest|null, + protos.google.cloud.gkehub.v1.IListScopeNamespacesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest, + protos.google.cloud.gkehub.v1.IListScopeNamespacesResponse|null|undefined, + protos.google.cloud.gkehub.v1.INamespace>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listScopeNamespaces values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listScopeNamespaces request %j', request); + return this.innerApiCalls + .listScopeNamespaces(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.gkehub.v1.INamespace[], + protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest|null, + protos.google.cloud.gkehub.v1.IListScopeNamespacesResponse + ]) => { + this._log.info('listScopeNamespaces values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listScopeNamespaces`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/* /locations/* /scopes/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.gkehub.v1.Namespace|Namespace} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listScopeNamespacesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listScopeNamespacesStream( + request?: protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listScopeNamespaces']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listScopeNamespaces stream %j', request); + return this.descriptors.page.listScopeNamespaces.createStream( + this.innerApiCalls.listScopeNamespaces as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listScopeNamespaces`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/* /locations/* /scopes/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListFeatures` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.gkehub.v1.Namespace|Namespace}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.list_scope_namespaces.js + * region_tag:gkehub_v1_generated_GkeHub_ListScopeNamespaces_async + */ + listScopeNamespacesAsync( + request?: protos.google.cloud.gkehub.v1.IListScopeNamespacesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listScopeNamespaces']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listScopeNamespaces iterate %j', request); + return this.descriptors.page.listScopeNamespaces.asyncIterate( + this.innerApiCalls['listScopeNamespaces'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists all Scope RBACRoleBindings. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/* /locations/* /scopes/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + * which specifies the position in the list from where to continue listing the + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.gkehub.v1.RBACRoleBinding|RBACRoleBinding}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listScopeRBACRoleBindingsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listScopeRBACRoleBindings( + request?: protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkehub.v1.IRBACRoleBinding[], + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest|null, + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse + ]>; + listScopeRBACRoleBindings( + request: protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding>): void; + listScopeRBACRoleBindings( + request: protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding>): void; + listScopeRBACRoleBindings( + request?: protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding>, + callback?: PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding>): + Promise<[ + protos.google.cloud.gkehub.v1.IRBACRoleBinding[], + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest|null, + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listScopeRBACRoleBindings values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listScopeRBACRoleBindings request %j', request); + return this.innerApiCalls + .listScopeRbacRoleBindings(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.gkehub.v1.IRBACRoleBinding[], + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest|null, + protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsResponse + ]) => { + this._log.info('listScopeRBACRoleBindings values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listScopeRBACRoleBindings`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/* /locations/* /scopes/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + * which specifies the position in the list from where to continue listing the + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.gkehub.v1.RBACRoleBinding|RBACRoleBinding} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listScopeRBACRoleBindingsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listScopeRBACRoleBindingsStream( + request?: protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listScopeRbacRoleBindings']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listScopeRBACRoleBindings stream %j', request); + return this.descriptors.page.listScopeRBACRoleBindings.createStream( + this.innerApiCalls.listScopeRbacRoleBindings as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listScopeRBACRoleBindings`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/* /locations/* /scopes/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListScopeRBACRoleBindings` + * which specifies the position in the list from where to continue listing the + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.gkehub.v1.RBACRoleBinding|RBACRoleBinding}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.list_scope_r_b_a_c_role_bindings.js + * region_tag:gkehub_v1_generated_GkeHub_ListScopeRBACRoleBindings_async + */ + listScopeRBACRoleBindingsAsync( + request?: protos.google.cloud.gkehub.v1.IListScopeRBACRoleBindingsRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listScopeRbacRoleBindings']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listScopeRBACRoleBindings iterate %j', request); + return this.descriptors.page.listScopeRBACRoleBindings.asyncIterate( + this.innerApiCalls['listScopeRbacRoleBindings'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists Scopes. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListScopes` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.gkehub.v1.Scope|Scope}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listScopesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listScopes( + request?: protos.google.cloud.gkehub.v1.IListScopesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkehub.v1.IScope[], + protos.google.cloud.gkehub.v1.IListScopesRequest|null, + protos.google.cloud.gkehub.v1.IListScopesResponse + ]>; + listScopes( + request: protos.google.cloud.gkehub.v1.IListScopesRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopesRequest, + protos.google.cloud.gkehub.v1.IListScopesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IScope>): void; + listScopes( + request: protos.google.cloud.gkehub.v1.IListScopesRequest, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopesRequest, + protos.google.cloud.gkehub.v1.IListScopesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IScope>): void; + listScopes( + request?: protos.google.cloud.gkehub.v1.IListScopesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopesRequest, + protos.google.cloud.gkehub.v1.IListScopesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IScope>, + callback?: PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopesRequest, + protos.google.cloud.gkehub.v1.IListScopesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IScope>): + Promise<[ + protos.google.cloud.gkehub.v1.IScope[], + protos.google.cloud.gkehub.v1.IListScopesRequest|null, + protos.google.cloud.gkehub.v1.IListScopesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListScopesRequest, + protos.google.cloud.gkehub.v1.IListScopesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IScope>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listScopes values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listScopes request %j', request); + return this.innerApiCalls + .listScopes(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.gkehub.v1.IScope[], + protos.google.cloud.gkehub.v1.IListScopesRequest|null, + protos.google.cloud.gkehub.v1.IListScopesResponse + ]) => { + this._log.info('listScopes values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listScopes`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListScopes` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.gkehub.v1.Scope|Scope} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listScopesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listScopesStream( + request?: protos.google.cloud.gkehub.v1.IListScopesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listScopes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listScopes stream %j', request); + return this.descriptors.page.listScopes.createStream( + this.innerApiCalls.listScopes as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listScopes`, but returns an iterable object. * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent (project and location) where the Memberships will be - * listed. Specified in the format `projects/* /locations/*`. - * `projects/* /locations/-` list memberships in all the regions. + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/* /locations/*`. * @param {number} [request.pageSize] * Optional. When requesting a 'page' of resources, `page_size` specifies * number of resources to return. If unspecified or set to 0, all resources * will be returned. * @param {string} [request.pageToken] - * Optional. Token returned by previous call to `ListMemberships` which + * Optional. Token returned by previous call to `ListScopes` which * specifies the position in the list from where to continue listing the * resources. - * @param {string} [request.filter] - * Optional. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. - * - * Examples: - * - * - Name is `bar` in project `foo-proj` and location `global`: - * - * name = "projects/foo-proj/locations/global/membership/bar" - * - * - Memberships that have a label called `foo`: - * - * labels.foo:* - * - * - Memberships that have a label called `foo` whose value is `bar`: - * - * labels.foo = bar - * - * - Memberships in the CREATING state: + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.gkehub.v1.Scope|Scope}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.list_scopes.js + * region_tag:gkehub_v1_generated_GkeHub_ListScopes_async + */ + listScopesAsync( + request?: protos.google.cloud.gkehub.v1.IListScopesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listScopes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listScopes iterate %j', request); + return this.descriptors.page.listScopes.asyncIterate( + this.innerApiCalls['listScopes'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists permitted Scopes. * - * state = CREATING - * @param {string} [request.orderBy] - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListPermittedScopes` which + * specifies the position in the list from where to continue listing the + * resources. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.gkehub.v1.Membership|Membership}. + * The first element of the array is Array of {@link protos.google.cloud.gkehub.v1.Scope|Scope}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listMembershipsAsync()` + * We recommend using `listPermittedScopesAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listMemberships( - request?: protos.google.cloud.gkehub.v1.IListMembershipsRequest, + listPermittedScopes( + request?: protos.google.cloud.gkehub.v1.IListPermittedScopesRequest, options?: CallOptions): Promise<[ - protos.google.cloud.gkehub.v1.IMembership[], - protos.google.cloud.gkehub.v1.IListMembershipsRequest|null, - protos.google.cloud.gkehub.v1.IListMembershipsResponse + protos.google.cloud.gkehub.v1.IScope[], + protos.google.cloud.gkehub.v1.IListPermittedScopesRequest|null, + protos.google.cloud.gkehub.v1.IListPermittedScopesResponse ]>; - listMemberships( - request: protos.google.cloud.gkehub.v1.IListMembershipsRequest, + listPermittedScopes( + request: protos.google.cloud.gkehub.v1.IListPermittedScopesRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.gkehub.v1.IListMembershipsRequest, - protos.google.cloud.gkehub.v1.IListMembershipsResponse|null|undefined, - protos.google.cloud.gkehub.v1.IMembership>): void; - listMemberships( - request: protos.google.cloud.gkehub.v1.IListMembershipsRequest, + protos.google.cloud.gkehub.v1.IListPermittedScopesRequest, + protos.google.cloud.gkehub.v1.IListPermittedScopesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IScope>): void; + listPermittedScopes( + request: protos.google.cloud.gkehub.v1.IListPermittedScopesRequest, callback: PaginationCallback< - protos.google.cloud.gkehub.v1.IListMembershipsRequest, - protos.google.cloud.gkehub.v1.IListMembershipsResponse|null|undefined, - protos.google.cloud.gkehub.v1.IMembership>): void; - listMemberships( - request?: protos.google.cloud.gkehub.v1.IListMembershipsRequest, + protos.google.cloud.gkehub.v1.IListPermittedScopesRequest, + protos.google.cloud.gkehub.v1.IListPermittedScopesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IScope>): void; + listPermittedScopes( + request?: protos.google.cloud.gkehub.v1.IListPermittedScopesRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.gkehub.v1.IListPermittedScopesRequest, + protos.google.cloud.gkehub.v1.IListPermittedScopesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IScope>, + callback?: PaginationCallback< + protos.google.cloud.gkehub.v1.IListPermittedScopesRequest, + protos.google.cloud.gkehub.v1.IListPermittedScopesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IScope>): + Promise<[ + protos.google.cloud.gkehub.v1.IScope[], + protos.google.cloud.gkehub.v1.IListPermittedScopesRequest|null, + protos.google.cloud.gkehub.v1.IListPermittedScopesResponse + ]>|void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } + else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + this.initialize().catch(err => {throw err}); + const wrappedCallback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListPermittedScopesRequest, + protos.google.cloud.gkehub.v1.IListPermittedScopesResponse|null|undefined, + protos.google.cloud.gkehub.v1.IScope>|undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listPermittedScopes values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listPermittedScopes request %j', request); + return this.innerApiCalls + .listPermittedScopes(request, options, wrappedCallback) + ?.then(([response, input, output]: [ + protos.google.cloud.gkehub.v1.IScope[], + protos.google.cloud.gkehub.v1.IListPermittedScopesRequest|null, + protos.google.cloud.gkehub.v1.IListPermittedScopesResponse + ]) => { + this._log.info('listPermittedScopes values %j', response); + return [response, input, output]; + }); + } + +/** + * Equivalent to `listPermittedScopes`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListPermittedScopes` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.gkehub.v1.Scope|Scope} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listPermittedScopesAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listPermittedScopesStream( + request?: protos.google.cloud.gkehub.v1.IListPermittedScopesRequest, + options?: CallOptions): + Transform{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPermittedScopes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPermittedScopes stream %j', request); + return this.descriptors.page.listPermittedScopes.createStream( + this.innerApiCalls.listPermittedScopes as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listPermittedScopes`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Scope will be listed. + * Specified in the format `projects/* /locations/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListPermittedScopes` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.gkehub.v1.Scope|Scope}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/gke_hub.list_permitted_scopes.js + * region_tag:gkehub_v1_generated_GkeHub_ListPermittedScopes_async + */ + listPermittedScopesAsync( + request?: protos.google.cloud.gkehub.v1.IListPermittedScopesRequest, + options?: CallOptions): + AsyncIterable{ + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers[ + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listPermittedScopes']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listPermittedScopes iterate %j', request); + return this.descriptors.page.listPermittedScopes.asyncIterate( + this.innerApiCalls['listPermittedScopes'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists MembershipBindings. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent Membership for which the MembershipBindings will be + * listed. Specified in the format `projects/* /locations/* /memberships/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to `ListMembershipBindings` which + * specifies the position in the list from where to continue listing the + * resources. + * @param {string} [request.filter] + * Optional. Lists MembershipBindings that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.gkehub.v1.MembershipBinding|MembershipBinding}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listMembershipBindingsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMembershipBindings( + request?: protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.gkehub.v1.IMembershipBinding[], + protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest|null, + protos.google.cloud.gkehub.v1.IListMembershipBindingsResponse + ]>; + listMembershipBindings( + request: protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest, + protos.google.cloud.gkehub.v1.IListMembershipBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembershipBinding>): void; + listMembershipBindings( + request: protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest, + callback: PaginationCallback< + protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest, + protos.google.cloud.gkehub.v1.IListMembershipBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembershipBinding>): void; + listMembershipBindings( + request?: protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest, optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.gkehub.v1.IListMembershipsRequest, - protos.google.cloud.gkehub.v1.IListMembershipsResponse|null|undefined, - protos.google.cloud.gkehub.v1.IMembership>, + protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest, + protos.google.cloud.gkehub.v1.IListMembershipBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembershipBinding>, callback?: PaginationCallback< - protos.google.cloud.gkehub.v1.IListMembershipsRequest, - protos.google.cloud.gkehub.v1.IListMembershipsResponse|null|undefined, - protos.google.cloud.gkehub.v1.IMembership>): + protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest, + protos.google.cloud.gkehub.v1.IListMembershipBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembershipBinding>): Promise<[ - protos.google.cloud.gkehub.v1.IMembership[], - protos.google.cloud.gkehub.v1.IListMembershipsRequest|null, - protos.google.cloud.gkehub.v1.IListMembershipsResponse + protos.google.cloud.gkehub.v1.IMembershipBinding[], + protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest|null, + protos.google.cloud.gkehub.v1.IListMembershipBindingsResponse ]>|void { request = request || {}; let options: CallOptions; @@ -1640,80 +6312,58 @@ export class GkeHubClient { }); this.initialize().catch(err => {throw err}); const wrappedCallback: PaginationCallback< - protos.google.cloud.gkehub.v1.IListMembershipsRequest, - protos.google.cloud.gkehub.v1.IListMembershipsResponse|null|undefined, - protos.google.cloud.gkehub.v1.IMembership>|undefined = callback + protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest, + protos.google.cloud.gkehub.v1.IListMembershipBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IMembershipBinding>|undefined = callback ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listMemberships values %j', values); + this._log.info('listMembershipBindings values %j', values); callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. } : undefined; - this._log.info('listMemberships request %j', request); + this._log.info('listMembershipBindings request %j', request); return this.innerApiCalls - .listMemberships(request, options, wrappedCallback) + .listMembershipBindings(request, options, wrappedCallback) ?.then(([response, input, output]: [ - protos.google.cloud.gkehub.v1.IMembership[], - protos.google.cloud.gkehub.v1.IListMembershipsRequest|null, - protos.google.cloud.gkehub.v1.IListMembershipsResponse + protos.google.cloud.gkehub.v1.IMembershipBinding[], + protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest|null, + protos.google.cloud.gkehub.v1.IListMembershipBindingsResponse ]) => { - this._log.info('listMemberships values %j', response); + this._log.info('listMembershipBindings values %j', response); return [response, input, output]; }); } /** - * Equivalent to `listMemberships`, but returns a NodeJS Stream object. + * Equivalent to `listMembershipBindings`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent (project and location) where the Memberships will be - * listed. Specified in the format `projects/* /locations/*`. - * `projects/* /locations/-` list memberships in all the regions. + * Required. The parent Membership for which the MembershipBindings will be + * listed. Specified in the format `projects/* /locations/* /memberships/*`. * @param {number} [request.pageSize] * Optional. When requesting a 'page' of resources, `page_size` specifies * number of resources to return. If unspecified or set to 0, all resources * will be returned. * @param {string} [request.pageToken] - * Optional. Token returned by previous call to `ListMemberships` which + * Optional. Token returned by previous call to `ListMembershipBindings` which * specifies the position in the list from where to continue listing the * resources. * @param {string} [request.filter] - * Optional. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. - * - * Examples: - * - * - Name is `bar` in project `foo-proj` and location `global`: - * - * name = "projects/foo-proj/locations/global/membership/bar" - * - * - Memberships that have a label called `foo`: - * - * labels.foo:* - * - * - Memberships that have a label called `foo` whose value is `bar`: - * - * labels.foo = bar - * - * - Memberships in the CREATING state: - * - * state = CREATING - * @param {string} [request.orderBy] - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. + * Optional. Lists MembershipBindings that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.gkehub.v1.Membership|Membership} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.gkehub.v1.MembershipBinding|MembershipBinding} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listMembershipsAsync()` + * We recommend using `listMembershipBindingsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listMembershipsStream( - request?: protos.google.cloud.gkehub.v1.IListMembershipsRequest, + listMembershipBindingsStream( + request?: protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest, options?: CallOptions): Transform{ request = request || {}; @@ -1725,75 +6375,53 @@ export class GkeHubClient { ] = this._gaxModule.routingHeader.fromParams({ 'parent': request.parent ?? '', }); - const defaultCallSettings = this._defaults['listMemberships']; + const defaultCallSettings = this._defaults['listMembershipBindings']; const callSettings = defaultCallSettings.merge(options); this.initialize().catch(err => {throw err}); - this._log.info('listMemberships stream %j', request); - return this.descriptors.page.listMemberships.createStream( - this.innerApiCalls.listMemberships as GaxCall, + this._log.info('listMembershipBindings stream %j', request); + return this.descriptors.page.listMembershipBindings.createStream( + this.innerApiCalls.listMembershipBindings as GaxCall, request, callSettings ); } /** - * Equivalent to `listMemberships`, but returns an iterable object. + * Equivalent to `listMembershipBindings`, but returns an iterable object. * * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The parent (project and location) where the Memberships will be - * listed. Specified in the format `projects/* /locations/*`. - * `projects/* /locations/-` list memberships in all the regions. + * Required. The parent Membership for which the MembershipBindings will be + * listed. Specified in the format `projects/* /locations/* /memberships/*`. * @param {number} [request.pageSize] * Optional. When requesting a 'page' of resources, `page_size` specifies * number of resources to return. If unspecified or set to 0, all resources * will be returned. * @param {string} [request.pageToken] - * Optional. Token returned by previous call to `ListMemberships` which + * Optional. Token returned by previous call to `ListMembershipBindings` which * specifies the position in the list from where to continue listing the * resources. * @param {string} [request.filter] - * Optional. Lists Memberships that match the filter expression, following the - * syntax outlined in https://google.aip.dev/160. - * - * Examples: - * - * - Name is `bar` in project `foo-proj` and location `global`: - * - * name = "projects/foo-proj/locations/global/membership/bar" - * - * - Memberships that have a label called `foo`: - * - * labels.foo:* - * - * - Memberships that have a label called `foo` whose value is `bar`: - * - * labels.foo = bar - * - * - Memberships in the CREATING state: - * - * state = CREATING - * @param {string} [request.orderBy] - * Optional. One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. + * Optional. Lists MembershipBindings that match the filter expression, + * following the syntax outlined in https://google.aip.dev/160. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.gkehub.v1.Membership|Membership}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.gkehub.v1.MembershipBinding|MembershipBinding}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/gke_hub.list_memberships.js - * region_tag:gkehub_v1_generated_GkeHub_ListMemberships_async + * @example include:samples/generated/v1/gke_hub.list_membership_bindings.js + * region_tag:gkehub_v1_generated_GkeHub_ListMembershipBindings_async */ - listMembershipsAsync( - request?: protos.google.cloud.gkehub.v1.IListMembershipsRequest, + listMembershipBindingsAsync( + request?: protos.google.cloud.gkehub.v1.IListMembershipBindingsRequest, options?: CallOptions): - AsyncIterable{ + AsyncIterable{ request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -1803,99 +6431,79 @@ export class GkeHubClient { ] = this._gaxModule.routingHeader.fromParams({ 'parent': request.parent ?? '', }); - const defaultCallSettings = this._defaults['listMemberships']; + const defaultCallSettings = this._defaults['listMembershipBindings']; const callSettings = defaultCallSettings.merge(options); this.initialize().catch(err => {throw err}); - this._log.info('listMemberships iterate %j', request); - return this.descriptors.page.listMemberships.asyncIterate( - this.innerApiCalls['listMemberships'] as GaxCall, + this._log.info('listMembershipBindings iterate %j', request); + return this.descriptors.page.listMembershipBindings.asyncIterate( + this.innerApiCalls['listMembershipBindings'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } /** - * Lists Features in a given project and location. + * Lists all Membership RBACRoleBindings. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/* /locations/*`. - * @param {number} request.pageSize - * When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * @param {string} request.pageToken - * Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * @param {string} request.filter - * Lists Features that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * - * Examples: - * - * - Feature with the name "servicemesh" in project "foo-proj": - * - * name = "projects/foo-proj/locations/global/features/servicemesh" - * - * - Features that have a label called `foo`: - * - * labels.foo:* - * - * - Features that have a label called `foo` whose value is `bar`: - * - * labels.foo = bar - * @param {string} request.orderBy - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. + * listed. Specified in the format `projects/* /locations/* /memberships/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to + * `ListMembershipRBACRoleBindings` which specifies the position in the list + * from where to continue listing the resources. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.gkehub.v1.Feature|Feature}. + * The first element of the array is Array of {@link protos.google.cloud.gkehub.v1.RBACRoleBinding|RBACRoleBinding}. * The client library will perform auto-pagination by default: it will call the API as many * times as needed and will merge results from all the pages into this array. * Note that it can affect your quota. - * We recommend using `listFeaturesAsync()` + * We recommend using `listMembershipRBACRoleBindingsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listFeatures( - request?: protos.google.cloud.gkehub.v1.IListFeaturesRequest, + listMembershipRBACRoleBindings( + request?: protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, options?: CallOptions): Promise<[ - protos.google.cloud.gkehub.v1.IFeature[], - protos.google.cloud.gkehub.v1.IListFeaturesRequest|null, - protos.google.cloud.gkehub.v1.IListFeaturesResponse + protos.google.cloud.gkehub.v1.IRBACRoleBinding[], + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest|null, + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse ]>; - listFeatures( - request: protos.google.cloud.gkehub.v1.IListFeaturesRequest, + listMembershipRBACRoleBindings( + request: protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, options: CallOptions, callback: PaginationCallback< - protos.google.cloud.gkehub.v1.IListFeaturesRequest, - protos.google.cloud.gkehub.v1.IListFeaturesResponse|null|undefined, - protos.google.cloud.gkehub.v1.IFeature>): void; - listFeatures( - request: protos.google.cloud.gkehub.v1.IListFeaturesRequest, + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding>): void; + listMembershipRBACRoleBindings( + request: protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, callback: PaginationCallback< - protos.google.cloud.gkehub.v1.IListFeaturesRequest, - protos.google.cloud.gkehub.v1.IListFeaturesResponse|null|undefined, - protos.google.cloud.gkehub.v1.IFeature>): void; - listFeatures( - request?: protos.google.cloud.gkehub.v1.IListFeaturesRequest, + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding>): void; + listMembershipRBACRoleBindings( + request?: protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.gkehub.v1.IListFeaturesRequest, - protos.google.cloud.gkehub.v1.IListFeaturesResponse|null|undefined, - protos.google.cloud.gkehub.v1.IFeature>, + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding>, callback?: PaginationCallback< - protos.google.cloud.gkehub.v1.IListFeaturesRequest, - protos.google.cloud.gkehub.v1.IListFeaturesResponse|null|undefined, - protos.google.cloud.gkehub.v1.IFeature>): + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding>): Promise<[ - protos.google.cloud.gkehub.v1.IFeature[], - protos.google.cloud.gkehub.v1.IListFeaturesRequest|null, - protos.google.cloud.gkehub.v1.IListFeaturesResponse + protos.google.cloud.gkehub.v1.IRBACRoleBinding[], + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest|null, + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse ]>|void { request = request || {}; let options: CallOptions; @@ -1916,75 +6524,55 @@ export class GkeHubClient { }); this.initialize().catch(err => {throw err}); const wrappedCallback: PaginationCallback< - protos.google.cloud.gkehub.v1.IListFeaturesRequest, - protos.google.cloud.gkehub.v1.IListFeaturesResponse|null|undefined, - protos.google.cloud.gkehub.v1.IFeature>|undefined = callback + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse|null|undefined, + protos.google.cloud.gkehub.v1.IRBACRoleBinding>|undefined = callback ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listFeatures values %j', values); + this._log.info('listMembershipRBACRoleBindings values %j', values); callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. } : undefined; - this._log.info('listFeatures request %j', request); + this._log.info('listMembershipRBACRoleBindings request %j', request); return this.innerApiCalls - .listFeatures(request, options, wrappedCallback) + .listMembershipRbacRoleBindings(request, options, wrappedCallback) ?.then(([response, input, output]: [ - protos.google.cloud.gkehub.v1.IFeature[], - protos.google.cloud.gkehub.v1.IListFeaturesRequest|null, - protos.google.cloud.gkehub.v1.IListFeaturesResponse + protos.google.cloud.gkehub.v1.IRBACRoleBinding[], + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest|null, + protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsResponse ]) => { - this._log.info('listFeatures values %j', response); + this._log.info('listMembershipRBACRoleBindings values %j', response); return [response, input, output]; }); } /** - * Equivalent to `listFeatures`, but returns a NodeJS Stream object. + * Equivalent to `listMembershipRBACRoleBindings`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/* /locations/*`. - * @param {number} request.pageSize - * When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * @param {string} request.pageToken - * Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * @param {string} request.filter - * Lists Features that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * - * Examples: - * - * - Feature with the name "servicemesh" in project "foo-proj": - * - * name = "projects/foo-proj/locations/global/features/servicemesh" - * - * - Features that have a label called `foo`: - * - * labels.foo:* - * - * - Features that have a label called `foo` whose value is `bar`: - * - * labels.foo = bar - * @param {string} request.orderBy - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. + * listed. Specified in the format `projects/* /locations/* /memberships/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to + * `ListMembershipRBACRoleBindings` which specifies the position in the list + * from where to continue listing the resources. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.gkehub.v1.Feature|Feature} on 'data' event. + * An object stream which emits an object representing {@link protos.google.cloud.gkehub.v1.RBACRoleBinding|RBACRoleBinding} on 'data' event. * The client library will perform auto-pagination by default: it will call the API as many * times as needed. Note that it can affect your quota. - * We recommend using `listFeaturesAsync()` + * We recommend using `listMembershipRBACRoleBindingsAsync()` * method described below for async iteration which you can stop as needed. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. */ - listFeaturesStream( - request?: protos.google.cloud.gkehub.v1.IListFeaturesRequest, + listMembershipRBACRoleBindingsStream( + request?: protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, options?: CallOptions): Transform{ request = request || {}; @@ -1992,74 +6580,54 @@ export class GkeHubClient { options.otherArgs = options.otherArgs || {}; options.otherArgs.headers = options.otherArgs.headers || {}; options.otherArgs.headers[ - 'x-goog-request-params' - ] = this._gaxModule.routingHeader.fromParams({ - 'parent': request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listFeatures']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch(err => {throw err}); - this._log.info('listFeatures stream %j', request); - return this.descriptors.page.listFeatures.createStream( - this.innerApiCalls.listFeatures as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listFeatures`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The parent (project and location) where the Features will be - * listed. Specified in the format `projects/* /locations/*`. - * @param {number} request.pageSize - * When requesting a 'page' of resources, `page_size` specifies number of - * resources to return. If unspecified or set to 0, all resources will - * be returned. - * @param {string} request.pageToken - * Token returned by previous call to `ListFeatures` which - * specifies the position in the list from where to continue listing the - * resources. - * @param {string} request.filter - * Lists Features that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. - * - * Examples: - * - * - Feature with the name "servicemesh" in project "foo-proj": - * - * name = "projects/foo-proj/locations/global/features/servicemesh" - * - * - Features that have a label called `foo`: - * - * labels.foo:* - * - * - Features that have a label called `foo` whose value is `bar`: + 'x-goog-request-params' + ] = this._gaxModule.routingHeader.fromParams({ + 'parent': request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMembershipRbacRoleBindings']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch(err => {throw err}); + this._log.info('listMembershipRBACRoleBindings stream %j', request); + return this.descriptors.page.listMembershipRBACRoleBindings.createStream( + this.innerApiCalls.listMembershipRbacRoleBindings as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listMembershipRBACRoleBindings`, but returns an iterable object. * - * labels.foo = bar - * @param {string} request.orderBy - * One or more fields to compare and use to sort the output. - * See https://google.aip.dev/132#ordering. + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent (project and location) where the Features will be + * listed. Specified in the format `projects/* /locations/* /memberships/*`. + * @param {number} [request.pageSize] + * Optional. When requesting a 'page' of resources, `page_size` specifies + * number of resources to return. If unspecified or set to 0, all resources + * will be returned. + * @param {string} [request.pageToken] + * Optional. Token returned by previous call to + * `ListMembershipRBACRoleBindings` which specifies the position in the list + * from where to continue listing the resources. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Object} * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.gkehub.v1.Feature|Feature}. The API will be called under the hood as needed, once per the page, + * {@link protos.google.cloud.gkehub.v1.RBACRoleBinding|RBACRoleBinding}. The API will be called under the hood as needed, once per the page, * so you can stop the iteration when you don't need more results. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } * for more details and examples. - * @example include:samples/generated/v1/gke_hub.list_features.js - * region_tag:gkehub_v1_generated_GkeHub_ListFeatures_async + * @example include:samples/generated/v1/gke_hub.list_membership_r_b_a_c_role_bindings.js + * region_tag:gkehub_v1_generated_GkeHub_ListMembershipRBACRoleBindings_async */ - listFeaturesAsync( - request?: protos.google.cloud.gkehub.v1.IListFeaturesRequest, + listMembershipRBACRoleBindingsAsync( + request?: protos.google.cloud.gkehub.v1.IListMembershipRBACRoleBindingsRequest, options?: CallOptions): - AsyncIterable{ + AsyncIterable{ request = request || {}; options = options || {}; options.otherArgs = options.otherArgs || {}; @@ -2069,15 +6637,15 @@ export class GkeHubClient { ] = this._gaxModule.routingHeader.fromParams({ 'parent': request.parent ?? '', }); - const defaultCallSettings = this._defaults['listFeatures']; + const defaultCallSettings = this._defaults['listMembershipRbacRoleBindings']; const callSettings = defaultCallSettings.merge(options); this.initialize().catch(err => {throw err}); - this._log.info('listFeatures iterate %j', request); - return this.descriptors.page.listFeatures.asyncIterate( - this.innerApiCalls['listFeatures'] as GaxCall, + this._log.info('listMembershipRBACRoleBindings iterate %j', request); + return this.descriptors.page.listMembershipRBACRoleBindings.asyncIterate( + this.innerApiCalls['listMembershipRbacRoleBindings'] as GaxCall, request as {}, callSettings - ) as AsyncIterable; + ) as AsyncIterable; } // -------------------- // -- Path templates -- @@ -2217,6 +6785,179 @@ export class GkeHubClient { return this.pathTemplates.membershipPathTemplate.match(membershipName).membership; } + /** + * Return a fully-qualified membershipBinding resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} membership + * @param {string} membershipbinding + * @returns {string} Resource name string. + */ + membershipBindingPath(project:string,location:string,membership:string,membershipbinding:string) { + return this.pathTemplates.membershipBindingPathTemplate.render({ + project: project, + location: location, + membership: membership, + membershipbinding: membershipbinding, + }); + } + + /** + * Parse the project from MembershipBinding resource. + * + * @param {string} membershipBindingName + * A fully-qualified path representing MembershipBinding resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMembershipBindingName(membershipBindingName: string) { + return this.pathTemplates.membershipBindingPathTemplate.match(membershipBindingName).project; + } + + /** + * Parse the location from MembershipBinding resource. + * + * @param {string} membershipBindingName + * A fully-qualified path representing MembershipBinding resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMembershipBindingName(membershipBindingName: string) { + return this.pathTemplates.membershipBindingPathTemplate.match(membershipBindingName).location; + } + + /** + * Parse the membership from MembershipBinding resource. + * + * @param {string} membershipBindingName + * A fully-qualified path representing MembershipBinding resource. + * @returns {string} A string representing the membership. + */ + matchMembershipFromMembershipBindingName(membershipBindingName: string) { + return this.pathTemplates.membershipBindingPathTemplate.match(membershipBindingName).membership; + } + + /** + * Parse the membershipbinding from MembershipBinding resource. + * + * @param {string} membershipBindingName + * A fully-qualified path representing MembershipBinding resource. + * @returns {string} A string representing the membershipbinding. + */ + matchMembershipbindingFromMembershipBindingName(membershipBindingName: string) { + return this.pathTemplates.membershipBindingPathTemplate.match(membershipBindingName).membershipbinding; + } + + /** + * Return a fully-qualified namespace resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} scope + * @param {string} namespace + * @returns {string} Resource name string. + */ + namespacePath(project:string,location:string,scope:string,namespace:string) { + return this.pathTemplates.namespacePathTemplate.render({ + project: project, + location: location, + scope: scope, + namespace: namespace, + }); + } + + /** + * Parse the project from Namespace resource. + * + * @param {string} namespaceName + * A fully-qualified path representing Namespace resource. + * @returns {string} A string representing the project. + */ + matchProjectFromNamespaceName(namespaceName: string) { + return this.pathTemplates.namespacePathTemplate.match(namespaceName).project; + } + + /** + * Parse the location from Namespace resource. + * + * @param {string} namespaceName + * A fully-qualified path representing Namespace resource. + * @returns {string} A string representing the location. + */ + matchLocationFromNamespaceName(namespaceName: string) { + return this.pathTemplates.namespacePathTemplate.match(namespaceName).location; + } + + /** + * Parse the scope from Namespace resource. + * + * @param {string} namespaceName + * A fully-qualified path representing Namespace resource. + * @returns {string} A string representing the scope. + */ + matchScopeFromNamespaceName(namespaceName: string) { + return this.pathTemplates.namespacePathTemplate.match(namespaceName).scope; + } + + /** + * Parse the namespace from Namespace resource. + * + * @param {string} namespaceName + * A fully-qualified path representing Namespace resource. + * @returns {string} A string representing the namespace. + */ + matchNamespaceFromNamespaceName(namespaceName: string) { + return this.pathTemplates.namespacePathTemplate.match(namespaceName).namespace; + } + + /** + * Return a fully-qualified organizationLocationFleet resource name string. + * + * @param {string} organization + * @param {string} location + * @param {string} fleet + * @returns {string} Resource name string. + */ + organizationLocationFleetPath(organization:string,location:string,fleet:string) { + return this.pathTemplates.organizationLocationFleetPathTemplate.render({ + organization: organization, + location: location, + fleet: fleet, + }); + } + + /** + * Parse the organization from OrganizationLocationFleet resource. + * + * @param {string} organizationLocationFleetName + * A fully-qualified path representing organization_location_fleet resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationLocationFleetName(organizationLocationFleetName: string) { + return this.pathTemplates.organizationLocationFleetPathTemplate.match(organizationLocationFleetName).organization; + } + + /** + * Parse the location from OrganizationLocationFleet resource. + * + * @param {string} organizationLocationFleetName + * A fully-qualified path representing organization_location_fleet resource. + * @returns {string} A string representing the location. + */ + matchLocationFromOrganizationLocationFleetName(organizationLocationFleetName: string) { + return this.pathTemplates.organizationLocationFleetPathTemplate.match(organizationLocationFleetName).location; + } + + /** + * Parse the fleet from OrganizationLocationFleet resource. + * + * @param {string} organizationLocationFleetName + * A fully-qualified path representing organization_location_fleet resource. + * @returns {string} A string representing the fleet. + */ + matchFleetFromOrganizationLocationFleetName(organizationLocationFleetName: string) { + return this.pathTemplates.organizationLocationFleetPathTemplate.match(organizationLocationFleetName).fleet; + } + /** * Return a fully-qualified project resource name string. * @@ -2240,6 +6981,228 @@ export class GkeHubClient { return this.pathTemplates.projectPathTemplate.match(projectName).project; } + /** + * Return a fully-qualified projectLocationFleet resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} fleet + * @returns {string} Resource name string. + */ + projectLocationFleetPath(project:string,location:string,fleet:string) { + return this.pathTemplates.projectLocationFleetPathTemplate.render({ + project: project, + location: location, + fleet: fleet, + }); + } + + /** + * Parse the project from ProjectLocationFleet resource. + * + * @param {string} projectLocationFleetName + * A fully-qualified path representing project_location_fleet resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationFleetName(projectLocationFleetName: string) { + return this.pathTemplates.projectLocationFleetPathTemplate.match(projectLocationFleetName).project; + } + + /** + * Parse the location from ProjectLocationFleet resource. + * + * @param {string} projectLocationFleetName + * A fully-qualified path representing project_location_fleet resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationFleetName(projectLocationFleetName: string) { + return this.pathTemplates.projectLocationFleetPathTemplate.match(projectLocationFleetName).location; + } + + /** + * Parse the fleet from ProjectLocationFleet resource. + * + * @param {string} projectLocationFleetName + * A fully-qualified path representing project_location_fleet resource. + * @returns {string} A string representing the fleet. + */ + matchFleetFromProjectLocationFleetName(projectLocationFleetName: string) { + return this.pathTemplates.projectLocationFleetPathTemplate.match(projectLocationFleetName).fleet; + } + + /** + * Return a fully-qualified projectLocationMembershipRbacrolebinding resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} membership + * @param {string} rbacrolebinding + * @returns {string} Resource name string. + */ + projectLocationMembershipRbacrolebindingPath(project:string,location:string,membership:string,rbacrolebinding:string) { + return this.pathTemplates.projectLocationMembershipRbacrolebindingPathTemplate.render({ + project: project, + location: location, + membership: membership, + rbacrolebinding: rbacrolebinding, + }); + } + + /** + * Parse the project from ProjectLocationMembershipRbacrolebinding resource. + * + * @param {string} projectLocationMembershipRbacrolebindingName + * A fully-qualified path representing project_location_membership_rbacrolebinding resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationMembershipRbacrolebindingName(projectLocationMembershipRbacrolebindingName: string) { + return this.pathTemplates.projectLocationMembershipRbacrolebindingPathTemplate.match(projectLocationMembershipRbacrolebindingName).project; + } + + /** + * Parse the location from ProjectLocationMembershipRbacrolebinding resource. + * + * @param {string} projectLocationMembershipRbacrolebindingName + * A fully-qualified path representing project_location_membership_rbacrolebinding resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationMembershipRbacrolebindingName(projectLocationMembershipRbacrolebindingName: string) { + return this.pathTemplates.projectLocationMembershipRbacrolebindingPathTemplate.match(projectLocationMembershipRbacrolebindingName).location; + } + + /** + * Parse the membership from ProjectLocationMembershipRbacrolebinding resource. + * + * @param {string} projectLocationMembershipRbacrolebindingName + * A fully-qualified path representing project_location_membership_rbacrolebinding resource. + * @returns {string} A string representing the membership. + */ + matchMembershipFromProjectLocationMembershipRbacrolebindingName(projectLocationMembershipRbacrolebindingName: string) { + return this.pathTemplates.projectLocationMembershipRbacrolebindingPathTemplate.match(projectLocationMembershipRbacrolebindingName).membership; + } + + /** + * Parse the rbacrolebinding from ProjectLocationMembershipRbacrolebinding resource. + * + * @param {string} projectLocationMembershipRbacrolebindingName + * A fully-qualified path representing project_location_membership_rbacrolebinding resource. + * @returns {string} A string representing the rbacrolebinding. + */ + matchRbacrolebindingFromProjectLocationMembershipRbacrolebindingName(projectLocationMembershipRbacrolebindingName: string) { + return this.pathTemplates.projectLocationMembershipRbacrolebindingPathTemplate.match(projectLocationMembershipRbacrolebindingName).rbacrolebinding; + } + + /** + * Return a fully-qualified projectLocationScopeRbacrolebinding resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} scope + * @param {string} rbacrolebinding + * @returns {string} Resource name string. + */ + projectLocationScopeRbacrolebindingPath(project:string,location:string,scope:string,rbacrolebinding:string) { + return this.pathTemplates.projectLocationScopeRbacrolebindingPathTemplate.render({ + project: project, + location: location, + scope: scope, + rbacrolebinding: rbacrolebinding, + }); + } + + /** + * Parse the project from ProjectLocationScopeRbacrolebinding resource. + * + * @param {string} projectLocationScopeRbacrolebindingName + * A fully-qualified path representing project_location_scope_rbacrolebinding resource. + * @returns {string} A string representing the project. + */ + matchProjectFromProjectLocationScopeRbacrolebindingName(projectLocationScopeRbacrolebindingName: string) { + return this.pathTemplates.projectLocationScopeRbacrolebindingPathTemplate.match(projectLocationScopeRbacrolebindingName).project; + } + + /** + * Parse the location from ProjectLocationScopeRbacrolebinding resource. + * + * @param {string} projectLocationScopeRbacrolebindingName + * A fully-qualified path representing project_location_scope_rbacrolebinding resource. + * @returns {string} A string representing the location. + */ + matchLocationFromProjectLocationScopeRbacrolebindingName(projectLocationScopeRbacrolebindingName: string) { + return this.pathTemplates.projectLocationScopeRbacrolebindingPathTemplate.match(projectLocationScopeRbacrolebindingName).location; + } + + /** + * Parse the scope from ProjectLocationScopeRbacrolebinding resource. + * + * @param {string} projectLocationScopeRbacrolebindingName + * A fully-qualified path representing project_location_scope_rbacrolebinding resource. + * @returns {string} A string representing the scope. + */ + matchScopeFromProjectLocationScopeRbacrolebindingName(projectLocationScopeRbacrolebindingName: string) { + return this.pathTemplates.projectLocationScopeRbacrolebindingPathTemplate.match(projectLocationScopeRbacrolebindingName).scope; + } + + /** + * Parse the rbacrolebinding from ProjectLocationScopeRbacrolebinding resource. + * + * @param {string} projectLocationScopeRbacrolebindingName + * A fully-qualified path representing project_location_scope_rbacrolebinding resource. + * @returns {string} A string representing the rbacrolebinding. + */ + matchRbacrolebindingFromProjectLocationScopeRbacrolebindingName(projectLocationScopeRbacrolebindingName: string) { + return this.pathTemplates.projectLocationScopeRbacrolebindingPathTemplate.match(projectLocationScopeRbacrolebindingName).rbacrolebinding; + } + + /** + * Return a fully-qualified scope resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} scope + * @returns {string} Resource name string. + */ + scopePath(project:string,location:string,scope:string) { + return this.pathTemplates.scopePathTemplate.render({ + project: project, + location: location, + scope: scope, + }); + } + + /** + * Parse the project from Scope resource. + * + * @param {string} scopeName + * A fully-qualified path representing Scope resource. + * @returns {string} A string representing the project. + */ + matchProjectFromScopeName(scopeName: string) { + return this.pathTemplates.scopePathTemplate.match(scopeName).project; + } + + /** + * Parse the location from Scope resource. + * + * @param {string} scopeName + * A fully-qualified path representing Scope resource. + * @returns {string} A string representing the location. + */ + matchLocationFromScopeName(scopeName: string) { + return this.pathTemplates.scopePathTemplate.match(scopeName).location; + } + + /** + * Parse the scope from Scope resource. + * + * @param {string} scopeName + * A fully-qualified path representing Scope resource. + * @returns {string} A string representing the scope. + */ + matchScopeFromScopeName(scopeName: string) { + return this.pathTemplates.scopePathTemplate.match(scopeName).scope; + } + /** * Terminate the gRPC channel and close the client. * diff --git a/packages/google-cloud-gkehub/src/v1/gke_hub_client_config.json b/packages/google-cloud-gkehub/src/v1/gke_hub_client_config.json index e5baeaac099..7883fdf21ba 100644 --- a/packages/google-cloud-gkehub/src/v1/gke_hub_client_config.json +++ b/packages/google-cloud-gkehub/src/v1/gke_hub_client_config.json @@ -37,6 +37,11 @@ "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, + "ListBoundMemberships": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, "ListFeatures": { "timeout_millis": 60000, "retry_codes_name": "unavailable", @@ -86,6 +91,166 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateFleet": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetFleet": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateFleet": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteFleet": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListFleets": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetScopeNamespace": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateScopeNamespace": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateScopeNamespace": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteScopeNamespace": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListScopeNamespaces": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetScopeRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateScopeRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateScopeRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteScopeRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListScopeRBACRoleBindings": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetScope": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateScope": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateScope": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteScope": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListScopes": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListPermittedScopes": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetMembershipBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateMembershipBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateMembershipBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteMembershipBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListMembershipBindings": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetMembershipRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "CreateMembershipRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "UpdateMembershipRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteMembershipRBACRoleBinding": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListMembershipRBACRoleBindings": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GenerateMembershipRBACRoleBindingYAML": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" } } } diff --git a/packages/google-cloud-gkehub/src/v1/gke_hub_proto_list.json b/packages/google-cloud-gkehub/src/v1/gke_hub_proto_list.json index a96b9a7a883..06787da250f 100644 --- a/packages/google-cloud-gkehub/src/v1/gke_hub_proto_list.json +++ b/packages/google-cloud-gkehub/src/v1/gke_hub_proto_list.json @@ -1,7 +1,9 @@ [ "../../protos/google/cloud/gkehub/v1/configmanagement/configmanagement.proto", "../../protos/google/cloud/gkehub/v1/feature.proto", + "../../protos/google/cloud/gkehub/v1/fleet.proto", "../../protos/google/cloud/gkehub/v1/membership.proto", "../../protos/google/cloud/gkehub/v1/multiclusteringress/multiclusteringress.proto", + "../../protos/google/cloud/gkehub/v1/rbacrolebindingactuation/rbacrolebindingactuation.proto", "../../protos/google/cloud/gkehub/v1/service.proto" ] diff --git a/packages/google-cloud-gkehub/test/gapic_gke_hub_v1.ts b/packages/google-cloud-gkehub/test/gapic_gke_hub_v1.ts index 1a638778221..43c4c463179 100644 --- a/packages/google-cloud-gkehub/test/gapic_gke_hub_v1.ts +++ b/packages/google-cloud-gkehub/test/gapic_gke_hub_v1.ts @@ -599,58 +599,55 @@ describe('v1.GkeHubClient', () => { }); }); - describe('createMembership', () => { - it('invokes createMembership without error', async () => { + describe('getFleet', () => { + it('invokes getFleet without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.CreateMembershipRequest() + new protos.google.cloud.gkehub.v1.GetFleetRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + getTypeDefaultValue('.google.cloud.gkehub.v1.GetFleetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.gkehub.v1.Fleet() ); - client.innerApiCalls.createMembership = stubLongRunningCall(expectedResponse); - const [operation] = await client.createMembership(request); - const [response] = await operation.promise(); + client.innerApiCalls.getFleet = stubSimpleCall(expectedResponse); + const [response] = await client.getFleet(request); assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createMembership as SinonStub) + const actualRequest = (client.innerApiCalls.getFleet as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createMembership as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getFleet as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createMembership without error using callback', async () => { + it('invokes getFleet without error using callback', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.CreateMembershipRequest() + new protos.google.cloud.gkehub.v1.GetFleetRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + getTypeDefaultValue('.google.cloud.gkehub.v1.GetFleetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.gkehub.v1.Fleet() ); - client.innerApiCalls.createMembership = stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getFleet = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createMembership( + client.getFleet( request, - (err?: Error|null, - result?: LROperation|null - ) => { + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IFleet|null) => { if (err) { reject(err); } else { @@ -658,153 +655,107 @@ describe('v1.GkeHubClient', () => { } }); }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createMembership as SinonStub) + const actualRequest = (client.innerApiCalls.getFleet as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createMembership as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getFleet as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createMembership with call error', async () => { + it('invokes getFleet with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.CreateMembershipRequest() + new protos.google.cloud.gkehub.v1.GetFleetRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + getTypeDefaultValue('.google.cloud.gkehub.v1.GetFleetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.innerApiCalls.createMembership = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createMembership(request), expectedError); - const actualRequest = (client.innerApiCalls.createMembership as SinonStub) + client.innerApiCalls.getFleet = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getFleet(request), expectedError); + const actualRequest = (client.innerApiCalls.getFleet as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createMembership as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getFleet as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createMembership with LRO error', async () => { + it('invokes getFleet with closed client', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.CreateMembershipRequest() + new protos.google.cloud.gkehub.v1.GetFleetRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createMembership = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createMembership(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createMembership as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createMembership as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateMembershipProgress without error', async () => { - const client = new gkehubModule.v1.GkeHubClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateMembershipProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateMembershipProgress with error', async () => { - const client = new gkehubModule.v1.GkeHubClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateMembershipProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetFleetRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getFleet(request), expectedError); }); }); - describe('createFeature', () => { - it('invokes createFeature without error', async () => { + describe('getScopeNamespace', () => { + it('invokes getScopeNamespace without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.CreateFeatureRequest() + new protos.google.cloud.gkehub.v1.GetScopeNamespaceRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.CreateFeatureRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + getTypeDefaultValue('.google.cloud.gkehub.v1.GetScopeNamespaceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.gkehub.v1.Namespace() ); - client.innerApiCalls.createFeature = stubLongRunningCall(expectedResponse); - const [operation] = await client.createFeature(request); - const [response] = await operation.promise(); + client.innerApiCalls.getScopeNamespace = stubSimpleCall(expectedResponse); + const [response] = await client.getScopeNamespace(request); assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createFeature as SinonStub) + const actualRequest = (client.innerApiCalls.getScopeNamespace as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFeature as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getScopeNamespace as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createFeature without error using callback', async () => { + it('invokes getScopeNamespace without error using callback', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.CreateFeatureRequest() + new protos.google.cloud.gkehub.v1.GetScopeNamespaceRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.CreateFeatureRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + getTypeDefaultValue('.google.cloud.gkehub.v1.GetScopeNamespaceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.gkehub.v1.Namespace() ); - client.innerApiCalls.createFeature = stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getScopeNamespace = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.createFeature( + client.getScopeNamespace( request, - (err?: Error|null, - result?: LROperation|null - ) => { + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.INamespace|null) => { if (err) { reject(err); } else { @@ -812,153 +763,107 @@ describe('v1.GkeHubClient', () => { } }); }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createFeature as SinonStub) + const actualRequest = (client.innerApiCalls.getScopeNamespace as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFeature as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getScopeNamespace as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createFeature with call error', async () => { + it('invokes getScopeNamespace with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.CreateFeatureRequest() + new protos.google.cloud.gkehub.v1.GetScopeNamespaceRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.CreateFeatureRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + getTypeDefaultValue('.google.cloud.gkehub.v1.GetScopeNamespaceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.innerApiCalls.createFeature = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createFeature(request), expectedError); - const actualRequest = (client.innerApiCalls.createFeature as SinonStub) + client.innerApiCalls.getScopeNamespace = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getScopeNamespace(request), expectedError); + const actualRequest = (client.innerApiCalls.getScopeNamespace as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFeature as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getScopeNamespace as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes createFeature with LRO error', async () => { + it('invokes getScopeNamespace with closed client', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.CreateFeatureRequest() + new protos.google.cloud.gkehub.v1.GetScopeNamespaceRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.CreateFeatureRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.createFeature = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createFeature(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createFeature as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createFeature as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateFeatureProgress without error', async () => { - const client = new gkehubModule.v1.GkeHubClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkCreateFeatureProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateFeatureProgress with error', async () => { - const client = new gkehubModule.v1.GkeHubClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateFeatureProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetScopeNamespaceRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getScopeNamespace(request), expectedError); }); }); - describe('deleteMembership', () => { - it('invokes deleteMembership without error', async () => { + describe('getScopeRBACRoleBinding', () => { + it('invokes getScopeRBACRoleBinding without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.DeleteMembershipRequest() + new protos.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipRequest', ['name']); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest', ['name']); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.gkehub.v1.RBACRoleBinding() ); - client.innerApiCalls.deleteMembership = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteMembership(request); - const [response] = await operation.promise(); + client.innerApiCalls.getScopeRbacRoleBinding = stubSimpleCall(expectedResponse); + const [response] = await client.getScopeRBACRoleBinding(request); assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteMembership as SinonStub) + const actualRequest = (client.innerApiCalls.getScopeRbacRoleBinding as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteMembership as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getScopeRbacRoleBinding as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteMembership without error using callback', async () => { + it('invokes getScopeRBACRoleBinding without error using callback', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.DeleteMembershipRequest() + new protos.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipRequest', ['name']); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest', ['name']); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.gkehub.v1.RBACRoleBinding() ); - client.innerApiCalls.deleteMembership = stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getScopeRbacRoleBinding = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteMembership( + client.getScopeRBACRoleBinding( request, - (err?: Error|null, - result?: LROperation|null - ) => { + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IRBACRoleBinding|null) => { if (err) { reject(err); } else { @@ -966,153 +871,215 @@ describe('v1.GkeHubClient', () => { } }); }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteMembership as SinonStub) + const actualRequest = (client.innerApiCalls.getScopeRbacRoleBinding as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteMembership as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getScopeRbacRoleBinding as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteMembership with call error', async () => { + it('invokes getScopeRBACRoleBinding with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.DeleteMembershipRequest() + new protos.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipRequest', ['name']); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest', ['name']); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteMembership = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteMembership(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteMembership as SinonStub) + client.innerApiCalls.getScopeRbacRoleBinding = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getScopeRBACRoleBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.getScopeRbacRoleBinding as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteMembership as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getScopeRbacRoleBinding as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteMembership with LRO error', async () => { + it('invokes getScopeRBACRoleBinding with closed client', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.DeleteMembershipRequest() + new protos.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipRequest', ['name']); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetScopeRBACRoleBindingRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getScopeRBACRoleBinding(request), expectedError); + }); + }); + + describe('getScope', () => { + it('invokes getScope without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.GetScopeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.GetScopeRequest', ['name']); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteMembership = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteMembership(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteMembership as SinonStub) + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkehub.v1.Scope() + ); + client.innerApiCalls.getScope = stubSimpleCall(expectedResponse); + const [response] = await client.getScope(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getScope as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteMembership as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getScope as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteMembershipProgress without error', async () => { + it('invokes getScope without error using callback', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.GetScopeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.GetScopeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + new protos.google.cloud.gkehub.v1.Scope() ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteMembershipProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + client.innerApiCalls.getScope = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getScope( + request, + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IScope|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkDeleteMembershipProgress with error', async () => { + it('invokes getScope with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.GetScopeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.GetScopeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); + client.innerApiCalls.getScope = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getScope(request), expectedError); + const actualRequest = (client.innerApiCalls.getScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteMembershipProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); + it('invokes getScope with closed client', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.GetScopeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.GetScopeRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getScope(request), expectedError); }); }); - describe('deleteFeature', () => { - it('invokes deleteFeature without error', async () => { + describe('getMembershipBinding', () => { + it('invokes getMembershipBinding without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.DeleteFeatureRequest() + new protos.google.cloud.gkehub.v1.GetMembershipBindingRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteFeatureRequest', ['name']); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetMembershipBindingRequest', ['name']); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.gkehub.v1.MembershipBinding() ); - client.innerApiCalls.deleteFeature = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteFeature(request); - const [response] = await operation.promise(); + client.innerApiCalls.getMembershipBinding = stubSimpleCall(expectedResponse); + const [response] = await client.getMembershipBinding(request); assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteFeature as SinonStub) + const actualRequest = (client.innerApiCalls.getMembershipBinding as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFeature as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getMembershipBinding as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteFeature without error using callback', async () => { + it('invokes getMembershipBinding without error using callback', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.DeleteFeatureRequest() + new protos.google.cloud.gkehub.v1.GetMembershipBindingRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteFeatureRequest', ['name']); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetMembershipBindingRequest', ['name']); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.gkehub.v1.MembershipBinding() ); - client.innerApiCalls.deleteFeature = stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getMembershipBinding = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.deleteFeature( + client.getMembershipBinding( request, - (err?: Error|null, - result?: LROperation|null - ) => { + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IMembershipBinding|null) => { if (err) { reject(err); } else { @@ -1120,153 +1087,107 @@ describe('v1.GkeHubClient', () => { } }); }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteFeature as SinonStub) + const actualRequest = (client.innerApiCalls.getMembershipBinding as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFeature as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getMembershipBinding as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteFeature with call error', async () => { + it('invokes getMembershipBinding with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.DeleteFeatureRequest() + new protos.google.cloud.gkehub.v1.GetMembershipBindingRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteFeatureRequest', ['name']); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetMembershipBindingRequest', ['name']); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.innerApiCalls.deleteFeature = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteFeature(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteFeature as SinonStub) + client.innerApiCalls.getMembershipBinding = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getMembershipBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.getMembershipBinding as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFeature as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getMembershipBinding as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes deleteFeature with LRO error', async () => { + it('invokes getMembershipBinding with closed client', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.DeleteFeatureRequest() + new protos.google.cloud.gkehub.v1.GetMembershipBindingRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteFeatureRequest', ['name']); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetMembershipBindingRequest', ['name']); request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteFeature = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteFeature(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteFeature as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteFeature as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteFeatureProgress without error', async () => { - const client = new gkehubModule.v1.GkeHubClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() - ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkDeleteFeatureProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteFeatureProgress with error', async () => { - const client = new gkehubModule.v1.GkeHubClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteFeatureProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getMembershipBinding(request), expectedError); }); }); - describe('updateMembership', () => { - it('invokes updateMembership without error', async () => { + describe('getMembershipRBACRoleBinding', () => { + it('invokes getMembershipRBACRoleBinding without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.UpdateMembershipRequest() + new protos.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipRequest', ['name']); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest', ['name']); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.gkehub.v1.RBACRoleBinding() ); - client.innerApiCalls.updateMembership = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateMembership(request); - const [response] = await operation.promise(); + client.innerApiCalls.getMembershipRbacRoleBinding = stubSimpleCall(expectedResponse); + const [response] = await client.getMembershipRBACRoleBinding(request); assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateMembership as SinonStub) + const actualRequest = (client.innerApiCalls.getMembershipRbacRoleBinding as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateMembership as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getMembershipRbacRoleBinding as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateMembership without error using callback', async () => { + it('invokes getMembershipRBACRoleBinding without error using callback', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.UpdateMembershipRequest() + new protos.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipRequest', ['name']); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest', ['name']); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() + new protos.google.cloud.gkehub.v1.RBACRoleBinding() ); - client.innerApiCalls.updateMembership = stubLongRunningCallWithCallback(expectedResponse); + client.innerApiCalls.getMembershipRbacRoleBinding = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.updateMembership( + client.getMembershipRBACRoleBinding( request, - (err?: Error|null, - result?: LROperation|null - ) => { + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IRBACRoleBinding|null) => { if (err) { reject(err); } else { @@ -1274,153 +1195,5652 @@ describe('v1.GkeHubClient', () => { } }); }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateMembership as SinonStub) + const actualRequest = (client.innerApiCalls.getMembershipRbacRoleBinding as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateMembership as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getMembershipRbacRoleBinding as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateMembership with call error', async () => { + it('invokes getMembershipRBACRoleBinding with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.UpdateMembershipRequest() + new protos.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipRequest', ['name']); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest', ['name']); request.name = defaultValue1; const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.innerApiCalls.updateMembership = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateMembership(request), expectedError); - const actualRequest = (client.innerApiCalls.updateMembership as SinonStub) + client.innerApiCalls.getMembershipRbacRoleBinding = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getMembershipRBACRoleBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.getMembershipRbacRoleBinding as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateMembership as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.getMembershipRbacRoleBinding as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateMembership with LRO error', async () => { + it('invokes getMembershipRBACRoleBinding with closed client', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.UpdateMembershipRequest() + new protos.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipRequest', ['name']); + getTypeDefaultValue('.google.cloud.gkehub.v1.GetMembershipRBACRoleBindingRequest', ['name']); request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateMembership = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateMembership(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateMembership as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateMembership as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.getMembershipRBACRoleBinding(request), expectedError); }); + }); - it('invokes checkUpdateMembershipProgress without error', async () => { + describe('generateMembershipRBACRoleBindingYAML', () => { + it('invokes generateMembershipRBACRoleBindingYAML without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + new protos.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse() ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateMembershipProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + client.innerApiCalls.generateMembershipRbacRoleBindingYamL = stubSimpleCall(expectedResponse); + const [response] = await client.generateMembershipRBACRoleBindingYAML(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.generateMembershipRbacRoleBindingYamL as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateMembershipRbacRoleBindingYamL as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes checkUpdateMembershipProgress with error', async () => { + it('invokes generateMembershipRBACRoleBindingYAML without error using callback', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkUpdateMembershipProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLResponse() + ); + client.innerApiCalls.generateMembershipRbacRoleBindingYamL = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.generateMembershipRBACRoleBindingYAML( + request, + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IGenerateMembershipRBACRoleBindingYAMLResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.generateMembershipRbacRoleBindingYamL as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.generateMembershipRbacRoleBindingYamL as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - }); - describe('updateFeature', () => { - it('invokes updateFeature without error', async () => { + it('invokes generateMembershipRBACRoleBindingYAML with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.UpdateFeatureRequest() + new protos.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateFeatureRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateFeature = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateFeature(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateFeature as SinonStub) + getTypeDefaultValue('.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.generateMembershipRbacRoleBindingYamL = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.generateMembershipRBACRoleBindingYAML(request), expectedError); + const actualRequest = (client.innerApiCalls.generateMembershipRbacRoleBindingYamL as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateFeature as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.generateMembershipRbacRoleBindingYamL as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateFeature without error using callback', async () => { + it('invokes generateMembershipRBACRoleBindingYAML with closed client', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.UpdateFeatureRequest() + new protos.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.GenerateMembershipRBACRoleBindingYAMLRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch(err => {throw err}); + await assert.rejects(client.generateMembershipRBACRoleBindingYAML(request), expectedError); + }); + }); + + describe('createMembership', () => { + it('invokes createMembership without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateMembershipRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createMembership = stubLongRunningCall(expectedResponse); + const [operation] = await client.createMembership(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createMembership as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMembership as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMembership without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateMembershipRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createMembership = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createMembership( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createMembership as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMembership as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMembership with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateMembershipRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMembership = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createMembership(request), expectedError); + const actualRequest = (client.innerApiCalls.createMembership as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMembership as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMembership with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateMembershipRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMembership = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createMembership(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createMembership as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMembership as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateMembershipProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateMembershipProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateMembershipProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateMembershipProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createFeature', () => { + it('invokes createFeature without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateFeatureRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateFeatureRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFeature = stubLongRunningCall(expectedResponse); + const [operation] = await client.createFeature(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createFeature as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFeature as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFeature without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateFeatureRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateFeatureRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFeature = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createFeature( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createFeature as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFeature as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFeature with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateFeatureRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateFeatureRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFeature = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createFeature(request), expectedError); + const actualRequest = (client.innerApiCalls.createFeature as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFeature as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFeature with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateFeatureRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateFeatureRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFeature = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createFeature(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createFeature as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFeature as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateFeatureProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateFeatureProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateFeatureProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateFeatureProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteMembership', () => { + it('invokes deleteMembership without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteMembershipRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteMembership = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteMembership(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteMembership as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteMembership as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMembership without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteMembershipRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteMembership = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteMembership( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteMembership as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteMembership as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMembership with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteMembershipRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMembership = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteMembership(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteMembership as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteMembership as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMembership with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteMembershipRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMembership = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteMembership(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteMembership as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteMembership as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteMembershipProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteMembershipProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteMembershipProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteMembershipProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteFeature', () => { + it('invokes deleteFeature without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteFeatureRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteFeatureRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFeature = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteFeature(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteFeature as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFeature as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFeature without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteFeatureRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteFeatureRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFeature = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFeature( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteFeature as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFeature as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFeature with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteFeatureRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteFeatureRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFeature = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteFeature(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteFeature as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFeature as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFeature with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteFeatureRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteFeatureRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFeature = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteFeature(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteFeature as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFeature as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteFeatureProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteFeatureProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteFeatureProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteFeatureProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateMembership', () => { + it('invokes updateMembership without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateMembershipRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateMembership = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateMembership(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateMembership as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMembership as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMembership without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateMembershipRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateMembership = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateMembership( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateMembership as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMembership as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMembership with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateMembershipRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMembership = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateMembership(request), expectedError); + const actualRequest = (client.innerApiCalls.updateMembership as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMembership as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMembership with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateMembershipRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMembership = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateMembership(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateMembership as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMembership as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateMembershipProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateMembershipProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateMembershipProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateMembershipProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateFeature', () => { + it('invokes updateFeature without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateFeatureRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateFeatureRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateFeature = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateFeature(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateFeature as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFeature as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFeature without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateFeatureRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateFeatureRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateFeature = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateFeature( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateFeature as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFeature as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFeature with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateFeatureRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateFeatureRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateFeature = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateFeature(request), expectedError); + const actualRequest = (client.innerApiCalls.updateFeature as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFeature as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFeature with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateFeatureRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateFeatureRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateFeature = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateFeature(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateFeature as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFeature as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateFeatureProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateFeatureProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateFeatureProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateFeatureProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createFleet', () => { + it('invokes createFleet without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateFleetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateFleetRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFleet = stubLongRunningCall(expectedResponse); + const [operation] = await client.createFleet(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createFleet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFleet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFleet without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateFleetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateFleetRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createFleet = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createFleet( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createFleet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFleet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFleet with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateFleetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateFleetRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFleet = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createFleet(request), expectedError); + const actualRequest = (client.innerApiCalls.createFleet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFleet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createFleet with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateFleetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateFleetRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createFleet = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createFleet(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createFleet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createFleet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateFleetProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateFleetProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateFleetProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateFleetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateFleet', () => { + it('invokes updateFleet without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateFleetRequest() + ); + request.fleet ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateFleetRequest', ['fleet', 'name']); + request.fleet.name = defaultValue1; + const expectedHeaderRequestParams = `fleet.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateFleet = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateFleet(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateFleet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFleet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFleet without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateFleetRequest() + ); + request.fleet ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateFleetRequest', ['fleet', 'name']); + request.fleet.name = defaultValue1; + const expectedHeaderRequestParams = `fleet.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateFleet = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateFleet( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateFleet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFleet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFleet with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateFleetRequest() + ); + request.fleet ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateFleetRequest', ['fleet', 'name']); + request.fleet.name = defaultValue1; + const expectedHeaderRequestParams = `fleet.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateFleet = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateFleet(request), expectedError); + const actualRequest = (client.innerApiCalls.updateFleet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFleet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateFleet with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateFleetRequest() + ); + request.fleet ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateFleetRequest', ['fleet', 'name']); + request.fleet.name = defaultValue1; + const expectedHeaderRequestParams = `fleet.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateFleet = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateFleet(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateFleet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateFleet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateFleetProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateFleetProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateFleetProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateFleetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteFleet', () => { + it('invokes deleteFleet without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteFleetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteFleetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFleet = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteFleet(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteFleet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFleet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFleet without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteFleetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteFleetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteFleet = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteFleet( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteFleet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFleet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFleet with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteFleetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteFleetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFleet = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteFleet(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteFleet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFleet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteFleet with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteFleetRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteFleetRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteFleet = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteFleet(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteFleet as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteFleet as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteFleetProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteFleetProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteFleetProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteFleetProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createScopeNamespace', () => { + it('invokes createScopeNamespace without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateScopeNamespaceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateScopeNamespaceRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createScopeNamespace = stubLongRunningCall(expectedResponse); + const [operation] = await client.createScopeNamespace(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createScopeNamespace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createScopeNamespace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createScopeNamespace without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateScopeNamespaceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateScopeNamespaceRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createScopeNamespace = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createScopeNamespace( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createScopeNamespace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createScopeNamespace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createScopeNamespace with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateScopeNamespaceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateScopeNamespaceRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createScopeNamespace = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createScopeNamespace(request), expectedError); + const actualRequest = (client.innerApiCalls.createScopeNamespace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createScopeNamespace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createScopeNamespace with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateScopeNamespaceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateScopeNamespaceRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createScopeNamespace = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createScopeNamespace(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createScopeNamespace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createScopeNamespace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateScopeNamespaceProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateScopeNamespaceProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateScopeNamespaceProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateScopeNamespaceProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateScopeNamespace', () => { + it('invokes updateScopeNamespace without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest() + ); + request.scopeNamespace ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest', ['scopeNamespace', 'name']); + request.scopeNamespace.name = defaultValue1; + const expectedHeaderRequestParams = `scope_namespace.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateScopeNamespace = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateScopeNamespace(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateScopeNamespace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateScopeNamespace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateScopeNamespace without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest() + ); + request.scopeNamespace ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest', ['scopeNamespace', 'name']); + request.scopeNamespace.name = defaultValue1; + const expectedHeaderRequestParams = `scope_namespace.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateScopeNamespace = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateScopeNamespace( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateScopeNamespace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateScopeNamespace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateScopeNamespace with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest() + ); + request.scopeNamespace ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest', ['scopeNamespace', 'name']); + request.scopeNamespace.name = defaultValue1; + const expectedHeaderRequestParams = `scope_namespace.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateScopeNamespace = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateScopeNamespace(request), expectedError); + const actualRequest = (client.innerApiCalls.updateScopeNamespace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateScopeNamespace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateScopeNamespace with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest() + ); + request.scopeNamespace ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateScopeNamespaceRequest', ['scopeNamespace', 'name']); + request.scopeNamespace.name = defaultValue1; + const expectedHeaderRequestParams = `scope_namespace.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateScopeNamespace = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateScopeNamespace(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateScopeNamespace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateScopeNamespace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateScopeNamespaceProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateScopeNamespaceProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateScopeNamespaceProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateScopeNamespaceProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteScopeNamespace', () => { + it('invokes deleteScopeNamespace without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteScopeNamespace = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteScopeNamespace(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteScopeNamespace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteScopeNamespace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteScopeNamespace without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteScopeNamespace = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteScopeNamespace( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteScopeNamespace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteScopeNamespace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteScopeNamespace with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteScopeNamespace = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteScopeNamespace(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteScopeNamespace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteScopeNamespace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteScopeNamespace with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteScopeNamespaceRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteScopeNamespace = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteScopeNamespace(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteScopeNamespace as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteScopeNamespace as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteScopeNamespaceProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteScopeNamespaceProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteScopeNamespaceProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteScopeNamespaceProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createScopeRBACRoleBinding', () => { + it('invokes createScopeRBACRoleBinding without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createScopeRbacRoleBinding = stubLongRunningCall(expectedResponse); + const [operation] = await client.createScopeRBACRoleBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createScopeRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createScopeRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createScopeRBACRoleBinding without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createScopeRbacRoleBinding = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createScopeRBACRoleBinding( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createScopeRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createScopeRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createScopeRBACRoleBinding with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createScopeRbacRoleBinding = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createScopeRBACRoleBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.createScopeRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createScopeRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createScopeRBACRoleBinding with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateScopeRBACRoleBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createScopeRbacRoleBinding = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createScopeRBACRoleBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createScopeRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createScopeRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateScopeRBACRoleBindingProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateScopeRBACRoleBindingProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateScopeRBACRoleBindingProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateScopeRBACRoleBindingProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateScopeRBACRoleBinding', () => { + it('invokes updateScopeRBACRoleBinding without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest() + ); + request.rbacrolebinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest', ['rbacrolebinding', 'name']); + request.rbacrolebinding.name = defaultValue1; + const expectedHeaderRequestParams = `rbacrolebinding.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateScopeRbacRoleBinding = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateScopeRBACRoleBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateScopeRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateScopeRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateScopeRBACRoleBinding without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest() + ); + request.rbacrolebinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest', ['rbacrolebinding', 'name']); + request.rbacrolebinding.name = defaultValue1; + const expectedHeaderRequestParams = `rbacrolebinding.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateScopeRbacRoleBinding = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateScopeRBACRoleBinding( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateScopeRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateScopeRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateScopeRBACRoleBinding with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest() + ); + request.rbacrolebinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest', ['rbacrolebinding', 'name']); + request.rbacrolebinding.name = defaultValue1; + const expectedHeaderRequestParams = `rbacrolebinding.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateScopeRbacRoleBinding = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateScopeRBACRoleBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.updateScopeRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateScopeRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateScopeRBACRoleBinding with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest() + ); + request.rbacrolebinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateScopeRBACRoleBindingRequest', ['rbacrolebinding', 'name']); + request.rbacrolebinding.name = defaultValue1; + const expectedHeaderRequestParams = `rbacrolebinding.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateScopeRbacRoleBinding = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateScopeRBACRoleBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateScopeRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateScopeRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateScopeRBACRoleBindingProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateScopeRBACRoleBindingProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateScopeRBACRoleBindingProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateScopeRBACRoleBindingProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteScopeRBACRoleBinding', () => { + it('invokes deleteScopeRBACRoleBinding without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteScopeRbacRoleBinding = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteScopeRBACRoleBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteScopeRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteScopeRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteScopeRBACRoleBinding without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteScopeRbacRoleBinding = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteScopeRBACRoleBinding( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteScopeRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteScopeRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteScopeRBACRoleBinding with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteScopeRbacRoleBinding = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteScopeRBACRoleBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteScopeRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteScopeRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteScopeRBACRoleBinding with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteScopeRBACRoleBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteScopeRbacRoleBinding = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteScopeRBACRoleBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteScopeRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteScopeRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteScopeRBACRoleBindingProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteScopeRBACRoleBindingProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteScopeRBACRoleBindingProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteScopeRBACRoleBindingProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createScope', () => { + it('invokes createScope without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateScopeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateScopeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createScope = stubLongRunningCall(expectedResponse); + const [operation] = await client.createScope(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createScope without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateScopeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateScopeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createScope = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createScope( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createScope with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateScopeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateScopeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createScope = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createScope(request), expectedError); + const actualRequest = (client.innerApiCalls.createScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createScope with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateScopeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateScopeRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createScope = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createScope(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateScopeProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateScopeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateScopeProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateScopeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateScope', () => { + it('invokes updateScope without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateScopeRequest() + ); + request.scope ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateScopeRequest', ['scope', 'name']); + request.scope.name = defaultValue1; + const expectedHeaderRequestParams = `scope.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateScope = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateScope(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateScope without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateScopeRequest() + ); + request.scope ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateScopeRequest', ['scope', 'name']); + request.scope.name = defaultValue1; + const expectedHeaderRequestParams = `scope.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateScope = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateScope( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateScope with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateScopeRequest() + ); + request.scope ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateScopeRequest', ['scope', 'name']); + request.scope.name = defaultValue1; + const expectedHeaderRequestParams = `scope.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateScope = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateScope(request), expectedError); + const actualRequest = (client.innerApiCalls.updateScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateScope with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateScopeRequest() + ); + request.scope ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateScopeRequest', ['scope', 'name']); + request.scope.name = defaultValue1; + const expectedHeaderRequestParams = `scope.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateScope = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateScope(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateScopeProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateScopeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateScopeProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateScopeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteScope', () => { + it('invokes deleteScope without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteScopeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteScopeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteScope = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteScope(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteScope without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteScopeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteScopeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteScope = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteScope( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteScope with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteScopeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteScopeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteScope = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteScope(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteScope with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteScopeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteScopeRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteScope = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteScope(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteScope as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteScope as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteScopeProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteScopeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteScopeProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteScopeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createMembershipBinding', () => { + it('invokes createMembershipBinding without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateMembershipBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createMembershipBinding = stubLongRunningCall(expectedResponse); + const [operation] = await client.createMembershipBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createMembershipBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMembershipBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMembershipBinding without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateMembershipBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createMembershipBinding = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createMembershipBinding( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createMembershipBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMembershipBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMembershipBinding with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateMembershipBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMembershipBinding = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createMembershipBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.createMembershipBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMembershipBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMembershipBinding with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateMembershipBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMembershipBinding = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createMembershipBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createMembershipBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMembershipBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateMembershipBindingProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateMembershipBindingProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateMembershipBindingProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateMembershipBindingProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateMembershipBinding', () => { + it('invokes updateMembershipBinding without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateMembershipBindingRequest() + ); + request.membershipBinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipBindingRequest', ['membershipBinding', 'name']); + request.membershipBinding.name = defaultValue1; + const expectedHeaderRequestParams = `membership_binding.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateMembershipBinding = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateMembershipBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateMembershipBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMembershipBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMembershipBinding without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateMembershipBindingRequest() + ); + request.membershipBinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipBindingRequest', ['membershipBinding', 'name']); + request.membershipBinding.name = defaultValue1; + const expectedHeaderRequestParams = `membership_binding.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateMembershipBinding = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateMembershipBinding( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateMembershipBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMembershipBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMembershipBinding with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateMembershipBindingRequest() + ); + request.membershipBinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipBindingRequest', ['membershipBinding', 'name']); + request.membershipBinding.name = defaultValue1; + const expectedHeaderRequestParams = `membership_binding.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMembershipBinding = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateMembershipBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.updateMembershipBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMembershipBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMembershipBinding with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateMembershipBindingRequest() + ); + request.membershipBinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipBindingRequest', ['membershipBinding', 'name']); + request.membershipBinding.name = defaultValue1; + const expectedHeaderRequestParams = `membership_binding.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMembershipBinding = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateMembershipBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateMembershipBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMembershipBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateMembershipBindingProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateMembershipBindingProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateMembershipBindingProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateMembershipBindingProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteMembershipBinding', () => { + it('invokes deleteMembershipBinding without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteMembershipBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteMembershipBinding = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteMembershipBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteMembershipBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteMembershipBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMembershipBinding without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteMembershipBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteMembershipBinding = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteMembershipBinding( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteMembershipBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteMembershipBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMembershipBinding with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteMembershipBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMembershipBinding = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteMembershipBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteMembershipBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteMembershipBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMembershipBinding with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteMembershipBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMembershipBinding = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteMembershipBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteMembershipBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteMembershipBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteMembershipBindingProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteMembershipBindingProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteMembershipBindingProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteMembershipBindingProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('createMembershipRBACRoleBinding', () => { + it('invokes createMembershipRBACRoleBinding without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createMembershipRbacRoleBinding = stubLongRunningCall(expectedResponse); + const [operation] = await client.createMembershipRBACRoleBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMembershipRBACRoleBinding without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createMembershipRbacRoleBinding = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createMembershipRBACRoleBinding( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMembershipRBACRoleBinding with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMembershipRbacRoleBinding = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createMembershipRBACRoleBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.createMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMembershipRBACRoleBinding with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.CreateMembershipRBACRoleBindingRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMembershipRbacRoleBinding = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createMembershipRBACRoleBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateMembershipRBACRoleBindingProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCreateMembershipRBACRoleBindingProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateMembershipRBACRoleBindingProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateMembershipRBACRoleBindingProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateMembershipRBACRoleBinding', () => { + it('invokes updateMembershipRBACRoleBinding without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest() + ); + request.rbacrolebinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest', ['rbacrolebinding', 'name']); + request.rbacrolebinding.name = defaultValue1; + const expectedHeaderRequestParams = `rbacrolebinding.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateMembershipRbacRoleBinding = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateMembershipRBACRoleBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMembershipRBACRoleBinding without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest() + ); + request.rbacrolebinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest', ['rbacrolebinding', 'name']); + request.rbacrolebinding.name = defaultValue1; + const expectedHeaderRequestParams = `rbacrolebinding.name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateMembershipRbacRoleBinding = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateMembershipRBACRoleBinding( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMembershipRBACRoleBinding with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest() + ); + request.rbacrolebinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest', ['rbacrolebinding', 'name']); + request.rbacrolebinding.name = defaultValue1; + const expectedHeaderRequestParams = `rbacrolebinding.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMembershipRbacRoleBinding = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateMembershipRBACRoleBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.updateMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateMembershipRBACRoleBinding with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest() + ); + request.rbacrolebinding ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateMembershipRBACRoleBindingRequest', ['rbacrolebinding', 'name']); + request.rbacrolebinding.name = defaultValue1; + const expectedHeaderRequestParams = `rbacrolebinding.name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateMembershipRbacRoleBinding = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateMembershipRBACRoleBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateMembershipRBACRoleBindingProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkUpdateMembershipRBACRoleBindingProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateMembershipRBACRoleBindingProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateMembershipRBACRoleBindingProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteMembershipRBACRoleBinding', () => { + it('invokes deleteMembershipRBACRoleBinding without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteMembershipRbacRoleBinding = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteMembershipRBACRoleBinding(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMembershipRBACRoleBinding without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteMembershipRbacRoleBinding = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteMembershipRBACRoleBinding( + request, + (err?: Error|null, + result?: LROperation|null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const operation = await promise as LROperation; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMembershipRBACRoleBinding with call error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMembershipRbacRoleBinding = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteMembershipRBACRoleBinding(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMembershipRBACRoleBinding with LRO error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.DeleteMembershipRBACRoleBindingRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMembershipRbacRoleBinding = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteMembershipRBACRoleBinding(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteMembershipRbacRoleBinding as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteMembershipRBACRoleBindingProgress without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkDeleteMembershipRBACRoleBindingProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteMembershipRBACRoleBindingProgress with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteMembershipRBACRoleBindingProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listMemberships', () => { + it('invokes listMemberships without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + ]; + client.innerApiCalls.listMemberships = stubSimpleCall(expectedResponse); + const [response] = await client.listMemberships(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMemberships as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMemberships as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMemberships without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + ]; + client.innerApiCalls.listMemberships = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMemberships( + request, + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IMembership[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listMemberships as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMemberships as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMemberships with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMemberships = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listMemberships(request), expectedError); + const actualRequest = (client.innerApiCalls.listMemberships as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listMemberships as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMembershipsStream without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + ]; + client.descriptors.page.listMemberships.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listMembershipsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Membership[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Membership) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listMemberships.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMemberships, request)); + assert( + (client.descriptors.page.listMemberships.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listMembershipsStream with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMemberships.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listMembershipsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Membership[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Membership) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listMemberships.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMemberships, request)); + assert( + (client.descriptors.page.listMemberships.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMemberships without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + ]; + client.descriptors.page.listMemberships.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkehub.v1.IMembership[] = []; + const iterable = client.listMembershipsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listMemberships.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMemberships.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listMemberships with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listMemberships.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMembershipsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkehub.v1.IMembership[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listMemberships.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listMemberships.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listBoundMemberships', () => { + it('invokes listBoundMemberships without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListBoundMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListBoundMembershipsRequest', ['scopeName']); + request.scopeName = defaultValue1; + const expectedHeaderRequestParams = `scope_name=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + ]; + client.innerApiCalls.listBoundMemberships = stubSimpleCall(expectedResponse); + const [response] = await client.listBoundMemberships(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBoundMemberships as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBoundMemberships as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBoundMemberships without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListBoundMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListBoundMembershipsRequest', ['scopeName']); + request.scopeName = defaultValue1; + const expectedHeaderRequestParams = `scope_name=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + ]; + client.innerApiCalls.listBoundMemberships = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listBoundMemberships( + request, + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IMembership[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listBoundMemberships as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBoundMemberships as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBoundMemberships with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListBoundMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListBoundMembershipsRequest', ['scopeName']); + request.scopeName = defaultValue1; + const expectedHeaderRequestParams = `scope_name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listBoundMemberships = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listBoundMemberships(request), expectedError); + const actualRequest = (client.innerApiCalls.listBoundMemberships as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listBoundMemberships as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listBoundMembershipsStream without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListBoundMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListBoundMembershipsRequest', ['scopeName']); + request.scopeName = defaultValue1; + const expectedHeaderRequestParams = `scope_name=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + ]; + client.descriptors.page.listBoundMemberships.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listBoundMembershipsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Membership[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Membership) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listBoundMemberships.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBoundMemberships, request)); + assert( + (client.descriptors.page.listBoundMemberships.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listBoundMembershipsStream with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListBoundMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListBoundMembershipsRequest', ['scopeName']); + request.scopeName = defaultValue1; + const expectedHeaderRequestParams = `scope_name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listBoundMemberships.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listBoundMembershipsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Membership[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Membership) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listBoundMemberships.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listBoundMemberships, request)); + assert( + (client.descriptors.page.listBoundMemberships.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBoundMemberships without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListBoundMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListBoundMembershipsRequest', ['scopeName']); + request.scopeName = defaultValue1; + const expectedHeaderRequestParams = `scope_name=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + ]; + client.descriptors.page.listBoundMemberships.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkehub.v1.IMembership[] = []; + const iterable = client.listBoundMembershipsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listBoundMemberships.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBoundMemberships.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listBoundMemberships with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListBoundMembershipsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListBoundMembershipsRequest', ['scopeName']); + request.scopeName = defaultValue1; + const expectedHeaderRequestParams = `scope_name=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listBoundMemberships.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listBoundMembershipsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkehub.v1.IMembership[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listBoundMemberships.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listBoundMemberships.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listFeatures', () => { + it('invokes listFeatures without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + ]; + client.innerApiCalls.listFeatures = stubSimpleCall(expectedResponse); + const [response] = await client.listFeatures(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFeatures as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFeatures as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFeatures without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + ]; + client.innerApiCalls.listFeatures = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFeatures( + request, + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IFeature[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFeatures as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFeatures as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFeatures with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFeatures = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listFeatures(request), expectedError); + const actualRequest = (client.innerApiCalls.listFeatures as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFeatures as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFeaturesStream without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + ]; + client.descriptors.page.listFeatures.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listFeaturesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Feature[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Feature) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listFeatures.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFeatures, request)); + assert( + (client.descriptors.page.listFeatures.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFeaturesStream with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFeatures.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listFeaturesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Feature[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Feature) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listFeatures.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFeatures, request)); + assert( + (client.descriptors.page.listFeatures.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFeatures without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + ]; + client.descriptors.page.listFeatures.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkehub.v1.IFeature[] = []; + const iterable = client.listFeaturesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listFeatures.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFeatures.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFeatures with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFeatures.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFeaturesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkehub.v1.IFeature[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listFeatures.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFeatures.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listFleets', () => { + it('invokes listFleets without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFleetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFleetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Fleet()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Fleet()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Fleet()), + ]; + client.innerApiCalls.listFleets = stubSimpleCall(expectedResponse); + const [response] = await client.listFleets(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFleets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFleets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFleets without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFleetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFleetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Fleet()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Fleet()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Fleet()), + ]; + client.innerApiCalls.listFleets = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listFleets( + request, + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IFleet[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listFleets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFleets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFleets with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFleetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFleetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listFleets = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listFleets(request), expectedError); + const actualRequest = (client.innerApiCalls.listFleets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listFleets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listFleetsStream without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFleetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFleetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Fleet()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Fleet()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Fleet()), + ]; + client.descriptors.page.listFleets.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listFleetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Fleet[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Fleet) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listFleets.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFleets, request)); + assert( + (client.descriptors.page.listFleets.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listFleetsStream with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFleetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFleetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFleets.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listFleetsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Fleet[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Fleet) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listFleets.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listFleets, request)); + assert( + (client.descriptors.page.listFleets.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFleets without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFleetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFleetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Fleet()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Fleet()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Fleet()), + ]; + client.descriptors.page.listFleets.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkehub.v1.IFleet[] = []; + const iterable = client.listFleetsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listFleets.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFleets.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listFleets with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListFleetsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListFleetsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listFleets.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listFleetsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkehub.v1.IFleet[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listFleets.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listFleets.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listScopeNamespaces', () => { + it('invokes listScopeNamespaces without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeNamespacesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeNamespacesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Namespace()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Namespace()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Namespace()), + ]; + client.innerApiCalls.listScopeNamespaces = stubSimpleCall(expectedResponse); + const [response] = await client.listScopeNamespaces(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listScopeNamespaces as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listScopeNamespaces as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listScopeNamespaces without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeNamespacesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeNamespacesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Namespace()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Namespace()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Namespace()), + ]; + client.innerApiCalls.listScopeNamespaces = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listScopeNamespaces( + request, + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.INamespace[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listScopeNamespaces as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listScopeNamespaces as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listScopeNamespaces with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeNamespacesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeNamespacesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listScopeNamespaces = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listScopeNamespaces(request), expectedError); + const actualRequest = (client.innerApiCalls.listScopeNamespaces as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listScopeNamespaces as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listScopeNamespacesStream without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeNamespacesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeNamespacesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Namespace()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Namespace()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Namespace()), + ]; + client.descriptors.page.listScopeNamespaces.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listScopeNamespacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Namespace[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Namespace) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listScopeNamespaces.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listScopeNamespaces, request)); + assert( + (client.descriptors.page.listScopeNamespaces.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listScopeNamespacesStream with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeNamespacesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeNamespacesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listScopeNamespaces.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listScopeNamespacesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Namespace[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Namespace) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listScopeNamespaces.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listScopeNamespaces, request)); + assert( + (client.descriptors.page.listScopeNamespaces.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listScopeNamespaces without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeNamespacesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeNamespacesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Namespace()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Namespace()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Namespace()), + ]; + client.descriptors.page.listScopeNamespaces.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkehub.v1.INamespace[] = []; + const iterable = client.listScopeNamespacesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listScopeNamespaces.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listScopeNamespaces.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listScopeNamespaces with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeNamespacesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeNamespacesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listScopeNamespaces.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listScopeNamespacesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkehub.v1.INamespace[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listScopeNamespaces.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listScopeNamespaces.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listScopeRBACRoleBindings', () => { + it('invokes listScopeRBACRoleBindings without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + ]; + client.innerApiCalls.listScopeRbacRoleBindings = stubSimpleCall(expectedResponse); + const [response] = await client.listScopeRBACRoleBindings(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listScopeRbacRoleBindings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listScopeRbacRoleBindings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listScopeRBACRoleBindings without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + ]; + client.innerApiCalls.listScopeRbacRoleBindings = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listScopeRBACRoleBindings( + request, + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IRBACRoleBinding[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listScopeRbacRoleBindings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listScopeRbacRoleBindings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listScopeRBACRoleBindings with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listScopeRbacRoleBindings = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listScopeRBACRoleBindings(request), expectedError); + const actualRequest = (client.innerApiCalls.listScopeRbacRoleBindings as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listScopeRbacRoleBindings as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listScopeRBACRoleBindingsStream without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + ]; + client.descriptors.page.listScopeRBACRoleBindings.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listScopeRBACRoleBindingsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.RBACRoleBinding[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.RBACRoleBinding) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listScopeRBACRoleBindings.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listScopeRbacRoleBindings, request)); + assert( + (client.descriptors.page.listScopeRBACRoleBindings.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listScopeRBACRoleBindingsStream with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listScopeRBACRoleBindings.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listScopeRBACRoleBindingsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.RBACRoleBinding[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.RBACRoleBinding) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listScopeRBACRoleBindings.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listScopeRbacRoleBindings, request)); + assert( + (client.descriptors.page.listScopeRBACRoleBindings.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listScopeRBACRoleBindings without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + ]; + client.descriptors.page.listScopeRBACRoleBindings.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkehub.v1.IRBACRoleBinding[] = []; + const iterable = client.listScopeRBACRoleBindingsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listScopeRBACRoleBindings.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listScopeRBACRoleBindings.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listScopeRBACRoleBindings with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopeRBACRoleBindingsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listScopeRBACRoleBindings.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listScopeRBACRoleBindingsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkehub.v1.IRBACRoleBinding[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listScopeRBACRoleBindings.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listScopeRBACRoleBindings.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listScopes', () => { + it('invokes listScopes without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + ]; + client.innerApiCalls.listScopes = stubSimpleCall(expectedResponse); + const [response] = await client.listScopes(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listScopes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listScopes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listScopes without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + ]; + client.innerApiCalls.listScopes = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listScopes( + request, + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IScope[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listScopes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listScopes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listScopes with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.innerApiCalls.listScopes = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listScopes(request), expectedError); + const actualRequest = (client.innerApiCalls.listScopes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listScopes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listScopesStream without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + ]; + client.descriptors.page.listScopes.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listScopesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Scope[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Scope) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listScopes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listScopes, request)); + assert( + (client.descriptors.page.listScopes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listScopesStream with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listScopes.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listScopesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Scope[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Scope) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listScopes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listScopes, request)); + assert( + (client.descriptors.page.listScopes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listScopes without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + ]; + client.descriptors.page.listScopes.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkehub.v1.IScope[] = []; + const iterable = client.listScopesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listScopes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listScopes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listScopes with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListScopesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedError = new Error('expected'); + client.descriptors.page.listScopes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listScopesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkehub.v1.IScope[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listScopes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listScopes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listPermittedScopes', () => { + it('invokes listPermittedScopes without error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListPermittedScopesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListPermittedScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + ]; + client.innerApiCalls.listPermittedScopes = stubSimpleCall(expectedResponse); + const [response] = await client.listPermittedScopes(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listPermittedScopes as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listPermittedScopes as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listPermittedScopes without error using callback', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListPermittedScopesRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateFeatureRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateFeature = stubLongRunningCallWithCallback(expectedResponse); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListPermittedScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + ]; + client.innerApiCalls.listPermittedScopes = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.updateFeature( + client.listPermittedScopes( request, - (err?: Error|null, - result?: LROperation|null - ) => { + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IScope[]|null) => { if (err) { reject(err); } else { @@ -1428,152 +6848,244 @@ describe('v1.GkeHubClient', () => { } }); }); - const operation = await promise as LROperation; - const [response] = await operation.promise(); + const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateFeature as SinonStub) + const actualRequest = (client.innerApiCalls.listPermittedScopes as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateFeature as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.listPermittedScopes as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateFeature with call error', async () => { + it('invokes listPermittedScopes with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.UpdateFeatureRequest() + new protos.google.cloud.gkehub.v1.ListPermittedScopesRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateFeatureRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + getTypeDefaultValue('.google.cloud.gkehub.v1.ListPermittedScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.innerApiCalls.updateFeature = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateFeature(request), expectedError); - const actualRequest = (client.innerApiCalls.updateFeature as SinonStub) + client.innerApiCalls.listPermittedScopes = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listPermittedScopes(request), expectedError); + const actualRequest = (client.innerApiCalls.listPermittedScopes as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateFeature as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.listPermittedScopes as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes updateFeature with LRO error', async () => { + it('invokes listPermittedScopesStream without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.UpdateFeatureRequest() + new protos.google.cloud.gkehub.v1.ListPermittedScopesRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.UpdateFeatureRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? '' }`; + getTypeDefaultValue('.google.cloud.gkehub.v1.ListPermittedScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + ]; + client.descriptors.page.listPermittedScopes.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listPermittedScopesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Scope[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Scope) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert((client.descriptors.page.listPermittedScopes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPermittedScopes, request)); + assert( + (client.descriptors.page.listPermittedScopes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listPermittedScopesStream with error', async () => { + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListPermittedScopesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListPermittedScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.innerApiCalls.updateFeature = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateFeature(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateFeature as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateFeature as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + client.descriptors.page.listPermittedScopes.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listPermittedScopesStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.gkehub.v1.Scope[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.Scope) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listPermittedScopes.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listPermittedScopes, request)); + assert( + (client.descriptors.page.listPermittedScopes.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); }); - it('invokes checkUpdateFeatureProgress without error', async () => { + it('uses async iteration with listPermittedScopes without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); - const expectedResponse = generateSampleMessage( - new operationsProtos.google.longrunning.Operation() + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListPermittedScopesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListPermittedScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.Scope()), + ]; + client.descriptors.page.listPermittedScopes.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkehub.v1.IScope[] = []; + const iterable = client.listPermittedScopesAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listPermittedScopes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPermittedScopes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) ); - expectedResponse.name = 'test'; - expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; - expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')} - - client.operationsClient.getOperation = stubSimpleCall(expectedResponse); - const decodedOperation = await client.checkUpdateFeatureProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); }); - it('invokes checkUpdateFeatureProgress with error', async () => { + it('uses async iteration with listPermittedScopes with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', }); await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.gkehub.v1.ListPermittedScopesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.gkehub.v1.ListPermittedScopesRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkUpdateFeatureProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); + client.descriptors.page.listPermittedScopes.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listPermittedScopesAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.gkehub.v1.IScope[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listPermittedScopes.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listPermittedScopes.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); }); }); - describe('listMemberships', () => { - it('invokes listMemberships without error', async () => { + describe('listMembershipBindings', () => { + it('invokes listMembershipBindings without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + new protos.google.cloud.gkehub.v1.ListMembershipBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.MembershipBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.MembershipBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.MembershipBinding()), ]; - client.innerApiCalls.listMemberships = stubSimpleCall(expectedResponse); - const [response] = await client.listMemberships(request); + client.innerApiCalls.listMembershipBindings = stubSimpleCall(expectedResponse); + const [response] = await client.listMembershipBindings(request); assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listMemberships as SinonStub) + const actualRequest = (client.innerApiCalls.listMembershipBindings as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listMemberships as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.listMembershipBindings as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMemberships without error using callback', async () => { + it('invokes listMembershipBindings without error using callback', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + new protos.google.cloud.gkehub.v1.ListMembershipBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.MembershipBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.MembershipBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.MembershipBinding()), ]; - client.innerApiCalls.listMemberships = stubSimpleCallWithCallback(expectedResponse); + client.innerApiCalls.listMembershipBindings = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listMemberships( + client.listMembershipBindings( request, - (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IMembership[]|null) => { + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IMembershipBinding[]|null) => { if (err) { reject(err); } else { @@ -1583,61 +7095,61 @@ describe('v1.GkeHubClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listMemberships as SinonStub) + const actualRequest = (client.innerApiCalls.listMembershipBindings as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listMemberships as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.listMembershipBindings as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMemberships with error', async () => { + it('invokes listMembershipBindings with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + new protos.google.cloud.gkehub.v1.ListMembershipBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.innerApiCalls.listMemberships = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listMemberships(request), expectedError); - const actualRequest = (client.innerApiCalls.listMemberships as SinonStub) + client.innerApiCalls.listMembershipBindings = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listMembershipBindings(request), expectedError); + const actualRequest = (client.innerApiCalls.listMembershipBindings as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listMemberships as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.listMembershipBindings as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listMembershipsStream without error', async () => { + it('invokes listMembershipBindingsStream without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + new protos.google.cloud.gkehub.v1.ListMembershipBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.MembershipBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.MembershipBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.MembershipBinding()), ]; - client.descriptors.page.listMemberships.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listMembershipsStream(request); + client.descriptors.page.listMembershipBindings.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listMembershipBindingsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkehub.v1.Membership[] = []; - stream.on('data', (response: protos.google.cloud.gkehub.v1.Membership) => { + const responses: protos.google.cloud.gkehub.v1.MembershipBinding[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.MembershipBinding) => { responses.push(response); }); stream.on('end', () => { @@ -1649,35 +7161,35 @@ describe('v1.GkeHubClient', () => { }); const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listMemberships.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listMemberships, request)); + assert((client.descriptors.page.listMembershipBindings.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMembershipBindings, request)); assert( - (client.descriptors.page.listMemberships.createStream as SinonStub) + (client.descriptors.page.listMembershipBindings.createStream as SinonStub) .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams ) ); }); - it('invokes listMembershipsStream with error', async () => { + it('invokes listMembershipBindingsStream with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + new protos.google.cloud.gkehub.v1.ListMembershipBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.descriptors.page.listMemberships.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listMembershipsStream(request); + client.descriptors.page.listMembershipBindings.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listMembershipBindingsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkehub.v1.Membership[] = []; - stream.on('data', (response: protos.google.cloud.gkehub.v1.Membership) => { + const responses: protos.google.cloud.gkehub.v1.MembershipBinding[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.MembershipBinding) => { responses.push(response); }); stream.on('end', () => { @@ -1688,79 +7200,79 @@ describe('v1.GkeHubClient', () => { }); }); await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listMemberships.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listMemberships, request)); + assert((client.descriptors.page.listMembershipBindings.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMembershipBindings, request)); assert( - (client.descriptors.page.listMemberships.createStream as SinonStub) + (client.descriptors.page.listMembershipBindings.createStream as SinonStub) .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams ) ); }); - it('uses async iteration with listMemberships without error', async () => { + it('uses async iteration with listMembershipBindings without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + new protos.google.cloud.gkehub.v1.ListMembershipBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Membership()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.MembershipBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.MembershipBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.MembershipBinding()), ]; - client.descriptors.page.listMemberships.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.gkehub.v1.IMembership[] = []; - const iterable = client.listMembershipsAsync(request); + client.descriptors.page.listMembershipBindings.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkehub.v1.IMembershipBinding[] = []; + const iterable = client.listMembershipBindingsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listMemberships.asyncIterate as SinonStub) + (client.descriptors.page.listMembershipBindings.asyncIterate as SinonStub) .getCall(0).args[1], request); assert( - (client.descriptors.page.listMemberships.asyncIterate as SinonStub) + (client.descriptors.page.listMembershipBindings.asyncIterate as SinonStub) .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams ) ); }); - it('uses async iteration with listMemberships with error', async () => { + it('uses async iteration with listMembershipBindings with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListMembershipsRequest() + new protos.google.cloud.gkehub.v1.ListMembershipBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipsRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.descriptors.page.listMemberships.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listMembershipsAsync(request); + client.descriptors.page.listMembershipBindings.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMembershipBindingsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.gkehub.v1.IMembership[] = []; + const responses: protos.google.cloud.gkehub.v1.IMembershipBinding[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listMemberships.asyncIterate as SinonStub) + (client.descriptors.page.listMembershipBindings.asyncIterate as SinonStub) .getCall(0).args[1], request); assert( - (client.descriptors.page.listMemberships.asyncIterate as SinonStub) + (client.descriptors.page.listMembershipBindings.asyncIterate as SinonStub) .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams ) @@ -1768,57 +7280,57 @@ describe('v1.GkeHubClient', () => { }); }); - describe('listFeatures', () => { - it('invokes listFeatures without error', async () => { + describe('listMembershipRBACRoleBindings', () => { + it('invokes listMembershipRBACRoleBindings without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + new protos.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), ]; - client.innerApiCalls.listFeatures = stubSimpleCall(expectedResponse); - const [response] = await client.listFeatures(request); + client.innerApiCalls.listMembershipRbacRoleBindings = stubSimpleCall(expectedResponse); + const [response] = await client.listMembershipRBACRoleBindings(request); assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFeatures as SinonStub) + const actualRequest = (client.innerApiCalls.listMembershipRbacRoleBindings as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFeatures as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.listMembershipRbacRoleBindings as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listFeatures without error using callback', async () => { + it('invokes listMembershipRBACRoleBindings without error using callback', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + new protos.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), ]; - client.innerApiCalls.listFeatures = stubSimpleCallWithCallback(expectedResponse); + client.innerApiCalls.listMembershipRbacRoleBindings = stubSimpleCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listFeatures( + client.listMembershipRBACRoleBindings( request, - (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IFeature[]|null) => { + (err?: Error|null, result?: protos.google.cloud.gkehub.v1.IRBACRoleBinding[]|null) => { if (err) { reject(err); } else { @@ -1828,61 +7340,61 @@ describe('v1.GkeHubClient', () => { }); const response = await promise; assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listFeatures as SinonStub) + const actualRequest = (client.innerApiCalls.listMembershipRbacRoleBindings as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFeatures as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.listMembershipRbacRoleBindings as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listFeatures with error', async () => { + it('invokes listMembershipRBACRoleBindings with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + new protos.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.innerApiCalls.listFeatures = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listFeatures(request), expectedError); - const actualRequest = (client.innerApiCalls.listFeatures as SinonStub) + client.innerApiCalls.listMembershipRbacRoleBindings = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listMembershipRBACRoleBindings(request), expectedError); + const actualRequest = (client.innerApiCalls.listMembershipRbacRoleBindings as SinonStub) .getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listFeatures as SinonStub) + const actualHeaderRequestParams = (client.innerApiCalls.listMembershipRbacRoleBindings as SinonStub) .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listFeaturesStream without error', async () => { + it('invokes listMembershipRBACRoleBindingsStream without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + new protos.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), ]; - client.descriptors.page.listFeatures.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listFeaturesStream(request); + client.descriptors.page.listMembershipRBACRoleBindings.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listMembershipRBACRoleBindingsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkehub.v1.Feature[] = []; - stream.on('data', (response: protos.google.cloud.gkehub.v1.Feature) => { + const responses: protos.google.cloud.gkehub.v1.RBACRoleBinding[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.RBACRoleBinding) => { responses.push(response); }); stream.on('end', () => { @@ -1894,35 +7406,35 @@ describe('v1.GkeHubClient', () => { }); const responses = await promise; assert.deepStrictEqual(responses, expectedResponse); - assert((client.descriptors.page.listFeatures.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFeatures, request)); + assert((client.descriptors.page.listMembershipRBACRoleBindings.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMembershipRbacRoleBindings, request)); assert( - (client.descriptors.page.listFeatures.createStream as SinonStub) + (client.descriptors.page.listMembershipRBACRoleBindings.createStream as SinonStub) .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams ) ); }); - it('invokes listFeaturesStream with error', async () => { + it('invokes listMembershipRBACRoleBindingsStream with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + new protos.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.descriptors.page.listFeatures.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listFeaturesStream(request); + client.descriptors.page.listMembershipRBACRoleBindings.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listMembershipRBACRoleBindingsStream(request); const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.gkehub.v1.Feature[] = []; - stream.on('data', (response: protos.google.cloud.gkehub.v1.Feature) => { + const responses: protos.google.cloud.gkehub.v1.RBACRoleBinding[] = []; + stream.on('data', (response: protos.google.cloud.gkehub.v1.RBACRoleBinding) => { responses.push(response); }); stream.on('end', () => { @@ -1933,79 +7445,79 @@ describe('v1.GkeHubClient', () => { }); }); await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listFeatures.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listFeatures, request)); + assert((client.descriptors.page.listMembershipRBACRoleBindings.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listMembershipRbacRoleBindings, request)); assert( - (client.descriptors.page.listFeatures.createStream as SinonStub) + (client.descriptors.page.listMembershipRBACRoleBindings.createStream as SinonStub) .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams ) ); }); - it('uses async iteration with listFeatures without error', async () => { + it('uses async iteration with listMembershipRBACRoleBindings without error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + new protos.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), - generateSampleMessage(new protos.google.cloud.gkehub.v1.Feature()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), + generateSampleMessage(new protos.google.cloud.gkehub.v1.RBACRoleBinding()), ]; - client.descriptors.page.listFeatures.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.gkehub.v1.IFeature[] = []; - const iterable = client.listFeaturesAsync(request); + client.descriptors.page.listMembershipRBACRoleBindings.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.gkehub.v1.IRBACRoleBinding[] = []; + const iterable = client.listMembershipRBACRoleBindingsAsync(request); for await (const resource of iterable) { responses.push(resource!); } assert.deepStrictEqual(responses, expectedResponse); assert.deepStrictEqual( - (client.descriptors.page.listFeatures.asyncIterate as SinonStub) + (client.descriptors.page.listMembershipRBACRoleBindings.asyncIterate as SinonStub) .getCall(0).args[1], request); assert( - (client.descriptors.page.listFeatures.asyncIterate as SinonStub) + (client.descriptors.page.listMembershipRBACRoleBindings.asyncIterate as SinonStub) .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams ) ); }); - it('uses async iteration with listFeatures with error', async () => { + it('uses async iteration with listMembershipRBACRoleBindings with error', async () => { const client = new gkehubModule.v1.GkeHubClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); await client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.gkehub.v1.ListFeaturesRequest() + new protos.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest() ); const defaultValue1 = - getTypeDefaultValue('.google.cloud.gkehub.v1.ListFeaturesRequest', ['parent']); + getTypeDefaultValue('.google.cloud.gkehub.v1.ListMembershipRBACRoleBindingsRequest', ['parent']); request.parent = defaultValue1; const expectedHeaderRequestParams = `parent=${defaultValue1 ?? '' }`; const expectedError = new Error('expected'); - client.descriptors.page.listFeatures.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listFeaturesAsync(request); + client.descriptors.page.listMembershipRBACRoleBindings.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMembershipRBACRoleBindingsAsync(request); await assert.rejects(async () => { - const responses: protos.google.cloud.gkehub.v1.IFeature[] = []; + const responses: protos.google.cloud.gkehub.v1.IRBACRoleBinding[] = []; for await (const resource of iterable) { responses.push(resource!); } }); assert.deepStrictEqual( - (client.descriptors.page.listFeatures.asyncIterate as SinonStub) + (client.descriptors.page.listMembershipRBACRoleBindings.asyncIterate as SinonStub) .getCall(0).args[1], request); assert( - (client.descriptors.page.listFeatures.asyncIterate as SinonStub) + (client.descriptors.page.listMembershipRBACRoleBindings.asyncIterate as SinonStub) .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( expectedHeaderRequestParams ) @@ -2145,6 +7657,160 @@ describe('v1.GkeHubClient', () => { }); }); + describe('membershipBinding', async () => { + const fakePath = "/rendered/path/membershipBinding"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + membership: "membershipValue", + membershipbinding: "membershipbindingValue", + }; + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.membershipBindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.membershipBindingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('membershipBindingPath', () => { + const result = client.membershipBindingPath("projectValue", "locationValue", "membershipValue", "membershipbindingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.membershipBindingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromMembershipBindingName', () => { + const result = client.matchProjectFromMembershipBindingName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.membershipBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromMembershipBindingName', () => { + const result = client.matchLocationFromMembershipBindingName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.membershipBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMembershipFromMembershipBindingName', () => { + const result = client.matchMembershipFromMembershipBindingName(fakePath); + assert.strictEqual(result, "membershipValue"); + assert((client.pathTemplates.membershipBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMembershipbindingFromMembershipBindingName', () => { + const result = client.matchMembershipbindingFromMembershipBindingName(fakePath); + assert.strictEqual(result, "membershipbindingValue"); + assert((client.pathTemplates.membershipBindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('namespace', async () => { + const fakePath = "/rendered/path/namespace"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + scope: "scopeValue", + namespace: "namespaceValue", + }; + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.namespacePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.namespacePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('namespacePath', () => { + const result = client.namespacePath("projectValue", "locationValue", "scopeValue", "namespaceValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.namespacePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromNamespaceName', () => { + const result = client.matchProjectFromNamespaceName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.namespacePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromNamespaceName', () => { + const result = client.matchLocationFromNamespaceName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.namespacePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchScopeFromNamespaceName', () => { + const result = client.matchScopeFromNamespaceName(fakePath); + assert.strictEqual(result, "scopeValue"); + assert((client.pathTemplates.namespacePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchNamespaceFromNamespaceName', () => { + const result = client.matchNamespaceFromNamespaceName(fakePath); + assert.strictEqual(result, "namespaceValue"); + assert((client.pathTemplates.namespacePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('organizationLocationFleet', async () => { + const fakePath = "/rendered/path/organizationLocationFleet"; + const expectedParameters = { + organization: "organizationValue", + location: "locationValue", + fleet: "fleetValue", + }; + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.organizationLocationFleetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.organizationLocationFleetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('organizationLocationFleetPath', () => { + const result = client.organizationLocationFleetPath("organizationValue", "locationValue", "fleetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.organizationLocationFleetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchOrganizationFromOrganizationLocationFleetName', () => { + const result = client.matchOrganizationFromOrganizationLocationFleetName(fakePath); + assert.strictEqual(result, "organizationValue"); + assert((client.pathTemplates.organizationLocationFleetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromOrganizationLocationFleetName', () => { + const result = client.matchLocationFromOrganizationLocationFleetName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.organizationLocationFleetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFleetFromOrganizationLocationFleetName', () => { + const result = client.matchFleetFromOrganizationLocationFleetName(fakePath); + assert.strictEqual(result, "fleetValue"); + assert((client.pathTemplates.organizationLocationFleetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + describe('project', async () => { const fakePath = "/rendered/path/project"; const expectedParameters = { @@ -2174,5 +7840,205 @@ describe('v1.GkeHubClient', () => { .getCall(-1).calledWith(fakePath)); }); }); + + describe('projectLocationFleet', async () => { + const fakePath = "/rendered/path/projectLocationFleet"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + fleet: "fleetValue", + }; + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationFleetPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationFleetPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationFleetPath', () => { + const result = client.projectLocationFleetPath("projectValue", "locationValue", "fleetValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationFleetPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationFleetName', () => { + const result = client.matchProjectFromProjectLocationFleetName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationFleetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationFleetName', () => { + const result = client.matchLocationFromProjectLocationFleetName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationFleetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchFleetFromProjectLocationFleetName', () => { + const result = client.matchFleetFromProjectLocationFleetName(fakePath); + assert.strictEqual(result, "fleetValue"); + assert((client.pathTemplates.projectLocationFleetPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationMembershipRbacrolebinding', async () => { + const fakePath = "/rendered/path/projectLocationMembershipRbacrolebinding"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + membership: "membershipValue", + rbacrolebinding: "rbacrolebindingValue", + }; + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationMembershipRbacrolebindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationMembershipRbacrolebindingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationMembershipRbacrolebindingPath', () => { + const result = client.projectLocationMembershipRbacrolebindingPath("projectValue", "locationValue", "membershipValue", "rbacrolebindingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationMembershipRbacrolebindingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationMembershipRbacrolebindingName', () => { + const result = client.matchProjectFromProjectLocationMembershipRbacrolebindingName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationMembershipRbacrolebindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationMembershipRbacrolebindingName', () => { + const result = client.matchLocationFromProjectLocationMembershipRbacrolebindingName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationMembershipRbacrolebindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchMembershipFromProjectLocationMembershipRbacrolebindingName', () => { + const result = client.matchMembershipFromProjectLocationMembershipRbacrolebindingName(fakePath); + assert.strictEqual(result, "membershipValue"); + assert((client.pathTemplates.projectLocationMembershipRbacrolebindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRbacrolebindingFromProjectLocationMembershipRbacrolebindingName', () => { + const result = client.matchRbacrolebindingFromProjectLocationMembershipRbacrolebindingName(fakePath); + assert.strictEqual(result, "rbacrolebindingValue"); + assert((client.pathTemplates.projectLocationMembershipRbacrolebindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('projectLocationScopeRbacrolebinding', async () => { + const fakePath = "/rendered/path/projectLocationScopeRbacrolebinding"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + scope: "scopeValue", + rbacrolebinding: "rbacrolebindingValue", + }; + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.projectLocationScopeRbacrolebindingPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.projectLocationScopeRbacrolebindingPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('projectLocationScopeRbacrolebindingPath', () => { + const result = client.projectLocationScopeRbacrolebindingPath("projectValue", "locationValue", "scopeValue", "rbacrolebindingValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.projectLocationScopeRbacrolebindingPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromProjectLocationScopeRbacrolebindingName', () => { + const result = client.matchProjectFromProjectLocationScopeRbacrolebindingName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.projectLocationScopeRbacrolebindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromProjectLocationScopeRbacrolebindingName', () => { + const result = client.matchLocationFromProjectLocationScopeRbacrolebindingName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.projectLocationScopeRbacrolebindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchScopeFromProjectLocationScopeRbacrolebindingName', () => { + const result = client.matchScopeFromProjectLocationScopeRbacrolebindingName(fakePath); + assert.strictEqual(result, "scopeValue"); + assert((client.pathTemplates.projectLocationScopeRbacrolebindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchRbacrolebindingFromProjectLocationScopeRbacrolebindingName', () => { + const result = client.matchRbacrolebindingFromProjectLocationScopeRbacrolebindingName(fakePath); + assert.strictEqual(result, "rbacrolebindingValue"); + assert((client.pathTemplates.projectLocationScopeRbacrolebindingPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('scope', async () => { + const fakePath = "/rendered/path/scope"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + scope: "scopeValue", + }; + const client = new gkehubModule.v1.GkeHubClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.scopePathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.scopePathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('scopePath', () => { + const result = client.scopePath("projectValue", "locationValue", "scopeValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.scopePathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromScopeName', () => { + const result = client.matchProjectFromScopeName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.scopePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromScopeName', () => { + const result = client.matchLocationFromScopeName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.scopePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchScopeFromScopeName', () => { + const result = client.matchScopeFromScopeName(fakePath); + assert.strictEqual(result, "scopeValue"); + assert((client.pathTemplates.scopePathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); }); });