diff --git a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/membership.proto b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/membership.proto index 3133403d72f..ae4337cc26e 100644 --- a/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/membership.proto +++ b/packages/google-cloud-gkehub/protos/google/cloud/gkehub/v1/membership.proto @@ -1,4 +1,4 @@ -// Copyright 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -41,8 +41,9 @@ message Membership { MembershipEndpoint endpoint = 4 [(google.api.field_behavior) = OPTIONAL]; } - // Output only. The full, unique name of this Membership resource in the format - // `projects/*/locations/*/memberships/{membership_id}`, set during creation. + // Output only. The full, unique name of this Membership resource in the + // format `projects/*/locations/*/memberships/{membership_id}`, set during + // creation. // // `membership_id` must be a valid RFC 1123 compliant DNS label: // @@ -54,7 +55,7 @@ message Membership { // with a maximum length of 63 characters. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. GCP labels for this membership. + // Optional. Labels for this membership. map labels = 2 [(google.api.field_behavior) = OPTIONAL]; // Output only. Description of this membership, limited to 63 characters. @@ -67,16 +68,19 @@ message Membership { MembershipState state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. When the Membership was created. - google.protobuf.Timestamp create_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. When the Membership was last updated. - google.protobuf.Timestamp update_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. When the Membership was deleted. - google.protobuf.Timestamp delete_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp delete_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. An externally-generated and managed ID for this Membership. This ID may - // be modified after creation, but this is not recommended. + // Optional. An externally-generated and managed ID for this Membership. This + // ID may be modified after creation, but this is not recommended. // // The ID must match the regex: `[a-zA-Z0-9][a-zA-Z0-9_\-\.]*` // @@ -84,14 +88,16 @@ message Membership { // set to the UID of the `kube-system` namespace object. string external_id = 9 [(google.api.field_behavior) = OPTIONAL]; - // Output only. For clusters using Connect, the timestamp of the most recent connection - // established with Google Cloud. This time is updated every several minutes, - // not continuously. For clusters that do not use GKE Connect, or that have - // never connected successfully, this field will be unset. - google.protobuf.Timestamp last_connection_time = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. For clusters using Connect, the timestamp of the most recent + // connection established with Google Cloud. This time is updated every + // several minutes, not continuously. For clusters that do not use GKE + // Connect, or that have never connected successfully, this field will be + // unset. + google.protobuf.Timestamp last_connection_time = 10 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Google-generated UUID for this resource. This is unique across all - // Membership resources. If a Membership resource is deleted and another + // Output only. Google-generated UUID for this resource. This is unique across + // all Membership resources. If a Membership resource is deleted and another // resource with the same name is created, it gets a different unique_id. string unique_id = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -99,34 +105,44 @@ message Membership { // See the documentation on Workload Identity for more details: // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity Authority authority = 12 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The monitoring config information for this membership. + MonitoringConfig monitoring_config = 14 + [(google.api.field_behavior) = OPTIONAL]; } // MembershipEndpoint contains information needed to contact a Kubernetes API, // endpoint and any additional Kubernetes metadata. message MembershipEndpoint { // Optional. GKE-specific information. Only present if this Membership is a GKE cluster. - GkeCluster gke_cluster = 1 [(google.api.field_behavior) = OPTIONAL]; + GkeCluster gke_cluster = 1 [(google.api.field_behavior) = OPTIONAL]; // Output only. Useful Kubernetes-specific metadata. - KubernetesMetadata kubernetes_metadata = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + KubernetesMetadata kubernetes_metadata = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. The in-cluster Kubernetes Resources that should be applied for a correctly - // registered cluster, in the steady state. These resources: + // Optional. The in-cluster Kubernetes Resources that should be applied for a + // correctly registered cluster, in the steady state. These resources: // // * Ensure that the cluster is exclusively registered to one and only one // Hub Membership. // * Propagate Workload Pool Information available in the Membership // Authority field. // * Ensure proper initial configuration of default Hub Features. - KubernetesResource kubernetes_resource = 3 [(google.api.field_behavior) = OPTIONAL]; + KubernetesResource kubernetes_resource = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Whether the lifecycle of this membership is managed by a + // google cluster platform service. + bool google_managed = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; } // KubernetesResource contains the YAML manifests and configuration for // Membership Kubernetes resources in the cluster. After CreateMembership or // UpdateMembership, these resources should be re-applied in the cluster. message KubernetesResource { - // Input only. The YAML representation of the Membership CR. This field is ignored for GKE - // clusters where Hub can read the CR directly. + // Input only. The YAML representation of the Membership CR. This field is + // ignored for GKE clusters where Hub can read the CR directly. // // Callers should provide the CR that is currently present in the cluster // during CreateMembership or UpdateMembership, or leave this field empty if @@ -134,15 +150,16 @@ message KubernetesResource { // registered with another Membership. string membership_cr_manifest = 1 [(google.api.field_behavior) = INPUT_ONLY]; - // Output only. Additional Kubernetes resources that need to be applied to the cluster - // after Membership creation, and after every update. + // Output only. Additional Kubernetes resources that need to be applied to the + // cluster after Membership creation, and after every update. // // This field is only populated in the Membership returned from a successful // long-running operation from CreateMembership or UpdateMembership. It is not // populated during normal GetMembership or ListMemberships requests. To get // the resource manifest after the initial registration, the caller should // make a UpdateMembership call with an empty field mask. - repeated ResourceManifest membership_resources = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated ResourceManifest membership_resources = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The Kubernetes resources for installing the GKE Connect agent // @@ -151,7 +168,8 @@ message KubernetesResource { // populated during normal GetMembership or ListMemberships requests. To get // the resource manifest after the initial registration, the caller should // make a UpdateMembership call with an empty field mask. - repeated ResourceManifest connect_resources = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + repeated ResourceManifest connect_resources = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Optional. Options for Kubernetes resource generation. ResourceOptions resource_options = 4 [(google.api.field_behavior) = OPTIONAL]; @@ -159,9 +177,9 @@ message KubernetesResource { // ResourceOptions represent options for Kubernetes resource generation. message ResourceOptions { - // Optional. The Connect agent version to use for connect_resources. Defaults to the - // latest GKE Connect version. The version must be a currently supported - // version, obsolete versions will be rejected. + // Optional. The Connect agent version to use for connect_resources. Defaults + // to the latest GKE Connect version. The version must be a currently + // supported version, obsolete versions will be rejected. string connect_version = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Use `apiextensions/v1beta1` instead of `apiextensions/v1` for @@ -170,8 +188,8 @@ message ResourceOptions { // <1.16. bool v1beta1_crd = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Major version of the Kubernetes cluster. This is only used to determine - // which version to use for the CustomResourceDefinition resources, + // Optional. Major version of the Kubernetes cluster. This is only used to + // determine which version to use for the CustomResourceDefinition resources, // `apiextensions/v1beta1` or`apiextensions/v1`. string k8s_version = 3 [(google.api.field_behavior) = OPTIONAL]; } @@ -192,23 +210,30 @@ message ResourceManifest { // GkeCluster contains information specific to GKE clusters. message GkeCluster { - // Immutable. Self-link of the GCP resource for the GKE cluster. For example: + // Immutable. Self-link of the Google Cloud resource for the GKE cluster. For + // example: // // //container.googleapis.com/projects/my-project/locations/us-west1-a/clusters/my-cluster // // Zonal clusters are also supported. string resource_link = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Output only. If cluster_missing is set then it denotes that the GKE cluster + // no longer exists in the GKE Control Plane. + bool cluster_missing = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // KubernetesMetadata provides informational metadata for Memberships // representing Kubernetes clusters. message KubernetesMetadata { - // Output only. Kubernetes API server version string as reported by `/version`. - string kubernetes_api_server_version = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Node providerID as reported by the first node in the list of nodes on - // the Kubernetes endpoint. On Kubernetes platforms that support zero-node - // clusters (like GKE-on-GCP), the node_count will be zero and the + // Output only. Kubernetes API server version string as reported by + // `/version`. + string kubernetes_api_server_version = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Node providerID as reported by the first node in the list of + // nodes on the Kubernetes endpoint. On Kubernetes platforms that support + // zero-node clusters (like GKE-on-GCP), the node_count will be zero and the // node_provider_id will be empty. string node_provider_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -218,14 +243,44 @@ message KubernetesMetadata { // Output only. vCPU count as reported by Kubernetes nodes resources. int32 vcpu_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The total memory capacity as reported by the sum of all Kubernetes nodes - // resources, defined in MB. + // Output only. The total memory capacity as reported by the sum of all + // Kubernetes nodes resources, defined in MB. int32 memory_mb = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The time at which these details were last updated. This update_time is - // different from the Membership-level update_time since EndpointDetails are - // updated internally for API consumers. - google.protobuf.Timestamp update_time = 100 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The time at which these details were last updated. This + // update_time is different from the Membership-level update_time since + // EndpointDetails are updated internally for API consumers. + google.protobuf.Timestamp update_time = 100 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// This field informs Fleet-based applications/services/UIs with the necessary +// information for where each underlying Cluster reports its metrics. +message MonitoringConfig { + // Immutable. Project used to report Metrics + string project_id = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Location used to report Metrics + string location = 2 [(google.api.field_behavior) = IMMUTABLE]; + + // Immutable. Cluster name used to report metrics. + // For Anthos on VMWare/Baremetal, it would be in format + // `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in + // format + // `{azureClusters, awsClusters}/cluster_name`. + string cluster = 3 [(google.api.field_behavior) = IMMUTABLE]; + + // Kubernetes system metrics, if available, are written to this prefix. + // This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos + // eventually. Noted: Anthos MultiCloud will have kubernetes.io prefix today + // but will migration to be under kubernetes.io/anthos + string kubernetes_metrics_prefix = 4; + + // Immutable. Cluster hash, this is a unique string generated by google code, + // which does not contain any PII, which we can use to reference the cluster. + // This is expected to be created by the monitoring stack and persisted into + // the Cluster object as well as to GKE-Hub. + string cluster_hash = 5 [(google.api.field_behavior) = IMMUTABLE]; } // MembershipState describes the state of a Membership resource. @@ -259,8 +314,8 @@ message MembershipState { // See the workload identity documentation for more details: // https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity message Authority { - // Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with `https://` and - // be a valid URL with length <2000 characters. + // Optional. A JSON Web Token (JWT) issuer URI. `issuer` must start with + // `https://` and be a valid URL with length <2000 characters. // // If set, then Google will allow valid OIDC tokens from this issuer to // authenticate within the workload_identity_pool. OIDC discovery will be @@ -271,8 +326,8 @@ message Authority { // a new issuer (and re-enabling Workload Identity). string issuer = 1 [(google.api.field_behavior) = OPTIONAL]; - // Output only. The name of the workload identity pool in which `issuer` will be - // recognized. + // Output only. The name of the workload identity pool in which `issuer` will + // be recognized. // // There is a single Workload Identity Pool per Hub that is shared // between all Memberships that belong to that Hub. For a Hub hosted in @@ -280,11 +335,12 @@ message Authority { // although this is subject to change in newer versions of this API. string workload_identity_pool = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. An identity provider that reflects the `issuer` in the workload identity - // pool. + // Output only. An identity provider that reflects the `issuer` in the + // workload identity pool. string identity_provider = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Optional. OIDC verification keys for this Membership in JWKS format (RFC 7517). + // Optional. OIDC verification keys for this Membership in JWKS format (RFC + // 7517). // // When this field is set, OIDC discovery will NOT be performed on `issuer`, // and instead OIDC tokens will be validated using this field. 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 612f079d5d3..cecf242e41a 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 2021 Google LLC +// Copyright 2023 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ import "google/api/resource.proto"; import "google/cloud/gkehub/v1/feature.proto"; import "google/cloud/gkehub/v1/membership.proto"; import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; @@ -43,17 +44,22 @@ option ruby_package = "Google::Cloud::GkeHub::V1"; // * [Membership][google.cloud.gkehub.v1.Membership] // * [Feature][google.cloud.gkehub.v1.Feature] // -// GKE Hub is currently only available in the global region. +// GKE Hub is currently available in the global region and all regions in +// https://cloud.google.com/compute/docs/regions-zones. Feature is only +// available in global region while membership is global region and all the +// regions. // // **Membership management may be non-trivial:** it is recommended to use one // of the Google-provided client libraries or tools where possible when working // with Membership resources. service GkeHub { option (google.api.default_host) = "gkehub.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; // Lists Memberships in a given project and location. - rpc ListMemberships(ListMembershipsRequest) returns (ListMembershipsResponse) { + rpc ListMemberships(ListMembershipsRequest) + returns (ListMembershipsResponse) { option (google.api.http) = { get: "/v1/{parent=projects/*/locations/*}/memberships" }; @@ -89,7 +95,8 @@ service GkeHub { // **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) { + rpc CreateMembership(CreateMembershipRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/memberships" body: "resource" @@ -102,7 +109,8 @@ service GkeHub { } // Adds a new Feature. - rpc CreateFeature(CreateFeatureRequest) returns (google.longrunning.Operation) { + rpc CreateFeature(CreateFeatureRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/features" body: "resource" @@ -119,7 +127,8 @@ service GkeHub { // **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) { + rpc DeleteMembership(DeleteMembershipRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/memberships/*}" }; @@ -131,7 +140,8 @@ service GkeHub { } // Removes a Feature. - rpc DeleteFeature(DeleteFeatureRequest) returns (google.longrunning.Operation) { + rpc DeleteFeature(DeleteFeatureRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { delete: "/v1/{name=projects/*/locations/*/features/*}" }; @@ -143,7 +153,8 @@ service GkeHub { } // Updates an existing Membership. - rpc UpdateMembership(UpdateMembershipRequest) returns (google.longrunning.Operation) { + rpc UpdateMembership(UpdateMembershipRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{name=projects/*/locations/*/memberships/*}" body: "resource" @@ -156,7 +167,8 @@ service GkeHub { } // Updates an existing Feature. - rpc UpdateFeature(UpdateFeatureRequest) returns (google.longrunning.Operation) { + rpc UpdateFeature(UpdateFeatureRequest) + returns (google.longrunning.Operation) { option (google.api.http) = { patch: "/v1/{name=projects/*/locations/*/features/*}" body: "resource" @@ -172,7 +184,8 @@ service GkeHub { // // **This method is used internally by Google-provided libraries.** // Most clients should not need to call this method directly. - rpc GenerateConnectManifest(GenerateConnectManifestRequest) returns (GenerateConnectManifestResponse) { + rpc GenerateConnectManifest(GenerateConnectManifestRequest) + returns (GenerateConnectManifestResponse) { option (google.api.http) = { get: "/v1/{name=projects/*/locations/*/memberships/*}:generateConnectManifest" }; @@ -181,8 +194,9 @@ service GkeHub { // Request message for `GkeHub.ListMemberships` method. message ListMembershipsRequest { - // Required. The parent (project and location) where the Memberships will be listed. - // Specified in the format `projects/*/locations/*`. + // 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. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -190,9 +204,9 @@ message ListMembershipsRequest { } ]; - // 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. + // 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 `ListMemberships` which @@ -200,8 +214,8 @@ message ListMembershipsRequest { // resources. string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Lists Memberships that match the filter expression, following the syntax - // outlined in https://google.aip.dev/160. + // Optional. Lists Memberships that match the filter expression, following the + // syntax outlined in https://google.aip.dev/160. // // Examples: // @@ -255,8 +269,8 @@ message GetMembershipRequest { // Request message for the `GkeHub.CreateMembership` method. message CreateMembershipRequest { - // Required. The parent (project and location) where the Memberships will be created. - // Specified in the format `projects/*/locations/*`. + // Required. The parent (project and location) where the Memberships will be + // created. Specified in the format `projects/*/locations/*`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -264,8 +278,8 @@ message CreateMembershipRequest { } ]; - // Required. Client chosen ID for the membership. `membership_id` must be a valid RFC - // 1123 compliant DNS label: + // 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 `-` @@ -319,6 +333,11 @@ message DeleteMembershipRequest { // The request ID must be a valid UUID with the exception that zero UUID is // not supported (00000000-0000-0000-0000-000000000000). string request_id = 2 [(google.api.field_behavior) = OPTIONAL]; + + // 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. + bool force = 3 [(google.api.field_behavior) = OPTIONAL]; } // Request message for `GkeHub.UpdateMembership` method. @@ -333,7 +352,8 @@ message UpdateMembershipRequest { ]; // Required. Mask of fields to update. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; // 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 @@ -365,8 +385,8 @@ message UpdateMembershipRequest { // method. // . message GenerateConnectManifestRequest { - // Required. The Membership resource name the Agent will associate with, in the format - // `projects/*/locations/*/memberships/*`. + // Required. The Membership resource name the Agent will associate with, in + // the format `projects/*/locations/*/memberships/*`. string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -374,21 +394,23 @@ message GenerateConnectManifestRequest { } ]; - // Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. + // Optional. Namespace for GKE Connect agent resources. Defaults to + // `gke-connect`. // // The Connect Agent is authorized automatically when run in the default // namespace. Otherwise, explicit authorization must be granted with an // additional IAM binding. string namespace = 2 [(google.api.field_behavior) = OPTIONAL]; - // Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com - // requires the use of a proxy. Format must be in the form - // `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + // Optional. URI of a proxy if connectivity from the agent to + // gkeconnect.googleapis.com requires the use of a proxy. Format must be in + // the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol // supported by the proxy. This will direct the connect agent's outbound // traffic through a HTTP(S) proxy. bytes proxy = 3 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The Connect agent version to use. Defaults to the most current version. + // Optional. The Connect agent version to use. Defaults to the most current + // version. string version = 4 [(google.api.field_behavior) = OPTIONAL]; // Optional. If true, generate the resources for upgrade only. Some resources diff --git a/packages/google-cloud-gkehub/protos/protos.d.ts b/packages/google-cloud-gkehub/protos/protos.d.ts index 001d641e820..8367a8b6d99 100644 --- a/packages/google-cloud-gkehub/protos/protos.d.ts +++ b/packages/google-cloud-gkehub/protos/protos.d.ts @@ -12858,6 +12858,9 @@ export namespace google { /** Membership authority */ authority?: (google.cloud.gkehub.v1.IAuthority|null); + + /** Membership monitoringConfig */ + monitoringConfig?: (google.cloud.gkehub.v1.IMonitoringConfig|null); } /** Represents a Membership. */ @@ -12905,6 +12908,9 @@ export namespace google { /** 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"; @@ -12997,6 +13003,9 @@ export namespace google { /** MembershipEndpoint kubernetesResource */ kubernetesResource?: (google.cloud.gkehub.v1.IKubernetesResource|null); + + /** MembershipEndpoint googleManaged */ + googleManaged?: (boolean|null); } /** Represents a MembershipEndpoint. */ @@ -13017,6 +13026,9 @@ export namespace google { /** 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 @@ -13427,6 +13439,9 @@ export namespace google { /** GkeCluster resourceLink */ resourceLink?: (string|null); + + /** GkeCluster clusterMissing */ + clusterMissing?: (boolean|null); } /** Represents a GkeCluster. */ @@ -13441,6 +13456,9 @@ export namespace google { /** GkeCluster resourceLink. */ public resourceLink: string; + /** GkeCluster clusterMissing. */ + public clusterMissing: boolean; + /** * Creates a new GkeCluster instance using the specified properties. * @param [properties] Properties to set @@ -13646,6 +13664,127 @@ export namespace google { 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 { @@ -14576,6 +14715,9 @@ export namespace google { /** DeleteMembershipRequest requestId */ requestId?: (string|null); + + /** DeleteMembershipRequest force */ + force?: (boolean|null); } /** Represents a DeleteMembershipRequest. */ @@ -14593,6 +14735,9 @@ export namespace google { /** DeleteMembershipRequest requestId. */ public requestId: string; + /** DeleteMembershipRequest force. */ + public force: boolean; + /** * Creates a new DeleteMembershipRequest instance using the specified properties. * @param [properties] Properties to set diff --git a/packages/google-cloud-gkehub/protos/protos.js b/packages/google-cloud-gkehub/protos/protos.js index 1660dff634c..526b22ff50b 100644 --- a/packages/google-cloud-gkehub/protos/protos.js +++ b/packages/google-cloud-gkehub/protos/protos.js @@ -33664,6 +33664,7 @@ * @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 */ /** @@ -33778,6 +33779,14 @@ */ 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; @@ -33841,6 +33850,8 @@ 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; }; @@ -33942,6 +33953,10 @@ 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: reader.skipType(tag & 7); break; @@ -34036,6 +34051,11 @@ 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; }; @@ -34101,6 +34121,11 @@ 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; }; @@ -34130,6 +34155,7 @@ object.lastConnectionTime = null; object.uniqueId = ""; object.authority = null; + object.monitoringConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -34162,6 +34188,8 @@ 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; }; @@ -34203,6 +34231,7 @@ * @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 */ /** @@ -34244,6 +34273,14 @@ */ MembershipEndpoint.prototype.kubernetesResource = null; + /** + * MembershipEndpoint googleManaged. + * @member {boolean} googleManaged + * @memberof google.cloud.gkehub.v1.MembershipEndpoint + * @instance + */ + MembershipEndpoint.prototype.googleManaged = false; + /** * Creates a new MembershipEndpoint instance using the specified properties. * @function create @@ -34274,6 +34311,8 @@ $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; }; @@ -34320,6 +34359,10 @@ message.kubernetesResource = $root.google.cloud.gkehub.v1.KubernetesResource.decode(reader, reader.uint32()); break; } + case 8: { + message.googleManaged = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -34370,6 +34413,9 @@ if (error) return "kubernetesResource." + error; } + if (message.googleManaged != null && message.hasOwnProperty("googleManaged")) + if (typeof message.googleManaged !== "boolean") + return "googleManaged: boolean expected"; return null; }; @@ -34400,6 +34446,8 @@ 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; }; @@ -34420,6 +34468,7 @@ object.gkeCluster = null; object.kubernetesMetadata = null; object.kubernetesResource = null; + object.googleManaged = false; } if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) object.gkeCluster = $root.google.cloud.gkehub.v1.GkeCluster.toObject(message.gkeCluster, options); @@ -34427,6 +34476,8 @@ 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; }; @@ -35265,6 +35316,7 @@ * @memberof google.cloud.gkehub.v1 * @interface IGkeCluster * @property {string|null} [resourceLink] GkeCluster resourceLink + * @property {boolean|null} [clusterMissing] GkeCluster clusterMissing */ /** @@ -35290,6 +35342,14 @@ */ GkeCluster.prototype.resourceLink = ""; + /** + * GkeCluster clusterMissing. + * @member {boolean} clusterMissing + * @memberof google.cloud.gkehub.v1.GkeCluster + * @instance + */ + GkeCluster.prototype.clusterMissing = false; + /** * Creates a new GkeCluster instance using the specified properties. * @function create @@ -35316,6 +35376,8 @@ 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); return writer; }; @@ -35354,6 +35416,10 @@ message.resourceLink = reader.string(); break; } + case 2: { + message.clusterMissing = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -35392,6 +35458,9 @@ 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; }; @@ -35409,6 +35478,8 @@ 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; }; @@ -35425,10 +35496,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.resourceLink = ""; + object.clusterMissing = false; + } if (message.resourceLink != null && message.hasOwnProperty("resourceLink")) object.resourceLink = message.resourceLink; + if (message.clusterMissing != null && message.hasOwnProperty("clusterMissing")) + object.clusterMissing = message.clusterMissing; return object; }; @@ -35785,6 +35860,302 @@ return KubernetesMetadata; })(); + v1.MonitoringConfig = (function() { + + /** + * Properties of a MonitoringConfig. + * @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 + */ + + /** + * Constructs a new MonitoringConfig. + * @memberof google.cloud.gkehub.v1 + * @classdesc Represents a MonitoringConfig. + * @implements IMonitoringConfig + * @constructor + * @param {google.cloud.gkehub.v1.IMonitoringConfig=} [properties] Properties to set + */ + function MonitoringConfig(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]]; + } + + /** + * MonitoringConfig projectId. + * @member {string} projectId + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @instance + */ + MonitoringConfig.prototype.projectId = ""; + + /** + * 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. + * @function create + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @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 + */ + 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 MonitoringConfig message from the specified reader or buffer. + * @function decode + * @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.MonitoringConfig} MonitoringConfig + * @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) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MonitoringConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @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 + */ + MonitoringConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MonitoringConfig message. + * @function verify + * @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 + */ + MonitoringConfig.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"; + return null; + }; + + /** + * Creates a MonitoringConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.gkehub.v1.MonitoringConfig} MonitoringConfig + */ + MonitoringConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.gkehub.v1.MonitoringConfig) + 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); + return message; + }; + + /** + * Creates a plain object from a MonitoringConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {google.cloud.gkehub.v1.MonitoringConfig} message MonitoringConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoringConfig.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; + return object; + }; + + /** + * Converts this MonitoringConfig to JSON. + * @function toJSON + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @instance + * @returns {Object.} JSON object + */ + MonitoringConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MonitoringConfig + * @function getTypeUrl + * @memberof google.cloud.gkehub.v1.MonitoringConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoringConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.gkehub.v1.MonitoringConfig"; + }; + + return MonitoringConfig; + })(); + v1.MembershipState = (function() { /** @@ -37802,6 +38173,7 @@ * @interface IDeleteMembershipRequest * @property {string|null} [name] DeleteMembershipRequest name * @property {string|null} [requestId] DeleteMembershipRequest requestId + * @property {boolean|null} [force] DeleteMembershipRequest force */ /** @@ -37835,6 +38207,14 @@ */ 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 @@ -37863,6 +38243,8 @@ 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; }; @@ -37905,6 +38287,10 @@ message.requestId = reader.string(); break; } + case 3: { + message.force = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -37946,6 +38332,9 @@ 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; }; @@ -37965,6 +38354,8 @@ 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; }; @@ -37984,11 +38375,14 @@ 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; }; diff --git a/packages/google-cloud-gkehub/protos/protos.json b/packages/google-cloud-gkehub/protos/protos.json index b1086a6a31d..c494e57ae98 100644 --- a/packages/google-cloud-gkehub/protos/protos.json +++ b/packages/google-cloud-gkehub/protos/protos.json @@ -2770,6 +2770,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "monitoringConfig": { + "type": "MonitoringConfig", + "id": 14, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -2795,6 +2802,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "googleManaged": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -2877,6 +2891,13 @@ "options": { "(google.api.field_behavior)": "IMMUTABLE" } + }, + "clusterMissing": { + "type": "bool", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -2926,6 +2947,42 @@ } } }, + "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": { @@ -3358,6 +3415,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "force": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership.js index c06b552f780..62b23a56aa5 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership.js +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.create_membership.js @@ -29,13 +29,13 @@ function main(parent, membershipId, resource) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent (project and location) where the Memberships will be created. - * Specified in the format `projects/* /locations/*`. + * Required. The parent (project and location) where the Memberships will be + * created. Specified in the format `projects/* /locations/*`. */ // const parent = 'abc123' /** - * Required. Client chosen ID for the membership. `membership_id` must be a valid RFC - * 1123 compliant DNS label: + * 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 diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership.js index 10d0545e57c..a0a28853539 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership.js +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.delete_membership.js @@ -47,6 +47,12 @@ function main(name) { * not supported (00000000-0000-0000-0000-000000000000). */ // const requestId = 'abc123' + /** + * 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. + */ + // const force = 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.generate_connect_manifest.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.generate_connect_manifest.js index e3c44b19b76..2e8977a4515 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.generate_connect_manifest.js +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.generate_connect_manifest.js @@ -29,27 +29,29 @@ function main(name) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The Membership resource name the Agent will associate with, in the format - * `projects/* /locations/* /memberships/*`. + * Required. The Membership resource name the Agent will associate with, in + * the format `projects/* /locations/* /memberships/*`. */ // const name = 'abc123' /** - * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. + * Optional. Namespace for GKE Connect agent resources. Defaults to + * `gke-connect`. * The Connect Agent is authorized automatically when run in the default * namespace. Otherwise, explicit authorization must be granted with an * additional IAM binding. */ // const namespace = 'abc123' /** - * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com - * requires the use of a proxy. Format must be in the form - * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + * Optional. URI of a proxy if connectivity from the agent to + * gkeconnect.googleapis.com requires the use of a proxy. Format must be in + * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol * supported by the proxy. This will direct the connect agent's outbound * traffic through a HTTP(S) proxy. */ // const proxy = 'Buffer.from('string')' /** - * Optional. The Connect agent version to use. Defaults to the most current version. + * Optional. The Connect agent version to use. Defaults to the most current + * version. */ // const version = 'abc123' /** diff --git a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_memberships.js b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_memberships.js index 1dc36bd8135..cde7e9d0e3f 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_memberships.js +++ b/packages/google-cloud-gkehub/samples/generated/v1/gke_hub.list_memberships.js @@ -29,14 +29,15 @@ function main(parent) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The parent (project and location) where the Memberships will be listed. - * Specified in the format `projects/* /locations/*`. + * 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. */ // 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. + * 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 /** @@ -46,8 +47,8 @@ function main(parent) { */ // const pageToken = 'abc123' /** - * Optional. Lists Memberships that match the filter expression, following the syntax - * outlined in https://google.aip.dev/160. + * 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" 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 f28452467e7..62c080c6a53 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 @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "3.3.0", + "version": "3.3.2", "language": "TYPESCRIPT", "apis": [ { @@ -22,7 +22,7 @@ "segments": [ { "start": 25, - "end": 87, + "end": 88, "type": "FULL" } ], @@ -318,7 +318,7 @@ "segments": [ { "start": 25, - "end": 69, + "end": 75, "type": "FULL" } ], @@ -334,6 +334,10 @@ { "name": "request_id", "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" } ], "resultType": ".google.longrunning.Operation", @@ -514,7 +518,7 @@ "segments": [ { "start": 25, - "end": 87, + "end": 89, "type": "FULL" } ], diff --git a/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata.google.cloud.gkehub.v1alpha.json b/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata.google.cloud.gkehub.v1alpha.json index 11fede053ec..674bdef8e59 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata.google.cloud.gkehub.v1alpha.json +++ b/packages/google-cloud-gkehub/samples/generated/v1alpha/snippet_metadata.google.cloud.gkehub.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "3.3.0", + "version": "3.3.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata.google.cloud.gkehub.v1alpha2.json b/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata.google.cloud.gkehub.v1alpha2.json index 001758fd8ed..a1f23871a4c 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata.google.cloud.gkehub.v1alpha2.json +++ b/packages/google-cloud-gkehub/samples/generated/v1alpha2/snippet_metadata.google.cloud.gkehub.v1alpha2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "3.3.0", + "version": "3.3.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata.google.cloud.gkehub.v1beta.json b/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata.google.cloud.gkehub.v1beta.json index 75072722bb3..061fc684b0c 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata.google.cloud.gkehub.v1beta.json +++ b/packages/google-cloud-gkehub/samples/generated/v1beta/snippet_metadata.google.cloud.gkehub.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "3.3.0", + "version": "3.3.2", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata.google.cloud.gkehub.v1beta1.json b/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata.google.cloud.gkehub.v1beta1.json index ccb12ad6c83..0f4fb7a9785 100644 --- a/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata.google.cloud.gkehub.v1beta1.json +++ b/packages/google-cloud-gkehub/samples/generated/v1beta1/snippet_metadata.google.cloud.gkehub.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-gkehub", - "version": "3.3.0", + "version": "3.3.2", "language": "TYPESCRIPT", "apis": [ { 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 e06e1cfe9c0..7f1f5df93c8 100644 --- a/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts +++ b/packages/google-cloud-gkehub/src/v1/gke_hub_client.ts @@ -49,7 +49,10 @@ const version = require('../../../package.json').version; * * {@link google.cloud.gkehub.v1.Membership|Membership} * * {@link google.cloud.gkehub.v1.Feature|Feature} * - * GKE Hub is currently only available in the global region. + * GKE Hub is currently available in the global region and all regions in + * https://cloud.google.com/compute/docs/regions-zones. Feature is only + * available in global region while membership is global region and all the + * regions. * * **Membership management may be non-trivial:** it is recommended to use one * of the Google-provided client libraries or tools where possible when working @@ -692,22 +695,24 @@ export class GkeHubClient { * @param {Object} request * The request object that will be sent. * @param {string} request.name - * Required. The Membership resource name the Agent will associate with, in the format - * `projects/* /locations/* /memberships/*`. + * Required. The Membership resource name the Agent will associate with, in + * the format `projects/* /locations/* /memberships/*`. * @param {string} [request.namespace] - * Optional. Namespace for GKE Connect agent resources. Defaults to `gke-connect`. + * Optional. Namespace for GKE Connect agent resources. Defaults to + * `gke-connect`. * * The Connect Agent is authorized automatically when run in the default * namespace. Otherwise, explicit authorization must be granted with an * additional IAM binding. * @param {Buffer} [request.proxy] - * Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com - * requires the use of a proxy. Format must be in the form - * `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol + * Optional. URI of a proxy if connectivity from the agent to + * gkeconnect.googleapis.com requires the use of a proxy. Format must be in + * the form `http(s)://{proxy_address}`, depending on the HTTP/HTTPS protocol * supported by the proxy. This will direct the connect agent's outbound * traffic through a HTTP(S) proxy. * @param {string} [request.version] - * Optional. The Connect agent version to use. Defaults to the most current version. + * Optional. The Connect agent version to use. Defaults to the most current + * version. * @param {boolean} [request.isUpgrade] * Optional. If true, generate the resources for upgrade only. Some resources * generated only for installation (e.g. secrets) will be excluded. @@ -815,11 +820,11 @@ export class GkeHubClient { * @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/*`. + * 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: + * 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 `-` @@ -1157,6 +1162,10 @@ export class GkeHubClient { * * 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. @@ -1779,19 +1788,20 @@ export class GkeHubClient { * @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/*`. + * 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. + * 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. + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. * * Examples: * @@ -1900,19 +1910,20 @@ export class GkeHubClient { * @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/*`. + * 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. + * 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. + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. * * Examples: * @@ -1975,19 +1986,20 @@ export class GkeHubClient { * @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/*`. + * 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. + * 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. + * Optional. Lists Memberships that match the filter expression, following the + * syntax outlined in https://google.aip.dev/160. * * Examples: *