From 86d21e8a63449bbf04e26612f44432e33043cc03 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 15:36:12 +0000 Subject: [PATCH] feat: add Autoscaling API (#963) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 410080804 Source-Link: https://github.com/googleapis/googleapis/commit/0fd6a324383fdd1220c9a937b2eef37f53764664 Source-Link: https://github.com/googleapis/googleapis-gen/commit/788247b7cbda5b05f2ac4f6c13f10ff265e183f0 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNzg4MjQ3YjdjYmRhNWIwNWYyYWM0ZjZjMTNmMTBmZjI2NWUxODNmMCJ9 --- .../admin/v2/bigtable_instance_admin.proto | 64 +- protos/google/bigtable/admin/v2/common.proto | 3 +- .../google/bigtable/admin/v2/instance.proto | 43 +- protos/protos.d.ts | 600 +++ protos/protos.js | 3678 +++++++++++------ protos/protos.json | 130 +- ...e_instance_admin.partial_update_cluster.js | 59 + .../bigtable_instance_admin.update_cluster.js | 11 +- src/v2/bigtable_instance_admin_client.ts | 185 +- ...bigtable_instance_admin_client_config.json | 5 + src/v2/gapic_metadata.json | 10 + test/gapic_bigtable_instance_admin_v2.ts | 204 + 12 files changed, 3816 insertions(+), 1176 deletions(-) create mode 100644 samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js diff --git a/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto b/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto index 63fdd8ea4..76dbd914f 100644 --- a/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto +++ b/protos/google/bigtable/admin/v2/bigtable_instance_admin.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -51,6 +51,12 @@ service BigtableInstanceAdmin { "https://www.googleapis.com/auth/cloud-platform.read-only"; // Create an instance within a project. + // + // Note that exactly one of Cluster.serve_nodes and + // Cluster.cluster_config.cluster_autoscaling_config can be set. If + // serve_nodes is set to non-zero, then the cluster is manually scaled. If + // cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is + // enabled. rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*}/instances" @@ -112,6 +118,12 @@ service BigtableInstanceAdmin { } // Creates a cluster within an instance. + // + // Note that exactly one of Cluster.serve_nodes and + // Cluster.cluster_config.cluster_autoscaling_config can be set. If + // serve_nodes is set to non-zero, then the cluster is manually scaled. If + // cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is + // enabled. rpc CreateCluster(CreateClusterRequest) returns (google.longrunning.Operation) { option (google.api.http) = { post: "/v2/{parent=projects/*/instances/*}/clusters" @@ -141,6 +153,10 @@ service BigtableInstanceAdmin { } // Updates a cluster within an instance. + // + // Note that UpdateCluster does not support updating + // cluster_config.cluster_autoscaling_config. In order to update it, you + // must use PartialUpdateCluster. rpc UpdateCluster(Cluster) returns (google.longrunning.Operation) { option (google.api.http) = { put: "/v2/{name=projects/*/instances/*/clusters/*}" @@ -152,6 +168,30 @@ service BigtableInstanceAdmin { }; } + // Partially updates a cluster within a project. This method is the preferred + // way to update a Cluster. + // + // To enable and update autoscaling, set + // cluster_config.cluster_autoscaling_config. When autoscaling is enabled, + // serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it + // are ignored. Note that an update cannot simultaneously set serve_nodes to + // non-zero and cluster_config.cluster_autoscaling_config to non-empty, and + // also specify both in the update_mask. + // + // To disable autoscaling, clear cluster_config.cluster_autoscaling_config, + // and explicitly set a serve_node count via the update_mask. + rpc PartialUpdateCluster(PartialUpdateClusterRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v2/{cluster.name=projects/*/instances/*/clusters/*}" + body: "cluster" + }; + option (google.api.method_signature) = "cluster,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Cluster" + metadata_type: "PartialUpdateClusterMetadata" + }; + } + // Deletes a cluster from an instance. rpc DeleteCluster(DeleteClusterRequest) returns (google.protobuf.Empty) { option (google.api.http) = { @@ -457,6 +497,28 @@ message UpdateClusterMetadata { google.protobuf.Timestamp finish_time = 3; } +// The metadata for the Operation returned by PartialUpdateCluster. +message PartialUpdateClusterMetadata { + // The time at which the original request was received. + google.protobuf.Timestamp request_time = 1; + + // The time at which the operation failed or was completed successfully. + google.protobuf.Timestamp finish_time = 2; + + // The original request for PartialUpdateCluster. + PartialUpdateClusterRequest original_request = 3; +} + +// Request message for BigtableInstanceAdmin.PartialUpdateCluster. +message PartialUpdateClusterRequest { + // Required. The Cluster which contains the partial updates to be applied, subject to + // the update_mask. + Cluster cluster = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The subset of Cluster fields which should be replaced. + google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; +} + // Request message for BigtableInstanceAdmin.CreateAppProfile. message CreateAppProfileRequest { // Required. The unique name of the instance in which to create the new app profile. diff --git a/protos/google/bigtable/admin/v2/common.proto b/protos/google/bigtable/admin/v2/common.proto index 17c69d469..1d7782e67 100644 --- a/protos/google/bigtable/admin/v2/common.proto +++ b/protos/google/bigtable/admin/v2/common.proto @@ -1,4 +1,4 @@ -// Copyright 2020 Google LLC +// Copyright 2021 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -17,6 +17,7 @@ syntax = "proto3"; package google.bigtable.admin.v2; import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; option csharp_namespace = "Google.Cloud.Bigtable.Admin.V2"; option go_package = "google.golang.org/genproto/googleapis/bigtable/admin/v2;admin"; diff --git a/protos/google/bigtable/admin/v2/instance.proto b/protos/google/bigtable/admin/v2/instance.proto index d946b5c68..2e61b0858 100644 --- a/protos/google/bigtable/admin/v2/instance.proto +++ b/protos/google/bigtable/admin/v2/instance.proto @@ -114,6 +114,23 @@ message Instance { google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// The Autoscaling targets for a Cluster. These determine the recommended nodes. +message AutoscalingTargets { + // The cpu utilization that the Autoscaler should be trying to achieve. + // This number is on a scale from 0 (no utilization) to + // 100 (total utilization). + int32 cpu_utilization_percent = 2; +} + +// Limits for the number of nodes a Cluster can autoscale up/down to. +message AutoscalingLimits { + // Required. Minimum number of nodes to scale down to. + int32 min_serve_nodes = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Maximum number of nodes to scale up to. + int32 max_serve_nodes = 2 [(google.api.field_behavior) = REQUIRED]; +} + // A resizable group of nodes in a particular cloud location, capable // of serving all [Tables][google.bigtable.admin.v2.Table] in the parent // [Instance][google.bigtable.admin.v2.Instance]. @@ -123,6 +140,21 @@ message Cluster { pattern: "projects/{project}/instances/{instance}/clusters/{cluster}" }; + // Autoscaling config for a cluster. + message ClusterAutoscalingConfig { + // Required. Autoscaling limits for this cluster. + AutoscalingLimits autoscaling_limits = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Autoscaling targets for this cluster. + AutoscalingTargets autoscaling_targets = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration for a cluster. + message ClusterConfig { + // Autoscaling configuration for this cluster. + ClusterAutoscalingConfig cluster_autoscaling_config = 1; + } + // Cloud Key Management Service (Cloud KMS) settings for a CMEK-protected // cluster. message EncryptionConfig { @@ -180,9 +212,14 @@ message Cluster { // The current state of the cluster. State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Required. The number of nodes allocated to this cluster. More nodes enable - // higher throughput and more consistent performance. - int32 serve_nodes = 4 [(google.api.field_behavior) = REQUIRED]; + // The number of nodes allocated to this cluster. More nodes enable higher + // throughput and more consistent performance. + int32 serve_nodes = 4; + + oneof config { + // Configuration for this cluster. + ClusterConfig cluster_config = 7; + } // (`CreationOnly`) // The type of storage used by this cluster to serve its diff --git a/protos/protos.d.ts b/protos/protos.d.ts index b68a96d46..97794d96e 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -186,6 +186,20 @@ export namespace google { */ public updateCluster(request: google.bigtable.admin.v2.ICluster): Promise; + /** + * Calls PartialUpdateCluster. + * @param request PartialUpdateClusterRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public partialUpdateCluster(request: google.bigtable.admin.v2.IPartialUpdateClusterRequest, callback: google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateClusterCallback): void; + + /** + * Calls PartialUpdateCluster. + * @param request PartialUpdateClusterRequest message or plain object + * @returns Promise + */ + public partialUpdateCluster(request: google.bigtable.admin.v2.IPartialUpdateClusterRequest): Promise; + /** * Calls DeleteCluster. * @param request DeleteClusterRequest message or plain object @@ -385,6 +399,13 @@ export namespace google { */ type UpdateClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin#partialUpdateCluster}. + * @param error Error, if any + * @param [response] Operation + */ + type PartialUpdateClusterCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin#deleteCluster}. * @param error Error, if any @@ -1919,6 +1940,204 @@ export namespace google { public toJSON(): { [k: string]: any }; } + /** Properties of a PartialUpdateClusterMetadata. */ + interface IPartialUpdateClusterMetadata { + + /** PartialUpdateClusterMetadata requestTime */ + requestTime?: (google.protobuf.ITimestamp|null); + + /** PartialUpdateClusterMetadata finishTime */ + finishTime?: (google.protobuf.ITimestamp|null); + + /** PartialUpdateClusterMetadata originalRequest */ + originalRequest?: (google.bigtable.admin.v2.IPartialUpdateClusterRequest|null); + } + + /** Represents a PartialUpdateClusterMetadata. */ + class PartialUpdateClusterMetadata implements IPartialUpdateClusterMetadata { + + /** + * Constructs a new PartialUpdateClusterMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IPartialUpdateClusterMetadata); + + /** PartialUpdateClusterMetadata requestTime. */ + public requestTime?: (google.protobuf.ITimestamp|null); + + /** PartialUpdateClusterMetadata finishTime. */ + public finishTime?: (google.protobuf.ITimestamp|null); + + /** PartialUpdateClusterMetadata originalRequest. */ + public originalRequest?: (google.bigtable.admin.v2.IPartialUpdateClusterRequest|null); + + /** + * Creates a new PartialUpdateClusterMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns PartialUpdateClusterMetadata instance + */ + public static create(properties?: google.bigtable.admin.v2.IPartialUpdateClusterMetadata): google.bigtable.admin.v2.PartialUpdateClusterMetadata; + + /** + * Encodes the specified PartialUpdateClusterMetadata message. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterMetadata.verify|verify} messages. + * @param message PartialUpdateClusterMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IPartialUpdateClusterMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartialUpdateClusterMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterMetadata.verify|verify} messages. + * @param message PartialUpdateClusterMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IPartialUpdateClusterMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartialUpdateClusterMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartialUpdateClusterMetadata + * @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.bigtable.admin.v2.PartialUpdateClusterMetadata; + + /** + * Decodes a PartialUpdateClusterMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartialUpdateClusterMetadata + * @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.bigtable.admin.v2.PartialUpdateClusterMetadata; + + /** + * Verifies a PartialUpdateClusterMetadata 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 PartialUpdateClusterMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartialUpdateClusterMetadata + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.PartialUpdateClusterMetadata; + + /** + * Creates a plain object from a PartialUpdateClusterMetadata message. Also converts values to other types if specified. + * @param message PartialUpdateClusterMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.PartialUpdateClusterMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartialUpdateClusterMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a PartialUpdateClusterRequest. */ + interface IPartialUpdateClusterRequest { + + /** PartialUpdateClusterRequest cluster */ + cluster?: (google.bigtable.admin.v2.ICluster|null); + + /** PartialUpdateClusterRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a PartialUpdateClusterRequest. */ + class PartialUpdateClusterRequest implements IPartialUpdateClusterRequest { + + /** + * Constructs a new PartialUpdateClusterRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IPartialUpdateClusterRequest); + + /** PartialUpdateClusterRequest cluster. */ + public cluster?: (google.bigtable.admin.v2.ICluster|null); + + /** PartialUpdateClusterRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new PartialUpdateClusterRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PartialUpdateClusterRequest instance + */ + public static create(properties?: google.bigtable.admin.v2.IPartialUpdateClusterRequest): google.bigtable.admin.v2.PartialUpdateClusterRequest; + + /** + * Encodes the specified PartialUpdateClusterRequest message. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterRequest.verify|verify} messages. + * @param message PartialUpdateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IPartialUpdateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartialUpdateClusterRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterRequest.verify|verify} messages. + * @param message PartialUpdateClusterRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IPartialUpdateClusterRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartialUpdateClusterRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartialUpdateClusterRequest + * @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.bigtable.admin.v2.PartialUpdateClusterRequest; + + /** + * Decodes a PartialUpdateClusterRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartialUpdateClusterRequest + * @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.bigtable.admin.v2.PartialUpdateClusterRequest; + + /** + * Verifies a PartialUpdateClusterRequest 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 PartialUpdateClusterRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartialUpdateClusterRequest + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.PartialUpdateClusterRequest; + + /** + * Creates a plain object from a PartialUpdateClusterRequest message. Also converts values to other types if specified. + * @param message PartialUpdateClusterRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.PartialUpdateClusterRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartialUpdateClusterRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a CreateAppProfileRequest. */ interface ICreateAppProfileRequest { @@ -2740,6 +2959,192 @@ export namespace google { } } + /** Properties of an AutoscalingTargets. */ + interface IAutoscalingTargets { + + /** AutoscalingTargets cpuUtilizationPercent */ + cpuUtilizationPercent?: (number|null); + } + + /** Represents an AutoscalingTargets. */ + class AutoscalingTargets implements IAutoscalingTargets { + + /** + * Constructs a new AutoscalingTargets. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IAutoscalingTargets); + + /** AutoscalingTargets cpuUtilizationPercent. */ + public cpuUtilizationPercent: number; + + /** + * Creates a new AutoscalingTargets instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoscalingTargets instance + */ + public static create(properties?: google.bigtable.admin.v2.IAutoscalingTargets): google.bigtable.admin.v2.AutoscalingTargets; + + /** + * Encodes the specified AutoscalingTargets message. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingTargets.verify|verify} messages. + * @param message AutoscalingTargets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IAutoscalingTargets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoscalingTargets message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingTargets.verify|verify} messages. + * @param message AutoscalingTargets message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IAutoscalingTargets, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoscalingTargets message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoscalingTargets + * @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.bigtable.admin.v2.AutoscalingTargets; + + /** + * Decodes an AutoscalingTargets message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoscalingTargets + * @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.bigtable.admin.v2.AutoscalingTargets; + + /** + * Verifies an AutoscalingTargets 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 AutoscalingTargets message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoscalingTargets + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AutoscalingTargets; + + /** + * Creates a plain object from an AutoscalingTargets message. Also converts values to other types if specified. + * @param message AutoscalingTargets + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AutoscalingTargets, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoscalingTargets to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of an AutoscalingLimits. */ + interface IAutoscalingLimits { + + /** AutoscalingLimits minServeNodes */ + minServeNodes?: (number|null); + + /** AutoscalingLimits maxServeNodes */ + maxServeNodes?: (number|null); + } + + /** Represents an AutoscalingLimits. */ + class AutoscalingLimits implements IAutoscalingLimits { + + /** + * Constructs a new AutoscalingLimits. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.IAutoscalingLimits); + + /** AutoscalingLimits minServeNodes. */ + public minServeNodes: number; + + /** AutoscalingLimits maxServeNodes. */ + public maxServeNodes: number; + + /** + * Creates a new AutoscalingLimits instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoscalingLimits instance + */ + public static create(properties?: google.bigtable.admin.v2.IAutoscalingLimits): google.bigtable.admin.v2.AutoscalingLimits; + + /** + * Encodes the specified AutoscalingLimits message. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingLimits.verify|verify} messages. + * @param message AutoscalingLimits message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.IAutoscalingLimits, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoscalingLimits message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingLimits.verify|verify} messages. + * @param message AutoscalingLimits message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.IAutoscalingLimits, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoscalingLimits message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoscalingLimits + * @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.bigtable.admin.v2.AutoscalingLimits; + + /** + * Decodes an AutoscalingLimits message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoscalingLimits + * @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.bigtable.admin.v2.AutoscalingLimits; + + /** + * Verifies an AutoscalingLimits 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 AutoscalingLimits message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoscalingLimits + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.AutoscalingLimits; + + /** + * Creates a plain object from an AutoscalingLimits message. Also converts values to other types if specified. + * @param message AutoscalingLimits + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.AutoscalingLimits, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoscalingLimits to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of a Cluster. */ interface ICluster { @@ -2755,6 +3160,9 @@ export namespace google { /** Cluster serveNodes */ serveNodes?: (number|null); + /** Cluster clusterConfig */ + clusterConfig?: (google.bigtable.admin.v2.Cluster.IClusterConfig|null); + /** Cluster defaultStorageType */ defaultStorageType?: (google.bigtable.admin.v2.StorageType|keyof typeof google.bigtable.admin.v2.StorageType|null); @@ -2783,12 +3191,18 @@ export namespace google { /** Cluster serveNodes. */ public serveNodes: number; + /** Cluster clusterConfig. */ + public clusterConfig?: (google.bigtable.admin.v2.Cluster.IClusterConfig|null); + /** Cluster defaultStorageType. */ public defaultStorageType: (google.bigtable.admin.v2.StorageType|keyof typeof google.bigtable.admin.v2.StorageType); /** Cluster encryptionConfig. */ public encryptionConfig?: (google.bigtable.admin.v2.Cluster.IEncryptionConfig|null); + /** Cluster config. */ + public config?: "clusterConfig"; + /** * Creates a new Cluster instance using the specified properties. * @param [properties] Properties to set @@ -2862,6 +3276,192 @@ export namespace google { namespace Cluster { + /** Properties of a ClusterAutoscalingConfig. */ + interface IClusterAutoscalingConfig { + + /** ClusterAutoscalingConfig autoscalingLimits */ + autoscalingLimits?: (google.bigtable.admin.v2.IAutoscalingLimits|null); + + /** ClusterAutoscalingConfig autoscalingTargets */ + autoscalingTargets?: (google.bigtable.admin.v2.IAutoscalingTargets|null); + } + + /** Represents a ClusterAutoscalingConfig. */ + class ClusterAutoscalingConfig implements IClusterAutoscalingConfig { + + /** + * Constructs a new ClusterAutoscalingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig); + + /** ClusterAutoscalingConfig autoscalingLimits. */ + public autoscalingLimits?: (google.bigtable.admin.v2.IAutoscalingLimits|null); + + /** ClusterAutoscalingConfig autoscalingTargets. */ + public autoscalingTargets?: (google.bigtable.admin.v2.IAutoscalingTargets|null); + + /** + * Creates a new ClusterAutoscalingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterAutoscalingConfig instance + */ + public static create(properties?: google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig): google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig; + + /** + * Encodes the specified ClusterAutoscalingConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.verify|verify} messages. + * @param message ClusterAutoscalingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterAutoscalingConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.verify|verify} messages. + * @param message ClusterAutoscalingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterAutoscalingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterAutoscalingConfig + * @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.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig; + + /** + * Decodes a ClusterAutoscalingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterAutoscalingConfig + * @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.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig; + + /** + * Verifies a ClusterAutoscalingConfig 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 ClusterAutoscalingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterAutoscalingConfig + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig; + + /** + * Creates a plain object from a ClusterAutoscalingConfig message. Also converts values to other types if specified. + * @param message ClusterAutoscalingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterAutoscalingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + + /** Properties of a ClusterConfig. */ + interface IClusterConfig { + + /** ClusterConfig clusterAutoscalingConfig */ + clusterAutoscalingConfig?: (google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig|null); + } + + /** Represents a ClusterConfig. */ + class ClusterConfig implements IClusterConfig { + + /** + * Constructs a new ClusterConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.bigtable.admin.v2.Cluster.IClusterConfig); + + /** ClusterConfig clusterAutoscalingConfig. */ + public clusterAutoscalingConfig?: (google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig|null); + + /** + * Creates a new ClusterConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ClusterConfig instance + */ + public static create(properties?: google.bigtable.admin.v2.Cluster.IClusterConfig): google.bigtable.admin.v2.Cluster.ClusterConfig; + + /** + * Encodes the specified ClusterConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterConfig.verify|verify} messages. + * @param message ClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.bigtable.admin.v2.Cluster.IClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClusterConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterConfig.verify|verify} messages. + * @param message ClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.bigtable.admin.v2.Cluster.IClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClusterConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClusterConfig + * @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.bigtable.admin.v2.Cluster.ClusterConfig; + + /** + * Decodes a ClusterConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClusterConfig + * @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.bigtable.admin.v2.Cluster.ClusterConfig; + + /** + * Verifies a ClusterConfig 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 ClusterConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClusterConfig + */ + public static fromObject(object: { [k: string]: any }): google.bigtable.admin.v2.Cluster.ClusterConfig; + + /** + * Creates a plain object from a ClusterConfig message. Also converts values to other types if specified. + * @param message ClusterConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.bigtable.admin.v2.Cluster.ClusterConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClusterConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + } + /** Properties of an EncryptionConfig. */ interface IEncryptionConfig { diff --git a/protos/protos.js b/protos/protos.js index 23bf36798..62eda399c 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -428,6 +428,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin#partialUpdateCluster}. + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @typedef PartialUpdateClusterCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls PartialUpdateCluster. + * @function partialUpdateCluster + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IPartialUpdateClusterRequest} request PartialUpdateClusterRequest message or plain object + * @param {google.bigtable.admin.v2.BigtableInstanceAdmin.PartialUpdateClusterCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(BigtableInstanceAdmin.prototype.partialUpdateCluster = function partialUpdateCluster(request, callback) { + return this.rpcCall(partialUpdateCluster, $root.google.bigtable.admin.v2.PartialUpdateClusterRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "PartialUpdateCluster" }); + + /** + * Calls PartialUpdateCluster. + * @function partialUpdateCluster + * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin + * @instance + * @param {google.bigtable.admin.v2.IPartialUpdateClusterRequest} request PartialUpdateClusterRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.bigtable.admin.v2.BigtableInstanceAdmin#deleteCluster}. * @memberof google.bigtable.admin.v2.BigtableInstanceAdmin @@ -4183,27 +4216,26 @@ return UpdateClusterMetadata; })(); - v2.CreateAppProfileRequest = (function() { + v2.PartialUpdateClusterMetadata = (function() { /** - * Properties of a CreateAppProfileRequest. + * Properties of a PartialUpdateClusterMetadata. * @memberof google.bigtable.admin.v2 - * @interface ICreateAppProfileRequest - * @property {string|null} [parent] CreateAppProfileRequest parent - * @property {string|null} [appProfileId] CreateAppProfileRequest appProfileId - * @property {google.bigtable.admin.v2.IAppProfile|null} [appProfile] CreateAppProfileRequest appProfile - * @property {boolean|null} [ignoreWarnings] CreateAppProfileRequest ignoreWarnings + * @interface IPartialUpdateClusterMetadata + * @property {google.protobuf.ITimestamp|null} [requestTime] PartialUpdateClusterMetadata requestTime + * @property {google.protobuf.ITimestamp|null} [finishTime] PartialUpdateClusterMetadata finishTime + * @property {google.bigtable.admin.v2.IPartialUpdateClusterRequest|null} [originalRequest] PartialUpdateClusterMetadata originalRequest */ /** - * Constructs a new CreateAppProfileRequest. + * Constructs a new PartialUpdateClusterMetadata. * @memberof google.bigtable.admin.v2 - * @classdesc Represents a CreateAppProfileRequest. - * @implements ICreateAppProfileRequest + * @classdesc Represents a PartialUpdateClusterMetadata. + * @implements IPartialUpdateClusterMetadata * @constructor - * @param {google.bigtable.admin.v2.ICreateAppProfileRequest=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IPartialUpdateClusterMetadata=} [properties] Properties to set */ - function CreateAppProfileRequest(properties) { + function PartialUpdateClusterMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4211,114 +4243,101 @@ } /** - * CreateAppProfileRequest parent. - * @member {string} parent - * @memberof google.bigtable.admin.v2.CreateAppProfileRequest - * @instance - */ - CreateAppProfileRequest.prototype.parent = ""; - - /** - * CreateAppProfileRequest appProfileId. - * @member {string} appProfileId - * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * PartialUpdateClusterMetadata requestTime. + * @member {google.protobuf.ITimestamp|null|undefined} requestTime + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata * @instance */ - CreateAppProfileRequest.prototype.appProfileId = ""; + PartialUpdateClusterMetadata.prototype.requestTime = null; /** - * CreateAppProfileRequest appProfile. - * @member {google.bigtable.admin.v2.IAppProfile|null|undefined} appProfile - * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * PartialUpdateClusterMetadata finishTime. + * @member {google.protobuf.ITimestamp|null|undefined} finishTime + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata * @instance */ - CreateAppProfileRequest.prototype.appProfile = null; + PartialUpdateClusterMetadata.prototype.finishTime = null; /** - * CreateAppProfileRequest ignoreWarnings. - * @member {boolean} ignoreWarnings - * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * PartialUpdateClusterMetadata originalRequest. + * @member {google.bigtable.admin.v2.IPartialUpdateClusterRequest|null|undefined} originalRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata * @instance */ - CreateAppProfileRequest.prototype.ignoreWarnings = false; + PartialUpdateClusterMetadata.prototype.originalRequest = null; /** - * Creates a new CreateAppProfileRequest instance using the specified properties. + * Creates a new PartialUpdateClusterMetadata instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata * @static - * @param {google.bigtable.admin.v2.ICreateAppProfileRequest=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.CreateAppProfileRequest} CreateAppProfileRequest instance + * @param {google.bigtable.admin.v2.IPartialUpdateClusterMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.PartialUpdateClusterMetadata} PartialUpdateClusterMetadata instance */ - CreateAppProfileRequest.create = function create(properties) { - return new CreateAppProfileRequest(properties); + PartialUpdateClusterMetadata.create = function create(properties) { + return new PartialUpdateClusterMetadata(properties); }; /** - * Encodes the specified CreateAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateAppProfileRequest.verify|verify} messages. + * Encodes the specified PartialUpdateClusterMetadata message. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterMetadata.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata * @static - * @param {google.bigtable.admin.v2.ICreateAppProfileRequest} message CreateAppProfileRequest message or plain object to encode + * @param {google.bigtable.admin.v2.IPartialUpdateClusterMetadata} message PartialUpdateClusterMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAppProfileRequest.encode = function encode(message, writer) { + PartialUpdateClusterMetadata.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.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); - if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) - $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfile, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.ignoreWarnings); + if (message.requestTime != null && Object.hasOwnProperty.call(message, "requestTime")) + $root.google.protobuf.Timestamp.encode(message.requestTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.finishTime != null && Object.hasOwnProperty.call(message, "finishTime")) + $root.google.protobuf.Timestamp.encode(message.finishTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.originalRequest != null && Object.hasOwnProperty.call(message, "originalRequest")) + $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.encode(message.originalRequest, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateAppProfileRequest.verify|verify} messages. + * Encodes the specified PartialUpdateClusterMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata * @static - * @param {google.bigtable.admin.v2.ICreateAppProfileRequest} message CreateAppProfileRequest message or plain object to encode + * @param {google.bigtable.admin.v2.IPartialUpdateClusterMetadata} message PartialUpdateClusterMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + PartialUpdateClusterMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateAppProfileRequest message from the specified reader or buffer. + * Decodes a PartialUpdateClusterMetadata message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.CreateAppProfileRequest} CreateAppProfileRequest + * @returns {google.bigtable.admin.v2.PartialUpdateClusterMetadata} PartialUpdateClusterMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAppProfileRequest.decode = function decode(reader, length) { + PartialUpdateClusterMetadata.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.bigtable.admin.v2.CreateAppProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.PartialUpdateClusterMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.parent = reader.string(); + message.requestTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 2: - message.appProfileId = reader.string(); + message.finishTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; case 3: - message.appProfile = $root.google.bigtable.admin.v2.AppProfile.decode(reader, reader.uint32()); - break; - case 4: - message.ignoreWarnings = reader.bool(); + message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4329,137 +4348,140 @@ }; /** - * Decodes a CreateAppProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a PartialUpdateClusterMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.CreateAppProfileRequest} CreateAppProfileRequest + * @returns {google.bigtable.admin.v2.PartialUpdateClusterMetadata} PartialUpdateClusterMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAppProfileRequest.decodeDelimited = function decodeDelimited(reader) { + PartialUpdateClusterMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateAppProfileRequest message. + * Verifies a PartialUpdateClusterMetadata message. * @function verify - * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateAppProfileRequest.verify = function verify(message) { + PartialUpdateClusterMetadata.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.appProfileId != null && message.hasOwnProperty("appProfileId")) - if (!$util.isString(message.appProfileId)) - return "appProfileId: string expected"; - if (message.appProfile != null && message.hasOwnProperty("appProfile")) { - var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfile); + if (message.requestTime != null && message.hasOwnProperty("requestTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.requestTime); if (error) - return "appProfile." + error; + return "requestTime." + error; + } + if (message.finishTime != null && message.hasOwnProperty("finishTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.finishTime); + if (error) + return "finishTime." + error; + } + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) { + var error = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.verify(message.originalRequest); + if (error) + return "originalRequest." + error; } - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) - if (typeof message.ignoreWarnings !== "boolean") - return "ignoreWarnings: boolean expected"; return null; }; /** - * Creates a CreateAppProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PartialUpdateClusterMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.CreateAppProfileRequest} CreateAppProfileRequest + * @returns {google.bigtable.admin.v2.PartialUpdateClusterMetadata} PartialUpdateClusterMetadata */ - CreateAppProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.CreateAppProfileRequest) + PartialUpdateClusterMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateClusterMetadata) return object; - var message = new $root.google.bigtable.admin.v2.CreateAppProfileRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.appProfileId != null) - message.appProfileId = String(object.appProfileId); - if (object.appProfile != null) { - if (typeof object.appProfile !== "object") - throw TypeError(".google.bigtable.admin.v2.CreateAppProfileRequest.appProfile: object expected"); - message.appProfile = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfile); + var message = new $root.google.bigtable.admin.v2.PartialUpdateClusterMetadata(); + if (object.requestTime != null) { + if (typeof object.requestTime !== "object") + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.requestTime: object expected"); + message.requestTime = $root.google.protobuf.Timestamp.fromObject(object.requestTime); + } + if (object.finishTime != null) { + if (typeof object.finishTime !== "object") + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.finishTime: object expected"); + message.finishTime = $root.google.protobuf.Timestamp.fromObject(object.finishTime); + } + if (object.originalRequest != null) { + if (typeof object.originalRequest !== "object") + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterMetadata.originalRequest: object expected"); + message.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.fromObject(object.originalRequest); } - if (object.ignoreWarnings != null) - message.ignoreWarnings = Boolean(object.ignoreWarnings); return message; }; /** - * Creates a plain object from a CreateAppProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from a PartialUpdateClusterMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata * @static - * @param {google.bigtable.admin.v2.CreateAppProfileRequest} message CreateAppProfileRequest + * @param {google.bigtable.admin.v2.PartialUpdateClusterMetadata} message PartialUpdateClusterMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateAppProfileRequest.toObject = function toObject(message, options) { + PartialUpdateClusterMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.appProfileId = ""; - object.appProfile = null; - object.ignoreWarnings = false; + object.requestTime = null; + object.finishTime = null; + object.originalRequest = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) - object.appProfileId = message.appProfileId; - if (message.appProfile != null && message.hasOwnProperty("appProfile")) - object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options); - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) - object.ignoreWarnings = message.ignoreWarnings; + if (message.requestTime != null && message.hasOwnProperty("requestTime")) + object.requestTime = $root.google.protobuf.Timestamp.toObject(message.requestTime, options); + if (message.finishTime != null && message.hasOwnProperty("finishTime")) + object.finishTime = $root.google.protobuf.Timestamp.toObject(message.finishTime, options); + if (message.originalRequest != null && message.hasOwnProperty("originalRequest")) + object.originalRequest = $root.google.bigtable.admin.v2.PartialUpdateClusterRequest.toObject(message.originalRequest, options); return object; }; /** - * Converts this CreateAppProfileRequest to JSON. + * Converts this PartialUpdateClusterMetadata to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterMetadata * @instance * @returns {Object.} JSON object */ - CreateAppProfileRequest.prototype.toJSON = function toJSON() { + PartialUpdateClusterMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return CreateAppProfileRequest; + return PartialUpdateClusterMetadata; })(); - v2.GetAppProfileRequest = (function() { + v2.PartialUpdateClusterRequest = (function() { /** - * Properties of a GetAppProfileRequest. + * Properties of a PartialUpdateClusterRequest. * @memberof google.bigtable.admin.v2 - * @interface IGetAppProfileRequest - * @property {string|null} [name] GetAppProfileRequest name + * @interface IPartialUpdateClusterRequest + * @property {google.bigtable.admin.v2.ICluster|null} [cluster] PartialUpdateClusterRequest cluster + * @property {google.protobuf.IFieldMask|null} [updateMask] PartialUpdateClusterRequest updateMask */ /** - * Constructs a new GetAppProfileRequest. + * Constructs a new PartialUpdateClusterRequest. * @memberof google.bigtable.admin.v2 - * @classdesc Represents a GetAppProfileRequest. - * @implements IGetAppProfileRequest + * @classdesc Represents a PartialUpdateClusterRequest. + * @implements IPartialUpdateClusterRequest * @constructor - * @param {google.bigtable.admin.v2.IGetAppProfileRequest=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IPartialUpdateClusterRequest=} [properties] Properties to set */ - function GetAppProfileRequest(properties) { + function PartialUpdateClusterRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4467,75 +4489,88 @@ } /** - * GetAppProfileRequest name. - * @member {string} name - * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * PartialUpdateClusterRequest cluster. + * @member {google.bigtable.admin.v2.ICluster|null|undefined} cluster + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest * @instance */ - GetAppProfileRequest.prototype.name = ""; + PartialUpdateClusterRequest.prototype.cluster = null; /** - * Creates a new GetAppProfileRequest instance using the specified properties. + * PartialUpdateClusterRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest + * @instance + */ + PartialUpdateClusterRequest.prototype.updateMask = null; + + /** + * Creates a new PartialUpdateClusterRequest instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest * @static - * @param {google.bigtable.admin.v2.IGetAppProfileRequest=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.GetAppProfileRequest} GetAppProfileRequest instance + * @param {google.bigtable.admin.v2.IPartialUpdateClusterRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.PartialUpdateClusterRequest} PartialUpdateClusterRequest instance */ - GetAppProfileRequest.create = function create(properties) { - return new GetAppProfileRequest(properties); + PartialUpdateClusterRequest.create = function create(properties) { + return new PartialUpdateClusterRequest(properties); }; /** - * Encodes the specified GetAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetAppProfileRequest.verify|verify} messages. + * Encodes the specified PartialUpdateClusterRequest message. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest * @static - * @param {google.bigtable.admin.v2.IGetAppProfileRequest} message GetAppProfileRequest message or plain object to encode + * @param {google.bigtable.admin.v2.IPartialUpdateClusterRequest} message PartialUpdateClusterRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAppProfileRequest.encode = function encode(message, writer) { + PartialUpdateClusterRequest.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.cluster != null && Object.hasOwnProperty.call(message, "cluster")) + $root.google.bigtable.admin.v2.Cluster.encode(message.cluster, 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 GetAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetAppProfileRequest.verify|verify} messages. + * Encodes the specified PartialUpdateClusterRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.PartialUpdateClusterRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest * @static - * @param {google.bigtable.admin.v2.IGetAppProfileRequest} message GetAppProfileRequest message or plain object to encode + * @param {google.bigtable.admin.v2.IPartialUpdateClusterRequest} message PartialUpdateClusterRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + PartialUpdateClusterRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetAppProfileRequest message from the specified reader or buffer. + * Decodes a PartialUpdateClusterRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.GetAppProfileRequest} GetAppProfileRequest + * @returns {google.bigtable.admin.v2.PartialUpdateClusterRequest} PartialUpdateClusterRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAppProfileRequest.decode = function decode(reader, length) { + PartialUpdateClusterRequest.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.bigtable.admin.v2.GetAppProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.PartialUpdateClusterRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + message.cluster = $root.google.bigtable.admin.v2.Cluster.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; default: reader.skipType(tag & 7); @@ -4546,109 +4581,129 @@ }; /** - * Decodes a GetAppProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a PartialUpdateClusterRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.GetAppProfileRequest} GetAppProfileRequest + * @returns {google.bigtable.admin.v2.PartialUpdateClusterRequest} PartialUpdateClusterRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAppProfileRequest.decodeDelimited = function decodeDelimited(reader) { + PartialUpdateClusterRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetAppProfileRequest message. + * Verifies a PartialUpdateClusterRequest message. * @function verify - * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetAppProfileRequest.verify = function verify(message) { + PartialUpdateClusterRequest.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.cluster != null && message.hasOwnProperty("cluster")) { + var error = $root.google.bigtable.admin.v2.Cluster.verify(message.cluster); + if (error) + return "cluster." + 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 a GetAppProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PartialUpdateClusterRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.GetAppProfileRequest} GetAppProfileRequest + * @returns {google.bigtable.admin.v2.PartialUpdateClusterRequest} PartialUpdateClusterRequest */ - GetAppProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.GetAppProfileRequest) + PartialUpdateClusterRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.PartialUpdateClusterRequest) return object; - var message = new $root.google.bigtable.admin.v2.GetAppProfileRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; + var message = new $root.google.bigtable.admin.v2.PartialUpdateClusterRequest(); + if (object.cluster != null) { + if (typeof object.cluster !== "object") + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterRequest.cluster: object expected"); + message.cluster = $root.google.bigtable.admin.v2.Cluster.fromObject(object.cluster); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.bigtable.admin.v2.PartialUpdateClusterRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; /** - * Creates a plain object from a GetAppProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from a PartialUpdateClusterRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest * @static - * @param {google.bigtable.admin.v2.GetAppProfileRequest} message GetAppProfileRequest + * @param {google.bigtable.admin.v2.PartialUpdateClusterRequest} message PartialUpdateClusterRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAppProfileRequest.toObject = function toObject(message, options) { + PartialUpdateClusterRequest.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.cluster = null; + object.updateMask = null; + } + if (message.cluster != null && message.hasOwnProperty("cluster")) + object.cluster = $root.google.bigtable.admin.v2.Cluster.toObject(message.cluster, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this GetAppProfileRequest to JSON. + * Converts this PartialUpdateClusterRequest to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.GetAppProfileRequest + * @memberof google.bigtable.admin.v2.PartialUpdateClusterRequest * @instance * @returns {Object.} JSON object */ - GetAppProfileRequest.prototype.toJSON = function toJSON() { + PartialUpdateClusterRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return GetAppProfileRequest; + return PartialUpdateClusterRequest; })(); - v2.ListAppProfilesRequest = (function() { + v2.CreateAppProfileRequest = (function() { /** - * Properties of a ListAppProfilesRequest. + * Properties of a CreateAppProfileRequest. * @memberof google.bigtable.admin.v2 - * @interface IListAppProfilesRequest - * @property {string|null} [parent] ListAppProfilesRequest parent - * @property {number|null} [pageSize] ListAppProfilesRequest pageSize - * @property {string|null} [pageToken] ListAppProfilesRequest pageToken + * @interface ICreateAppProfileRequest + * @property {string|null} [parent] CreateAppProfileRequest parent + * @property {string|null} [appProfileId] CreateAppProfileRequest appProfileId + * @property {google.bigtable.admin.v2.IAppProfile|null} [appProfile] CreateAppProfileRequest appProfile + * @property {boolean|null} [ignoreWarnings] CreateAppProfileRequest ignoreWarnings */ /** - * Constructs a new ListAppProfilesRequest. + * Constructs a new CreateAppProfileRequest. * @memberof google.bigtable.admin.v2 - * @classdesc Represents a ListAppProfilesRequest. - * @implements IListAppProfilesRequest + * @classdesc Represents a CreateAppProfileRequest. + * @implements ICreateAppProfileRequest * @constructor - * @param {google.bigtable.admin.v2.IListAppProfilesRequest=} [properties] Properties to set + * @param {google.bigtable.admin.v2.ICreateAppProfileRequest=} [properties] Properties to set */ - function ListAppProfilesRequest(properties) { + function CreateAppProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4656,101 +4711,114 @@ } /** - * ListAppProfilesRequest parent. + * CreateAppProfileRequest parent. * @member {string} parent - * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest * @instance */ - ListAppProfilesRequest.prototype.parent = ""; + CreateAppProfileRequest.prototype.parent = ""; /** - * ListAppProfilesRequest pageSize. - * @member {number} pageSize - * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * CreateAppProfileRequest appProfileId. + * @member {string} appProfileId + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest * @instance */ - ListAppProfilesRequest.prototype.pageSize = 0; + CreateAppProfileRequest.prototype.appProfileId = ""; /** - * ListAppProfilesRequest pageToken. - * @member {string} pageToken - * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * CreateAppProfileRequest appProfile. + * @member {google.bigtable.admin.v2.IAppProfile|null|undefined} appProfile + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest * @instance */ - ListAppProfilesRequest.prototype.pageToken = ""; + CreateAppProfileRequest.prototype.appProfile = null; /** - * Creates a new ListAppProfilesRequest instance using the specified properties. + * CreateAppProfileRequest ignoreWarnings. + * @member {boolean} ignoreWarnings + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest + * @instance + */ + CreateAppProfileRequest.prototype.ignoreWarnings = false; + + /** + * Creates a new CreateAppProfileRequest instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest * @static - * @param {google.bigtable.admin.v2.IListAppProfilesRequest=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.ListAppProfilesRequest} ListAppProfilesRequest instance + * @param {google.bigtable.admin.v2.ICreateAppProfileRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.CreateAppProfileRequest} CreateAppProfileRequest instance */ - ListAppProfilesRequest.create = function create(properties) { - return new ListAppProfilesRequest(properties); + CreateAppProfileRequest.create = function create(properties) { + return new CreateAppProfileRequest(properties); }; /** - * Encodes the specified ListAppProfilesRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesRequest.verify|verify} messages. + * Encodes the specified CreateAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.CreateAppProfileRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest * @static - * @param {google.bigtable.admin.v2.IListAppProfilesRequest} message ListAppProfilesRequest message or plain object to encode + * @param {google.bigtable.admin.v2.ICreateAppProfileRequest} message CreateAppProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAppProfilesRequest.encode = function encode(message, writer) { + CreateAppProfileRequest.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); + if (message.appProfileId != null && Object.hasOwnProperty.call(message, "appProfileId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.appProfileId); + if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) + $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfile, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.ignoreWarnings); return writer; }; /** - * Encodes the specified ListAppProfilesRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesRequest.verify|verify} messages. + * Encodes the specified CreateAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.CreateAppProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest * @static - * @param {google.bigtable.admin.v2.IListAppProfilesRequest} message ListAppProfilesRequest message or plain object to encode + * @param {google.bigtable.admin.v2.ICreateAppProfileRequest} message CreateAppProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAppProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { + CreateAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAppProfilesRequest message from the specified reader or buffer. + * Decodes a CreateAppProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.ListAppProfilesRequest} ListAppProfilesRequest + * @returns {google.bigtable.admin.v2.CreateAppProfileRequest} CreateAppProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAppProfilesRequest.decode = function decode(reader, length) { + CreateAppProfileRequest.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.bigtable.admin.v2.ListAppProfilesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.CreateAppProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: message.parent = reader.string(); break; + case 2: + message.appProfileId = reader.string(); + break; case 3: - message.pageSize = reader.int32(); + message.appProfile = $root.google.bigtable.admin.v2.AppProfile.decode(reader, reader.uint32()); break; - case 2: - message.pageToken = reader.string(); + case 4: + message.ignoreWarnings = reader.bool(); break; default: reader.skipType(tag & 7); @@ -4761,128 +4829,137 @@ }; /** - * Decodes a ListAppProfilesRequest message from the specified reader or buffer, length delimited. + * Decodes a CreateAppProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.ListAppProfilesRequest} ListAppProfilesRequest + * @returns {google.bigtable.admin.v2.CreateAppProfileRequest} CreateAppProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAppProfilesRequest.decodeDelimited = function decodeDelimited(reader) { + CreateAppProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAppProfilesRequest message. + * Verifies a CreateAppProfileRequest message. * @function verify - * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAppProfilesRequest.verify = function verify(message) { + CreateAppProfileRequest.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.appProfileId != null && message.hasOwnProperty("appProfileId")) + if (!$util.isString(message.appProfileId)) + return "appProfileId: string expected"; + if (message.appProfile != null && message.hasOwnProperty("appProfile")) { + var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfile); + if (error) + return "appProfile." + error; + } + if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (typeof message.ignoreWarnings !== "boolean") + return "ignoreWarnings: boolean expected"; return null; }; /** - * Creates a ListAppProfilesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a CreateAppProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.ListAppProfilesRequest} ListAppProfilesRequest + * @returns {google.bigtable.admin.v2.CreateAppProfileRequest} CreateAppProfileRequest */ - ListAppProfilesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.ListAppProfilesRequest) + CreateAppProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.CreateAppProfileRequest) return object; - var message = new $root.google.bigtable.admin.v2.ListAppProfilesRequest(); + var message = new $root.google.bigtable.admin.v2.CreateAppProfileRequest(); 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.appProfileId != null) + message.appProfileId = String(object.appProfileId); + if (object.appProfile != null) { + if (typeof object.appProfile !== "object") + throw TypeError(".google.bigtable.admin.v2.CreateAppProfileRequest.appProfile: object expected"); + message.appProfile = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfile); + } + if (object.ignoreWarnings != null) + message.ignoreWarnings = Boolean(object.ignoreWarnings); return message; }; /** - * Creates a plain object from a ListAppProfilesRequest message. Also converts values to other types if specified. + * Creates a plain object from a CreateAppProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest * @static - * @param {google.bigtable.admin.v2.ListAppProfilesRequest} message ListAppProfilesRequest + * @param {google.bigtable.admin.v2.CreateAppProfileRequest} message CreateAppProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAppProfilesRequest.toObject = function toObject(message, options) { + CreateAppProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.pageToken = ""; - object.pageSize = 0; + object.appProfileId = ""; + object.appProfile = null; + object.ignoreWarnings = false; } 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; + if (message.appProfileId != null && message.hasOwnProperty("appProfileId")) + object.appProfileId = message.appProfileId; + if (message.appProfile != null && message.hasOwnProperty("appProfile")) + object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options); + if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + object.ignoreWarnings = message.ignoreWarnings; return object; }; /** - * Converts this ListAppProfilesRequest to JSON. + * Converts this CreateAppProfileRequest to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.ListAppProfilesRequest + * @memberof google.bigtable.admin.v2.CreateAppProfileRequest * @instance * @returns {Object.} JSON object */ - ListAppProfilesRequest.prototype.toJSON = function toJSON() { + CreateAppProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListAppProfilesRequest; + return CreateAppProfileRequest; })(); - v2.ListAppProfilesResponse = (function() { + v2.GetAppProfileRequest = (function() { /** - * Properties of a ListAppProfilesResponse. + * Properties of a GetAppProfileRequest. * @memberof google.bigtable.admin.v2 - * @interface IListAppProfilesResponse - * @property {Array.|null} [appProfiles] ListAppProfilesResponse appProfiles - * @property {string|null} [nextPageToken] ListAppProfilesResponse nextPageToken - * @property {Array.|null} [failedLocations] ListAppProfilesResponse failedLocations + * @interface IGetAppProfileRequest + * @property {string|null} [name] GetAppProfileRequest name */ /** - * Constructs a new ListAppProfilesResponse. + * Constructs a new GetAppProfileRequest. * @memberof google.bigtable.admin.v2 - * @classdesc Represents a ListAppProfilesResponse. - * @implements IListAppProfilesResponse + * @classdesc Represents a GetAppProfileRequest. + * @implements IGetAppProfileRequest * @constructor - * @param {google.bigtable.admin.v2.IListAppProfilesResponse=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IGetAppProfileRequest=} [properties] Properties to set */ - function ListAppProfilesResponse(properties) { - this.appProfiles = []; - this.failedLocations = []; + function GetAppProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4890,107 +4967,75 @@ } /** - * ListAppProfilesResponse appProfiles. - * @member {Array.} appProfiles - * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * GetAppProfileRequest name. + * @member {string} name + * @memberof google.bigtable.admin.v2.GetAppProfileRequest * @instance */ - ListAppProfilesResponse.prototype.appProfiles = $util.emptyArray; - - /** - * ListAppProfilesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.bigtable.admin.v2.ListAppProfilesResponse - * @instance - */ - ListAppProfilesResponse.prototype.nextPageToken = ""; - - /** - * ListAppProfilesResponse failedLocations. - * @member {Array.} failedLocations - * @memberof google.bigtable.admin.v2.ListAppProfilesResponse - * @instance - */ - ListAppProfilesResponse.prototype.failedLocations = $util.emptyArray; + GetAppProfileRequest.prototype.name = ""; /** - * Creates a new ListAppProfilesResponse instance using the specified properties. + * Creates a new GetAppProfileRequest instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @memberof google.bigtable.admin.v2.GetAppProfileRequest * @static - * @param {google.bigtable.admin.v2.IListAppProfilesResponse=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.ListAppProfilesResponse} ListAppProfilesResponse instance + * @param {google.bigtable.admin.v2.IGetAppProfileRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.GetAppProfileRequest} GetAppProfileRequest instance */ - ListAppProfilesResponse.create = function create(properties) { - return new ListAppProfilesResponse(properties); + GetAppProfileRequest.create = function create(properties) { + return new GetAppProfileRequest(properties); }; /** - * Encodes the specified ListAppProfilesResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesResponse.verify|verify} messages. + * Encodes the specified GetAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.GetAppProfileRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @memberof google.bigtable.admin.v2.GetAppProfileRequest * @static - * @param {google.bigtable.admin.v2.IListAppProfilesResponse} message ListAppProfilesResponse message or plain object to encode + * @param {google.bigtable.admin.v2.IGetAppProfileRequest} message GetAppProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAppProfilesResponse.encode = function encode(message, writer) { + GetAppProfileRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.appProfiles != null && message.appProfiles.length) - for (var i = 0; i < message.appProfiles.length; ++i) - $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfiles[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.failedLocations != null && message.failedLocations.length) - for (var i = 0; i < message.failedLocations.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.failedLocations[i]); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListAppProfilesResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesResponse.verify|verify} messages. + * Encodes the specified GetAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.GetAppProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @memberof google.bigtable.admin.v2.GetAppProfileRequest * @static - * @param {google.bigtable.admin.v2.IListAppProfilesResponse} message ListAppProfilesResponse message or plain object to encode + * @param {google.bigtable.admin.v2.IGetAppProfileRequest} message GetAppProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAppProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAppProfilesResponse message from the specified reader or buffer. + * Decodes a GetAppProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @memberof google.bigtable.admin.v2.GetAppProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.ListAppProfilesResponse} ListAppProfilesResponse + * @returns {google.bigtable.admin.v2.GetAppProfileRequest} GetAppProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAppProfilesResponse.decode = function decode(reader, length) { + GetAppProfileRequest.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.bigtable.admin.v2.ListAppProfilesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.GetAppProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - if (!(message.appProfiles && message.appProfiles.length)) - message.appProfiles = []; - message.appProfiles.push($root.google.bigtable.admin.v2.AppProfile.decode(reader, reader.uint32())); - break; - case 2: - message.nextPageToken = reader.string(); - break; - case 3: - if (!(message.failedLocations && message.failedLocations.length)) - message.failedLocations = []; - message.failedLocations.push(reader.string()); + message.name = reader.string(); break; default: reader.skipType(tag & 7); @@ -5001,156 +5046,109 @@ }; /** - * Decodes a ListAppProfilesResponse message from the specified reader or buffer, length delimited. + * Decodes a GetAppProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @memberof google.bigtable.admin.v2.GetAppProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.ListAppProfilesResponse} ListAppProfilesResponse + * @returns {google.bigtable.admin.v2.GetAppProfileRequest} GetAppProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAppProfilesResponse.decodeDelimited = function decodeDelimited(reader) { + GetAppProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAppProfilesResponse message. + * Verifies a GetAppProfileRequest message. * @function verify - * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @memberof google.bigtable.admin.v2.GetAppProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAppProfilesResponse.verify = function verify(message) { + GetAppProfileRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.appProfiles != null && message.hasOwnProperty("appProfiles")) { - if (!Array.isArray(message.appProfiles)) - return "appProfiles: array expected"; - for (var i = 0; i < message.appProfiles.length; ++i) { - var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfiles[i]); - if (error) - return "appProfiles." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - if (message.failedLocations != null && message.hasOwnProperty("failedLocations")) { - if (!Array.isArray(message.failedLocations)) - return "failedLocations: array expected"; - for (var i = 0; i < message.failedLocations.length; ++i) - if (!$util.isString(message.failedLocations[i])) - return "failedLocations: string[] expected"; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListAppProfilesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetAppProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @memberof google.bigtable.admin.v2.GetAppProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.ListAppProfilesResponse} ListAppProfilesResponse + * @returns {google.bigtable.admin.v2.GetAppProfileRequest} GetAppProfileRequest */ - ListAppProfilesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.ListAppProfilesResponse) + GetAppProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.GetAppProfileRequest) return object; - var message = new $root.google.bigtable.admin.v2.ListAppProfilesResponse(); - if (object.appProfiles) { - if (!Array.isArray(object.appProfiles)) - throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse.appProfiles: array expected"); - message.appProfiles = []; - for (var i = 0; i < object.appProfiles.length; ++i) { - if (typeof object.appProfiles[i] !== "object") - throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse.appProfiles: object expected"); - message.appProfiles[i] = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfiles[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - if (object.failedLocations) { - if (!Array.isArray(object.failedLocations)) - throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse.failedLocations: array expected"); - message.failedLocations = []; - for (var i = 0; i < object.failedLocations.length; ++i) - message.failedLocations[i] = String(object.failedLocations[i]); - } + var message = new $root.google.bigtable.admin.v2.GetAppProfileRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListAppProfilesResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetAppProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @memberof google.bigtable.admin.v2.GetAppProfileRequest * @static - * @param {google.bigtable.admin.v2.ListAppProfilesResponse} message ListAppProfilesResponse + * @param {google.bigtable.admin.v2.GetAppProfileRequest} message GetAppProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAppProfilesResponse.toObject = function toObject(message, options) { + GetAppProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.appProfiles = []; - object.failedLocations = []; - } if (options.defaults) - object.nextPageToken = ""; - if (message.appProfiles && message.appProfiles.length) { - object.appProfiles = []; - for (var j = 0; j < message.appProfiles.length; ++j) - object.appProfiles[j] = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfiles[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - if (message.failedLocations && message.failedLocations.length) { - object.failedLocations = []; - for (var j = 0; j < message.failedLocations.length; ++j) - object.failedLocations[j] = message.failedLocations[j]; - } + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListAppProfilesResponse to JSON. + * Converts this GetAppProfileRequest to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @memberof google.bigtable.admin.v2.GetAppProfileRequest * @instance * @returns {Object.} JSON object */ - ListAppProfilesResponse.prototype.toJSON = function toJSON() { + GetAppProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return ListAppProfilesResponse; + return GetAppProfileRequest; })(); - v2.UpdateAppProfileRequest = (function() { + v2.ListAppProfilesRequest = (function() { /** - * Properties of an UpdateAppProfileRequest. + * Properties of a ListAppProfilesRequest. * @memberof google.bigtable.admin.v2 - * @interface IUpdateAppProfileRequest - * @property {google.bigtable.admin.v2.IAppProfile|null} [appProfile] UpdateAppProfileRequest appProfile - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAppProfileRequest updateMask - * @property {boolean|null} [ignoreWarnings] UpdateAppProfileRequest ignoreWarnings + * @interface IListAppProfilesRequest + * @property {string|null} [parent] ListAppProfilesRequest parent + * @property {number|null} [pageSize] ListAppProfilesRequest pageSize + * @property {string|null} [pageToken] ListAppProfilesRequest pageToken */ /** - * Constructs a new UpdateAppProfileRequest. + * Constructs a new ListAppProfilesRequest. * @memberof google.bigtable.admin.v2 - * @classdesc Represents an UpdateAppProfileRequest. - * @implements IUpdateAppProfileRequest + * @classdesc Represents a ListAppProfilesRequest. + * @implements IListAppProfilesRequest * @constructor - * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IListAppProfilesRequest=} [properties] Properties to set */ - function UpdateAppProfileRequest(properties) { + function ListAppProfilesRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5158,101 +5156,101 @@ } /** - * UpdateAppProfileRequest appProfile. - * @member {google.bigtable.admin.v2.IAppProfile|null|undefined} appProfile - * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * ListAppProfilesRequest parent. + * @member {string} parent + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest * @instance */ - UpdateAppProfileRequest.prototype.appProfile = null; + ListAppProfilesRequest.prototype.parent = ""; /** - * UpdateAppProfileRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * ListAppProfilesRequest pageSize. + * @member {number} pageSize + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest * @instance */ - UpdateAppProfileRequest.prototype.updateMask = null; + ListAppProfilesRequest.prototype.pageSize = 0; /** - * UpdateAppProfileRequest ignoreWarnings. - * @member {boolean} ignoreWarnings - * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * ListAppProfilesRequest pageToken. + * @member {string} pageToken + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest * @instance */ - UpdateAppProfileRequest.prototype.ignoreWarnings = false; + ListAppProfilesRequest.prototype.pageToken = ""; /** - * Creates a new UpdateAppProfileRequest instance using the specified properties. + * Creates a new ListAppProfilesRequest instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest * @static - * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.UpdateAppProfileRequest} UpdateAppProfileRequest instance + * @param {google.bigtable.admin.v2.IListAppProfilesRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListAppProfilesRequest} ListAppProfilesRequest instance */ - UpdateAppProfileRequest.create = function create(properties) { - return new UpdateAppProfileRequest(properties); + ListAppProfilesRequest.create = function create(properties) { + return new ListAppProfilesRequest(properties); }; /** - * Encodes the specified UpdateAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileRequest.verify|verify} messages. + * Encodes the specified ListAppProfilesRequest message. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest * @static - * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest} message UpdateAppProfileRequest message or plain object to encode + * @param {google.bigtable.admin.v2.IListAppProfilesRequest} message ListAppProfilesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAppProfileRequest.encode = function encode(message, writer) { + ListAppProfilesRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) - $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfile, 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(); - if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ignoreWarnings); - return writer; - }; + 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 UpdateAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileRequest.verify|verify} messages. + * Encodes the specified ListAppProfilesRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest * @static - * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest} message UpdateAppProfileRequest message or plain object to encode + * @param {google.bigtable.admin.v2.IListAppProfilesRequest} message ListAppProfilesRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAppProfilesRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateAppProfileRequest message from the specified reader or buffer. + * Decodes a ListAppProfilesRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.UpdateAppProfileRequest} UpdateAppProfileRequest + * @returns {google.bigtable.admin.v2.ListAppProfilesRequest} ListAppProfilesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAppProfileRequest.decode = function decode(reader, length) { + ListAppProfilesRequest.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.bigtable.admin.v2.UpdateAppProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListAppProfilesRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.appProfile = $root.google.bigtable.admin.v2.AppProfile.decode(reader, reader.uint32()); - break; - case 2: - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.parent = reader.string(); break; case 3: - message.ignoreWarnings = reader.bool(); + message.pageSize = reader.int32(); + break; + case 2: + message.pageToken = reader.string(); break; default: reader.skipType(tag & 7); @@ -5263,135 +5261,128 @@ }; /** - * Decodes an UpdateAppProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAppProfilesRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.UpdateAppProfileRequest} UpdateAppProfileRequest + * @returns {google.bigtable.admin.v2.ListAppProfilesRequest} ListAppProfilesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAppProfileRequest.decodeDelimited = function decodeDelimited(reader) { + ListAppProfilesRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateAppProfileRequest message. + * Verifies a ListAppProfilesRequest message. * @function verify - * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateAppProfileRequest.verify = function verify(message) { + ListAppProfilesRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.appProfile != null && message.hasOwnProperty("appProfile")) { - var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfile); - if (error) - return "appProfile." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) - if (typeof message.ignoreWarnings !== "boolean") - return "ignoreWarnings: boolean 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 an UpdateAppProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAppProfilesRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.UpdateAppProfileRequest} UpdateAppProfileRequest + * @returns {google.bigtable.admin.v2.ListAppProfilesRequest} ListAppProfilesRequest */ - UpdateAppProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.UpdateAppProfileRequest) + ListAppProfilesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.ListAppProfilesRequest) return object; - var message = new $root.google.bigtable.admin.v2.UpdateAppProfileRequest(); - if (object.appProfile != null) { - if (typeof object.appProfile !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest.appProfile: object expected"); - message.appProfile = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfile); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - if (object.ignoreWarnings != null) - message.ignoreWarnings = Boolean(object.ignoreWarnings); + var message = new $root.google.bigtable.admin.v2.ListAppProfilesRequest(); + 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 an UpdateAppProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAppProfilesRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest * @static - * @param {google.bigtable.admin.v2.UpdateAppProfileRequest} message UpdateAppProfileRequest + * @param {google.bigtable.admin.v2.ListAppProfilesRequest} message ListAppProfilesRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateAppProfileRequest.toObject = function toObject(message, options) { + ListAppProfilesRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.appProfile = null; - object.updateMask = null; - object.ignoreWarnings = false; + object.parent = ""; + object.pageToken = ""; + object.pageSize = 0; } - if (message.appProfile != null && message.hasOwnProperty("appProfile")) - object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) - object.ignoreWarnings = message.ignoreWarnings; + 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 UpdateAppProfileRequest to JSON. + * Converts this ListAppProfilesRequest to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesRequest * @instance * @returns {Object.} JSON object */ - UpdateAppProfileRequest.prototype.toJSON = function toJSON() { + ListAppProfilesRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateAppProfileRequest; + return ListAppProfilesRequest; })(); - v2.DeleteAppProfileRequest = (function() { + v2.ListAppProfilesResponse = (function() { /** - * Properties of a DeleteAppProfileRequest. + * Properties of a ListAppProfilesResponse. * @memberof google.bigtable.admin.v2 - * @interface IDeleteAppProfileRequest - * @property {string|null} [name] DeleteAppProfileRequest name - * @property {boolean|null} [ignoreWarnings] DeleteAppProfileRequest ignoreWarnings + * @interface IListAppProfilesResponse + * @property {Array.|null} [appProfiles] ListAppProfilesResponse appProfiles + * @property {string|null} [nextPageToken] ListAppProfilesResponse nextPageToken + * @property {Array.|null} [failedLocations] ListAppProfilesResponse failedLocations */ /** - * Constructs a new DeleteAppProfileRequest. + * Constructs a new ListAppProfilesResponse. * @memberof google.bigtable.admin.v2 - * @classdesc Represents a DeleteAppProfileRequest. - * @implements IDeleteAppProfileRequest + * @classdesc Represents a ListAppProfilesResponse. + * @implements IListAppProfilesResponse * @constructor - * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IListAppProfilesResponse=} [properties] Properties to set */ - function DeleteAppProfileRequest(properties) { + function ListAppProfilesResponse(properties) { + this.appProfiles = []; + this.failedLocations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5399,88 +5390,107 @@ } /** - * DeleteAppProfileRequest name. - * @member {string} name - * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * ListAppProfilesResponse appProfiles. + * @member {Array.} appProfiles + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse * @instance */ - DeleteAppProfileRequest.prototype.name = ""; + ListAppProfilesResponse.prototype.appProfiles = $util.emptyArray; /** - * DeleteAppProfileRequest ignoreWarnings. - * @member {boolean} ignoreWarnings - * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * ListAppProfilesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse * @instance */ - DeleteAppProfileRequest.prototype.ignoreWarnings = false; + ListAppProfilesResponse.prototype.nextPageToken = ""; /** - * Creates a new DeleteAppProfileRequest instance using the specified properties. + * ListAppProfilesResponse failedLocations. + * @member {Array.} failedLocations + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse + * @instance + */ + ListAppProfilesResponse.prototype.failedLocations = $util.emptyArray; + + /** + * Creates a new ListAppProfilesResponse instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse * @static - * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.DeleteAppProfileRequest} DeleteAppProfileRequest instance + * @param {google.bigtable.admin.v2.IListAppProfilesResponse=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.ListAppProfilesResponse} ListAppProfilesResponse instance */ - DeleteAppProfileRequest.create = function create(properties) { - return new DeleteAppProfileRequest(properties); + ListAppProfilesResponse.create = function create(properties) { + return new ListAppProfilesResponse(properties); }; /** - * Encodes the specified DeleteAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteAppProfileRequest.verify|verify} messages. + * Encodes the specified ListAppProfilesResponse message. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesResponse.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse * @static - * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest} message DeleteAppProfileRequest message or plain object to encode + * @param {google.bigtable.admin.v2.IListAppProfilesResponse} message ListAppProfilesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAppProfileRequest.encode = function encode(message, writer) { + ListAppProfilesResponse.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.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.ignoreWarnings); + if (message.appProfiles != null && message.appProfiles.length) + for (var i = 0; i < message.appProfiles.length; ++i) + $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfiles[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.failedLocations != null && message.failedLocations.length) + for (var i = 0; i < message.failedLocations.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.failedLocations[i]); return writer; }; /** - * Encodes the specified DeleteAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteAppProfileRequest.verify|verify} messages. + * Encodes the specified ListAppProfilesResponse message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.ListAppProfilesResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse * @static - * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest} message DeleteAppProfileRequest message or plain object to encode + * @param {google.bigtable.admin.v2.IListAppProfilesResponse} message ListAppProfilesResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { + ListAppProfilesResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteAppProfileRequest message from the specified reader or buffer. + * Decodes a ListAppProfilesResponse message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.DeleteAppProfileRequest} DeleteAppProfileRequest + * @returns {google.bigtable.admin.v2.ListAppProfilesResponse} ListAppProfilesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAppProfileRequest.decode = function decode(reader, length) { + ListAppProfilesResponse.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.bigtable.admin.v2.DeleteAppProfileRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.ListAppProfilesResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: - message.name = reader.string(); + if (!(message.appProfiles && message.appProfiles.length)) + message.appProfiles = []; + message.appProfiles.push($root.google.bigtable.admin.v2.AppProfile.decode(reader, reader.uint32())); break; case 2: - message.ignoreWarnings = reader.bool(); + message.nextPageToken = reader.string(); + break; + case 3: + if (!(message.failedLocations && message.failedLocations.length)) + message.failedLocations = []; + message.failedLocations.push(reader.string()); break; default: reader.skipType(tag & 7); @@ -5491,115 +5501,156 @@ }; /** - * Decodes a DeleteAppProfileRequest message from the specified reader or buffer, length delimited. + * Decodes a ListAppProfilesResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.DeleteAppProfileRequest} DeleteAppProfileRequest + * @returns {google.bigtable.admin.v2.ListAppProfilesResponse} ListAppProfilesResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAppProfileRequest.decodeDelimited = function decodeDelimited(reader) { + ListAppProfilesResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteAppProfileRequest message. + * Verifies a ListAppProfilesResponse message. * @function verify - * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteAppProfileRequest.verify = function verify(message) { + ListAppProfilesResponse.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.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) - if (typeof message.ignoreWarnings !== "boolean") - return "ignoreWarnings: boolean expected"; + if (message.appProfiles != null && message.hasOwnProperty("appProfiles")) { + if (!Array.isArray(message.appProfiles)) + return "appProfiles: array expected"; + for (var i = 0; i < message.appProfiles.length; ++i) { + var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfiles[i]); + if (error) + return "appProfiles." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + if (message.failedLocations != null && message.hasOwnProperty("failedLocations")) { + if (!Array.isArray(message.failedLocations)) + return "failedLocations: array expected"; + for (var i = 0; i < message.failedLocations.length; ++i) + if (!$util.isString(message.failedLocations[i])) + return "failedLocations: string[] expected"; + } return null; }; /** - * Creates a DeleteAppProfileRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListAppProfilesResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.DeleteAppProfileRequest} DeleteAppProfileRequest + * @returns {google.bigtable.admin.v2.ListAppProfilesResponse} ListAppProfilesResponse */ - DeleteAppProfileRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.DeleteAppProfileRequest) + ListAppProfilesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.ListAppProfilesResponse) return object; - var message = new $root.google.bigtable.admin.v2.DeleteAppProfileRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.ignoreWarnings != null) - message.ignoreWarnings = Boolean(object.ignoreWarnings); + var message = new $root.google.bigtable.admin.v2.ListAppProfilesResponse(); + if (object.appProfiles) { + if (!Array.isArray(object.appProfiles)) + throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse.appProfiles: array expected"); + message.appProfiles = []; + for (var i = 0; i < object.appProfiles.length; ++i) { + if (typeof object.appProfiles[i] !== "object") + throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse.appProfiles: object expected"); + message.appProfiles[i] = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfiles[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + if (object.failedLocations) { + if (!Array.isArray(object.failedLocations)) + throw TypeError(".google.bigtable.admin.v2.ListAppProfilesResponse.failedLocations: array expected"); + message.failedLocations = []; + for (var i = 0; i < object.failedLocations.length; ++i) + message.failedLocations[i] = String(object.failedLocations[i]); + } return message; }; /** - * Creates a plain object from a DeleteAppProfileRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListAppProfilesResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse * @static - * @param {google.bigtable.admin.v2.DeleteAppProfileRequest} message DeleteAppProfileRequest + * @param {google.bigtable.admin.v2.ListAppProfilesResponse} message ListAppProfilesResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteAppProfileRequest.toObject = function toObject(message, options) { + ListAppProfilesResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.ignoreWarnings = false; + if (options.arrays || options.defaults) { + object.appProfiles = []; + object.failedLocations = []; + } + if (options.defaults) + object.nextPageToken = ""; + if (message.appProfiles && message.appProfiles.length) { + object.appProfiles = []; + for (var j = 0; j < message.appProfiles.length; ++j) + object.appProfiles[j] = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfiles[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + if (message.failedLocations && message.failedLocations.length) { + object.failedLocations = []; + for (var j = 0; j < message.failedLocations.length; ++j) + object.failedLocations[j] = message.failedLocations[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) - object.ignoreWarnings = message.ignoreWarnings; return object; }; /** - * Converts this DeleteAppProfileRequest to JSON. + * Converts this ListAppProfilesResponse to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest + * @memberof google.bigtable.admin.v2.ListAppProfilesResponse * @instance * @returns {Object.} JSON object */ - DeleteAppProfileRequest.prototype.toJSON = function toJSON() { + ListAppProfilesResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return DeleteAppProfileRequest; + return ListAppProfilesResponse; })(); - v2.UpdateAppProfileMetadata = (function() { + v2.UpdateAppProfileRequest = (function() { /** - * Properties of an UpdateAppProfileMetadata. + * Properties of an UpdateAppProfileRequest. * @memberof google.bigtable.admin.v2 - * @interface IUpdateAppProfileMetadata + * @interface IUpdateAppProfileRequest + * @property {google.bigtable.admin.v2.IAppProfile|null} [appProfile] UpdateAppProfileRequest appProfile + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateAppProfileRequest updateMask + * @property {boolean|null} [ignoreWarnings] UpdateAppProfileRequest ignoreWarnings */ /** - * Constructs a new UpdateAppProfileMetadata. + * Constructs a new UpdateAppProfileRequest. * @memberof google.bigtable.admin.v2 - * @classdesc Represents an UpdateAppProfileMetadata. - * @implements IUpdateAppProfileMetadata + * @classdesc Represents an UpdateAppProfileRequest. + * @implements IUpdateAppProfileRequest * @constructor - * @param {google.bigtable.admin.v2.IUpdateAppProfileMetadata=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest=} [properties] Properties to set */ - function UpdateAppProfileMetadata(properties) { + function UpdateAppProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5607,63 +5658,102 @@ } /** - * Creates a new UpdateAppProfileMetadata instance using the specified properties. + * UpdateAppProfileRequest appProfile. + * @member {google.bigtable.admin.v2.IAppProfile|null|undefined} appProfile + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @instance + */ + UpdateAppProfileRequest.prototype.appProfile = null; + + /** + * UpdateAppProfileRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @instance + */ + UpdateAppProfileRequest.prototype.updateMask = null; + + /** + * UpdateAppProfileRequest ignoreWarnings. + * @member {boolean} ignoreWarnings + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest + * @instance + */ + UpdateAppProfileRequest.prototype.ignoreWarnings = false; + + /** + * Creates a new UpdateAppProfileRequest instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest * @static - * @param {google.bigtable.admin.v2.IUpdateAppProfileMetadata=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.UpdateAppProfileMetadata} UpdateAppProfileMetadata instance + * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateAppProfileRequest} UpdateAppProfileRequest instance */ - UpdateAppProfileMetadata.create = function create(properties) { - return new UpdateAppProfileMetadata(properties); + UpdateAppProfileRequest.create = function create(properties) { + return new UpdateAppProfileRequest(properties); }; /** - * Encodes the specified UpdateAppProfileMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileMetadata.verify|verify} messages. + * Encodes the specified UpdateAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest * @static - * @param {google.bigtable.admin.v2.IUpdateAppProfileMetadata} message UpdateAppProfileMetadata message or plain object to encode + * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest} message UpdateAppProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAppProfileMetadata.encode = function encode(message, writer) { + UpdateAppProfileRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.appProfile != null && Object.hasOwnProperty.call(message, "appProfile")) + $root.google.bigtable.admin.v2.AppProfile.encode(message.appProfile, 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(); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.ignoreWarnings); return writer; }; /** - * Encodes the specified UpdateAppProfileMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileMetadata.verify|verify} messages. + * Encodes the specified UpdateAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest * @static - * @param {google.bigtable.admin.v2.IUpdateAppProfileMetadata} message UpdateAppProfileMetadata message or plain object to encode + * @param {google.bigtable.admin.v2.IUpdateAppProfileRequest} message UpdateAppProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateAppProfileMetadata.encodeDelimited = function encodeDelimited(message, writer) { + UpdateAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateAppProfileMetadata message from the specified reader or buffer. + * Decodes an UpdateAppProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.UpdateAppProfileMetadata} UpdateAppProfileMetadata + * @returns {google.bigtable.admin.v2.UpdateAppProfileRequest} UpdateAppProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAppProfileMetadata.decode = function decode(reader, length) { + UpdateAppProfileRequest.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.bigtable.admin.v2.UpdateAppProfileMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateAppProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: + message.appProfile = $root.google.bigtable.admin.v2.AppProfile.decode(reader, reader.uint32()); + break; + case 2: + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + case 3: + message.ignoreWarnings = reader.bool(); + break; default: reader.skipType(tag & 7); break; @@ -5673,100 +5763,135 @@ }; /** - * Decodes an UpdateAppProfileMetadata message from the specified reader or buffer, length delimited. + * Decodes an UpdateAppProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.UpdateAppProfileMetadata} UpdateAppProfileMetadata + * @returns {google.bigtable.admin.v2.UpdateAppProfileRequest} UpdateAppProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateAppProfileMetadata.decodeDelimited = function decodeDelimited(reader) { + UpdateAppProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateAppProfileMetadata message. + * Verifies an UpdateAppProfileRequest message. * @function verify - * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateAppProfileMetadata.verify = function verify(message) { + UpdateAppProfileRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.appProfile != null && message.hasOwnProperty("appProfile")) { + var error = $root.google.bigtable.admin.v2.AppProfile.verify(message.appProfile); + if (error) + return "appProfile." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (typeof message.ignoreWarnings !== "boolean") + return "ignoreWarnings: boolean expected"; return null; }; /** - * Creates an UpdateAppProfileMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAppProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.UpdateAppProfileMetadata} UpdateAppProfileMetadata + * @returns {google.bigtable.admin.v2.UpdateAppProfileRequest} UpdateAppProfileRequest */ - UpdateAppProfileMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.UpdateAppProfileMetadata) + UpdateAppProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateAppProfileRequest) return object; - return new $root.google.bigtable.admin.v2.UpdateAppProfileMetadata(); + var message = new $root.google.bigtable.admin.v2.UpdateAppProfileRequest(); + if (object.appProfile != null) { + if (typeof object.appProfile !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest.appProfile: object expected"); + message.appProfile = $root.google.bigtable.admin.v2.AppProfile.fromObject(object.appProfile); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.bigtable.admin.v2.UpdateAppProfileRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + if (object.ignoreWarnings != null) + message.ignoreWarnings = Boolean(object.ignoreWarnings); + return message; }; /** - * Creates a plain object from an UpdateAppProfileMetadata message. Also converts values to other types if specified. + * Creates a plain object from an UpdateAppProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest * @static - * @param {google.bigtable.admin.v2.UpdateAppProfileMetadata} message UpdateAppProfileMetadata + * @param {google.bigtable.admin.v2.UpdateAppProfileRequest} message UpdateAppProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateAppProfileMetadata.toObject = function toObject() { - return {}; + UpdateAppProfileRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.appProfile = null; + object.updateMask = null; + object.ignoreWarnings = false; + } + if (message.appProfile != null && message.hasOwnProperty("appProfile")) + object.appProfile = $root.google.bigtable.admin.v2.AppProfile.toObject(message.appProfile, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + object.ignoreWarnings = message.ignoreWarnings; + return object; }; /** - * Converts this UpdateAppProfileMetadata to JSON. + * Converts this UpdateAppProfileRequest to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata + * @memberof google.bigtable.admin.v2.UpdateAppProfileRequest * @instance * @returns {Object.} JSON object */ - UpdateAppProfileMetadata.prototype.toJSON = function toJSON() { + UpdateAppProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - return UpdateAppProfileMetadata; + return UpdateAppProfileRequest; })(); - v2.Instance = (function() { + v2.DeleteAppProfileRequest = (function() { /** - * Properties of an Instance. + * Properties of a DeleteAppProfileRequest. * @memberof google.bigtable.admin.v2 - * @interface IInstance - * @property {string|null} [name] Instance name - * @property {string|null} [displayName] Instance displayName - * @property {google.bigtable.admin.v2.Instance.State|null} [state] Instance state - * @property {google.bigtable.admin.v2.Instance.Type|null} [type] Instance type - * @property {Object.|null} [labels] Instance labels - * @property {google.protobuf.ITimestamp|null} [createTime] Instance createTime + * @interface IDeleteAppProfileRequest + * @property {string|null} [name] DeleteAppProfileRequest name + * @property {boolean|null} [ignoreWarnings] DeleteAppProfileRequest ignoreWarnings */ /** - * Constructs a new Instance. + * Constructs a new DeleteAppProfileRequest. * @memberof google.bigtable.admin.v2 - * @classdesc Represents an Instance. - * @implements IInstance + * @classdesc Represents a DeleteAppProfileRequest. + * @implements IDeleteAppProfileRequest * @constructor - * @param {google.bigtable.admin.v2.IInstance=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest=} [properties] Properties to set */ - function Instance(properties) { - this.labels = {}; + function DeleteAppProfileRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5774,121 +5899,80 @@ } /** - * Instance name. + * DeleteAppProfileRequest name. * @member {string} name - * @memberof google.bigtable.admin.v2.Instance - * @instance - */ - Instance.prototype.name = ""; - - /** - * Instance displayName. - * @member {string} displayName - * @memberof google.bigtable.admin.v2.Instance - * @instance - */ - Instance.prototype.displayName = ""; - - /** - * Instance state. - * @member {google.bigtable.admin.v2.Instance.State} state - * @memberof google.bigtable.admin.v2.Instance - * @instance - */ - Instance.prototype.state = 0; - - /** - * Instance type. - * @member {google.bigtable.admin.v2.Instance.Type} type - * @memberof google.bigtable.admin.v2.Instance - * @instance - */ - Instance.prototype.type = 0; - - /** - * Instance labels. - * @member {Object.} labels - * @memberof google.bigtable.admin.v2.Instance + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest * @instance */ - Instance.prototype.labels = $util.emptyObject; + DeleteAppProfileRequest.prototype.name = ""; /** - * Instance createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.bigtable.admin.v2.Instance + * DeleteAppProfileRequest ignoreWarnings. + * @member {boolean} ignoreWarnings + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest * @instance */ - Instance.prototype.createTime = null; + DeleteAppProfileRequest.prototype.ignoreWarnings = false; /** - * Creates a new Instance instance using the specified properties. + * Creates a new DeleteAppProfileRequest instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.Instance + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest * @static - * @param {google.bigtable.admin.v2.IInstance=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.Instance} Instance instance + * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.DeleteAppProfileRequest} DeleteAppProfileRequest instance */ - Instance.create = function create(properties) { - return new Instance(properties); + DeleteAppProfileRequest.create = function create(properties) { + return new DeleteAppProfileRequest(properties); }; /** - * Encodes the specified Instance message. Does not implicitly {@link google.bigtable.admin.v2.Instance.verify|verify} messages. + * Encodes the specified DeleteAppProfileRequest message. Does not implicitly {@link google.bigtable.admin.v2.DeleteAppProfileRequest.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.Instance + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest * @static - * @param {google.bigtable.admin.v2.IInstance} message Instance message or plain object to encode + * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest} message DeleteAppProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Instance.encode = function encode(message, writer) { + DeleteAppProfileRequest.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); - 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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.ignoreWarnings != null && Object.hasOwnProperty.call(message, "ignoreWarnings")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.ignoreWarnings); return writer; }; /** - * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Instance.verify|verify} messages. + * Encodes the specified DeleteAppProfileRequest message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.DeleteAppProfileRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.Instance + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest * @static - * @param {google.bigtable.admin.v2.IInstance} message Instance message or plain object to encode + * @param {google.bigtable.admin.v2.IDeleteAppProfileRequest} message DeleteAppProfileRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Instance.encodeDelimited = function encodeDelimited(message, writer) { + DeleteAppProfileRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Instance message from the specified reader or buffer. + * Decodes a DeleteAppProfileRequest message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.Instance + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.Instance} Instance + * @returns {google.bigtable.admin.v2.DeleteAppProfileRequest} DeleteAppProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Instance.decode = function decode(reader, length) { + DeleteAppProfileRequest.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.bigtable.admin.v2.Instance(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.DeleteAppProfileRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -5896,38 +5980,7 @@ message.name = reader.string(); break; case 2: - message.displayName = reader.string(); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.type = reader.int32(); - break; - case 5: - 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 7: - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.ignoreWarnings = reader.bool(); break; default: reader.skipType(tag & 7); @@ -5938,241 +5991,115 @@ }; /** - * Decodes an Instance message from the specified reader or buffer, length delimited. + * Decodes a DeleteAppProfileRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.Instance + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.Instance} Instance + * @returns {google.bigtable.admin.v2.DeleteAppProfileRequest} DeleteAppProfileRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Instance.decodeDelimited = function decodeDelimited(reader) { + DeleteAppProfileRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Instance message. + * Verifies a DeleteAppProfileRequest message. * @function verify - * @memberof google.bigtable.admin.v2.Instance + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Instance.verify = function verify(message) { + DeleteAppProfileRequest.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - break; - } - 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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } + if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + if (typeof message.ignoreWarnings !== "boolean") + return "ignoreWarnings: boolean expected"; return null; }; /** - * Creates an Instance message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAppProfileRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.Instance + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.Instance} Instance + * @returns {google.bigtable.admin.v2.DeleteAppProfileRequest} DeleteAppProfileRequest */ - Instance.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.Instance) + DeleteAppProfileRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.DeleteAppProfileRequest) return object; - var message = new $root.google.bigtable.admin.v2.Instance(); + var message = new $root.google.bigtable.admin.v2.DeleteAppProfileRequest(); if (object.name != null) message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - switch (object.state) { - case "STATE_NOT_KNOWN": - case 0: - message.state = 0; - break; - case "READY": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - } - switch (object.type) { - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "PRODUCTION": - case 1: - message.type = 1; - break; - case "DEVELOPMENT": - case 2: - message.type = 2; - break; - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.bigtable.admin.v2.Instance.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.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.bigtable.admin.v2.Instance.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } + if (object.ignoreWarnings != null) + message.ignoreWarnings = Boolean(object.ignoreWarnings); return message; }; /** - * Creates a plain object from an Instance message. Also converts values to other types if specified. + * Creates a plain object from a DeleteAppProfileRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.Instance + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest * @static - * @param {google.bigtable.admin.v2.Instance} message Instance + * @param {google.bigtable.admin.v2.DeleteAppProfileRequest} message DeleteAppProfileRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Instance.toObject = function toObject(message, options) { + DeleteAppProfileRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.labels = {}; if (options.defaults) { object.name = ""; - object.displayName = ""; - object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.createTime = null; + object.ignoreWarnings = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.bigtable.admin.v2.Instance.State[message.state] : message.state; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.bigtable.admin.v2.Instance.Type[message.type] : message.type; - 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.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.ignoreWarnings != null && message.hasOwnProperty("ignoreWarnings")) + object.ignoreWarnings = message.ignoreWarnings; return object; }; /** - * Converts this Instance to JSON. + * Converts this DeleteAppProfileRequest to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.Instance + * @memberof google.bigtable.admin.v2.DeleteAppProfileRequest * @instance * @returns {Object.} JSON object */ - Instance.prototype.toJSON = function toJSON() { + DeleteAppProfileRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; - /** - * State enum. - * @name google.bigtable.admin.v2.Instance.State - * @enum {number} - * @property {number} STATE_NOT_KNOWN=0 STATE_NOT_KNOWN value - * @property {number} READY=1 READY value - * @property {number} CREATING=2 CREATING value - */ - Instance.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_NOT_KNOWN"] = 0; - values[valuesById[1] = "READY"] = 1; - values[valuesById[2] = "CREATING"] = 2; - return values; - })(); - - /** - * Type enum. - * @name google.bigtable.admin.v2.Instance.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} PRODUCTION=1 PRODUCTION value - * @property {number} DEVELOPMENT=2 DEVELOPMENT value - */ - Instance.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PRODUCTION"] = 1; - values[valuesById[2] = "DEVELOPMENT"] = 2; - return values; - })(); - - return Instance; + return DeleteAppProfileRequest; })(); - v2.Cluster = (function() { + v2.UpdateAppProfileMetadata = (function() { /** - * Properties of a Cluster. + * Properties of an UpdateAppProfileMetadata. * @memberof google.bigtable.admin.v2 - * @interface ICluster - * @property {string|null} [name] Cluster name - * @property {string|null} [location] Cluster location - * @property {google.bigtable.admin.v2.Cluster.State|null} [state] Cluster state - * @property {number|null} [serveNodes] Cluster serveNodes - * @property {google.bigtable.admin.v2.StorageType|null} [defaultStorageType] Cluster defaultStorageType - * @property {google.bigtable.admin.v2.Cluster.IEncryptionConfig|null} [encryptionConfig] Cluster encryptionConfig + * @interface IUpdateAppProfileMetadata */ /** - * Constructs a new Cluster. + * Constructs a new UpdateAppProfileMetadata. * @memberof google.bigtable.admin.v2 - * @classdesc Represents a Cluster. - * @implements ICluster + * @classdesc Represents an UpdateAppProfileMetadata. + * @implements IUpdateAppProfileMetadata * @constructor - * @param {google.bigtable.admin.v2.ICluster=} [properties] Properties to set + * @param {google.bigtable.admin.v2.IUpdateAppProfileMetadata=} [properties] Properties to set */ - function Cluster(properties) { + function UpdateAppProfileMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6180,141 +6107,63 @@ } /** - * Cluster name. - * @member {string} name - * @memberof google.bigtable.admin.v2.Cluster - * @instance - */ - Cluster.prototype.name = ""; - - /** - * Cluster location. - * @member {string} location - * @memberof google.bigtable.admin.v2.Cluster - * @instance - */ - Cluster.prototype.location = ""; - - /** - * Cluster state. - * @member {google.bigtable.admin.v2.Cluster.State} state - * @memberof google.bigtable.admin.v2.Cluster - * @instance - */ - Cluster.prototype.state = 0; - - /** - * Cluster serveNodes. - * @member {number} serveNodes - * @memberof google.bigtable.admin.v2.Cluster - * @instance - */ - Cluster.prototype.serveNodes = 0; - - /** - * Cluster defaultStorageType. - * @member {google.bigtable.admin.v2.StorageType} defaultStorageType - * @memberof google.bigtable.admin.v2.Cluster - * @instance - */ - Cluster.prototype.defaultStorageType = 0; - - /** - * Cluster encryptionConfig. - * @member {google.bigtable.admin.v2.Cluster.IEncryptionConfig|null|undefined} encryptionConfig - * @memberof google.bigtable.admin.v2.Cluster - * @instance - */ - Cluster.prototype.encryptionConfig = null; - - /** - * Creates a new Cluster instance using the specified properties. + * Creates a new UpdateAppProfileMetadata instance using the specified properties. * @function create - * @memberof google.bigtable.admin.v2.Cluster + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata * @static - * @param {google.bigtable.admin.v2.ICluster=} [properties] Properties to set - * @returns {google.bigtable.admin.v2.Cluster} Cluster instance + * @param {google.bigtable.admin.v2.IUpdateAppProfileMetadata=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.UpdateAppProfileMetadata} UpdateAppProfileMetadata instance */ - Cluster.create = function create(properties) { - return new Cluster(properties); + UpdateAppProfileMetadata.create = function create(properties) { + return new UpdateAppProfileMetadata(properties); }; /** - * Encodes the specified Cluster message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.verify|verify} messages. + * Encodes the specified UpdateAppProfileMetadata message. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileMetadata.verify|verify} messages. * @function encode - * @memberof google.bigtable.admin.v2.Cluster + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata * @static - * @param {google.bigtable.admin.v2.ICluster} message Cluster message or plain object to encode + * @param {google.bigtable.admin.v2.IUpdateAppProfileMetadata} message UpdateAppProfileMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cluster.encode = function encode(message, writer) { + UpdateAppProfileMetadata.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.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.serveNodes != null && Object.hasOwnProperty.call(message, "serveNodes")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.serveNodes); - if (message.defaultStorageType != null && Object.hasOwnProperty.call(message, "defaultStorageType")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.defaultStorageType); - if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) - $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified Cluster message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.verify|verify} messages. + * Encodes the specified UpdateAppProfileMetadata message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.UpdateAppProfileMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.bigtable.admin.v2.Cluster + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata * @static - * @param {google.bigtable.admin.v2.ICluster} message Cluster message or plain object to encode + * @param {google.bigtable.admin.v2.IUpdateAppProfileMetadata} message UpdateAppProfileMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Cluster.encodeDelimited = function encodeDelimited(message, writer) { + UpdateAppProfileMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Cluster message from the specified reader or buffer. + * Decodes an UpdateAppProfileMetadata message from the specified reader or buffer. * @function decode - * @memberof google.bigtable.admin.v2.Cluster + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.bigtable.admin.v2.Cluster} Cluster + * @returns {google.bigtable.admin.v2.UpdateAppProfileMetadata} UpdateAppProfileMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Cluster.decode = function decode(reader, length) { + UpdateAppProfileMetadata.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.bigtable.admin.v2.Cluster(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.bigtable.admin.v2.UpdateAppProfileMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: - message.name = reader.string(); - break; - case 2: - message.location = reader.string(); - break; - case 3: - message.state = reader.int32(); - break; - case 4: - message.serveNodes = reader.int32(); - break; - case 5: - message.defaultStorageType = reader.int32(); - break; - case 6: - message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.decode(reader, reader.uint32()); - break; default: reader.skipType(tag & 7); break; @@ -6324,178 +6173,1685 @@ }; /** - * Decodes a Cluster message from the specified reader or buffer, length delimited. + * Decodes an UpdateAppProfileMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.bigtable.admin.v2.Cluster + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.bigtable.admin.v2.Cluster} Cluster + * @returns {google.bigtable.admin.v2.UpdateAppProfileMetadata} UpdateAppProfileMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Cluster.decodeDelimited = function decodeDelimited(reader) { + UpdateAppProfileMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Cluster message. + * Verifies an UpdateAppProfileMetadata message. * @function verify - * @memberof google.bigtable.admin.v2.Cluster + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Cluster.verify = function verify(message) { + UpdateAppProfileMetadata.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.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.serveNodes != null && message.hasOwnProperty("serveNodes")) - if (!$util.isInteger(message.serveNodes)) - return "serveNodes: integer expected"; - if (message.defaultStorageType != null && message.hasOwnProperty("defaultStorageType")) - switch (message.defaultStorageType) { - default: - return "defaultStorageType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { - var error = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.verify(message.encryptionConfig); - if (error) - return "encryptionConfig." + error; - } return null; }; /** - * Creates a Cluster message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateAppProfileMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.bigtable.admin.v2.Cluster + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata * @static * @param {Object.} object Plain object - * @returns {google.bigtable.admin.v2.Cluster} Cluster + * @returns {google.bigtable.admin.v2.UpdateAppProfileMetadata} UpdateAppProfileMetadata */ - Cluster.fromObject = function fromObject(object) { - if (object instanceof $root.google.bigtable.admin.v2.Cluster) + UpdateAppProfileMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.UpdateAppProfileMetadata) return object; - var message = new $root.google.bigtable.admin.v2.Cluster(); - if (object.name != null) - message.name = String(object.name); - if (object.location != null) - message.location = String(object.location); - switch (object.state) { - case "STATE_NOT_KNOWN": - case 0: - message.state = 0; - break; - case "READY": - case 1: - message.state = 1; - break; - case "CREATING": - case 2: - message.state = 2; - break; - case "RESIZING": - case 3: - message.state = 3; - break; - case "DISABLED": - case 4: - message.state = 4; - break; - } - if (object.serveNodes != null) - message.serveNodes = object.serveNodes | 0; - switch (object.defaultStorageType) { - case "STORAGE_TYPE_UNSPECIFIED": - case 0: - message.defaultStorageType = 0; - break; - case "SSD": - case 1: - message.defaultStorageType = 1; - break; - case "HDD": - case 2: - message.defaultStorageType = 2; - break; - } - if (object.encryptionConfig != null) { - if (typeof object.encryptionConfig !== "object") - throw TypeError(".google.bigtable.admin.v2.Cluster.encryptionConfig: object expected"); - message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.fromObject(object.encryptionConfig); - } - return message; + return new $root.google.bigtable.admin.v2.UpdateAppProfileMetadata(); }; /** - * Creates a plain object from a Cluster message. Also converts values to other types if specified. + * Creates a plain object from an UpdateAppProfileMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.bigtable.admin.v2.Cluster + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata * @static - * @param {google.bigtable.admin.v2.Cluster} message Cluster + * @param {google.bigtable.admin.v2.UpdateAppProfileMetadata} message UpdateAppProfileMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Cluster.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.location = ""; - object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; - object.serveNodes = 0; - object.defaultStorageType = options.enums === String ? "STORAGE_TYPE_UNSPECIFIED" : 0; - object.encryptionConfig = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.bigtable.admin.v2.Cluster.State[message.state] : message.state; - if (message.serveNodes != null && message.hasOwnProperty("serveNodes")) - object.serveNodes = message.serveNodes; - if (message.defaultStorageType != null && message.hasOwnProperty("defaultStorageType")) - object.defaultStorageType = options.enums === String ? $root.google.bigtable.admin.v2.StorageType[message.defaultStorageType] : message.defaultStorageType; - if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) - object.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.toObject(message.encryptionConfig, options); - return object; + UpdateAppProfileMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this Cluster to JSON. + * Converts this UpdateAppProfileMetadata to JSON. * @function toJSON - * @memberof google.bigtable.admin.v2.Cluster + * @memberof google.bigtable.admin.v2.UpdateAppProfileMetadata * @instance * @returns {Object.} JSON object */ - Cluster.prototype.toJSON = function toJSON() { + UpdateAppProfileMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; + return UpdateAppProfileMetadata; + })(); + + v2.Instance = (function() { + + /** + * Properties of an Instance. + * @memberof google.bigtable.admin.v2 + * @interface IInstance + * @property {string|null} [name] Instance name + * @property {string|null} [displayName] Instance displayName + * @property {google.bigtable.admin.v2.Instance.State|null} [state] Instance state + * @property {google.bigtable.admin.v2.Instance.Type|null} [type] Instance type + * @property {Object.|null} [labels] Instance labels + * @property {google.protobuf.ITimestamp|null} [createTime] Instance createTime + */ + + /** + * Constructs a new Instance. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an Instance. + * @implements IInstance + * @constructor + * @param {google.bigtable.admin.v2.IInstance=} [properties] Properties to set + */ + function Instance(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]]; + } + + /** + * Instance name. + * @member {string} name + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.name = ""; + + /** + * Instance displayName. + * @member {string} displayName + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.displayName = ""; + + /** + * Instance state. + * @member {google.bigtable.admin.v2.Instance.State} state + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.state = 0; + + /** + * Instance type. + * @member {google.bigtable.admin.v2.Instance.Type} type + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.type = 0; + + /** + * Instance labels. + * @member {Object.} labels + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.labels = $util.emptyObject; + + /** + * Instance createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.bigtable.admin.v2.Instance + * @instance + */ + Instance.prototype.createTime = null; + + /** + * Creates a new Instance instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {google.bigtable.admin.v2.IInstance=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Instance} Instance instance + */ + Instance.create = function create(properties) { + return new Instance(properties); + }; + + /** + * Encodes the specified Instance message. Does not implicitly {@link google.bigtable.admin.v2.Instance.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {google.bigtable.admin.v2.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instance.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.type); + 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 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Instance message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Instance.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {google.bigtable.admin.v2.IInstance} message Instance message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Instance.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Instance message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instance.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.bigtable.admin.v2.Instance(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.displayName = reader.string(); + break; + case 3: + message.state = reader.int32(); + break; + case 4: + message.type = reader.int32(); + break; + case 5: + 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 7: + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Instance message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Instance} Instance + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Instance.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Instance message. + * @function verify + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Instance.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + break; + } + 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.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + return null; + }; + + /** + * Creates an Instance message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Instance} Instance + */ + Instance.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Instance) + return object; + var message = new $root.google.bigtable.admin.v2.Instance(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.state) { + case "STATE_NOT_KNOWN": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + } + switch (object.type) { + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "PRODUCTION": + case 1: + message.type = 1; + break; + case "DEVELOPMENT": + case 2: + message.type = 2; + break; + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.bigtable.admin.v2.Instance.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.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.bigtable.admin.v2.Instance.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + return message; + }; + + /** + * Creates a plain object from an Instance message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Instance + * @static + * @param {google.bigtable.admin.v2.Instance} message Instance + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Instance.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.createTime = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.bigtable.admin.v2.Instance.State[message.state] : message.state; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.bigtable.admin.v2.Instance.Type[message.type] : message.type; + 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.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + return object; + }; + + /** + * Converts this Instance to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Instance + * @instance + * @returns {Object.} JSON object + */ + Instance.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * State enum. + * @name google.bigtable.admin.v2.Instance.State + * @enum {number} + * @property {number} STATE_NOT_KNOWN=0 STATE_NOT_KNOWN value + * @property {number} READY=1 READY value + * @property {number} CREATING=2 CREATING value + */ + Instance.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_NOT_KNOWN"] = 0; + values[valuesById[1] = "READY"] = 1; + values[valuesById[2] = "CREATING"] = 2; + return values; + })(); + + /** + * Type enum. + * @name google.bigtable.admin.v2.Instance.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} PRODUCTION=1 PRODUCTION value + * @property {number} DEVELOPMENT=2 DEVELOPMENT value + */ + Instance.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PRODUCTION"] = 1; + values[valuesById[2] = "DEVELOPMENT"] = 2; + return values; + })(); + + return Instance; + })(); + + v2.AutoscalingTargets = (function() { + + /** + * Properties of an AutoscalingTargets. + * @memberof google.bigtable.admin.v2 + * @interface IAutoscalingTargets + * @property {number|null} [cpuUtilizationPercent] AutoscalingTargets cpuUtilizationPercent + */ + + /** + * Constructs a new AutoscalingTargets. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an AutoscalingTargets. + * @implements IAutoscalingTargets + * @constructor + * @param {google.bigtable.admin.v2.IAutoscalingTargets=} [properties] Properties to set + */ + function AutoscalingTargets(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]]; + } + + /** + * AutoscalingTargets cpuUtilizationPercent. + * @member {number} cpuUtilizationPercent + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @instance + */ + AutoscalingTargets.prototype.cpuUtilizationPercent = 0; + + /** + * Creates a new AutoscalingTargets instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {google.bigtable.admin.v2.IAutoscalingTargets=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AutoscalingTargets} AutoscalingTargets instance + */ + AutoscalingTargets.create = function create(properties) { + return new AutoscalingTargets(properties); + }; + + /** + * Encodes the specified AutoscalingTargets message. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingTargets.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {google.bigtable.admin.v2.IAutoscalingTargets} message AutoscalingTargets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscalingTargets.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpuUtilizationPercent != null && Object.hasOwnProperty.call(message, "cpuUtilizationPercent")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.cpuUtilizationPercent); + return writer; + }; + + /** + * Encodes the specified AutoscalingTargets message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingTargets.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {google.bigtable.admin.v2.IAutoscalingTargets} message AutoscalingTargets message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscalingTargets.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoscalingTargets message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.AutoscalingTargets} AutoscalingTargets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscalingTargets.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.bigtable.admin.v2.AutoscalingTargets(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: + message.cpuUtilizationPercent = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoscalingTargets message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AutoscalingTargets} AutoscalingTargets + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscalingTargets.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoscalingTargets message. + * @function verify + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoscalingTargets.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpuUtilizationPercent != null && message.hasOwnProperty("cpuUtilizationPercent")) + if (!$util.isInteger(message.cpuUtilizationPercent)) + return "cpuUtilizationPercent: integer expected"; + return null; + }; + + /** + * Creates an AutoscalingTargets message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AutoscalingTargets} AutoscalingTargets + */ + AutoscalingTargets.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.AutoscalingTargets) + return object; + var message = new $root.google.bigtable.admin.v2.AutoscalingTargets(); + if (object.cpuUtilizationPercent != null) + message.cpuUtilizationPercent = object.cpuUtilizationPercent | 0; + return message; + }; + + /** + * Creates a plain object from an AutoscalingTargets message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @static + * @param {google.bigtable.admin.v2.AutoscalingTargets} message AutoscalingTargets + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoscalingTargets.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.cpuUtilizationPercent = 0; + if (message.cpuUtilizationPercent != null && message.hasOwnProperty("cpuUtilizationPercent")) + object.cpuUtilizationPercent = message.cpuUtilizationPercent; + return object; + }; + + /** + * Converts this AutoscalingTargets to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AutoscalingTargets + * @instance + * @returns {Object.} JSON object + */ + AutoscalingTargets.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AutoscalingTargets; + })(); + + v2.AutoscalingLimits = (function() { + + /** + * Properties of an AutoscalingLimits. + * @memberof google.bigtable.admin.v2 + * @interface IAutoscalingLimits + * @property {number|null} [minServeNodes] AutoscalingLimits minServeNodes + * @property {number|null} [maxServeNodes] AutoscalingLimits maxServeNodes + */ + + /** + * Constructs a new AutoscalingLimits. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents an AutoscalingLimits. + * @implements IAutoscalingLimits + * @constructor + * @param {google.bigtable.admin.v2.IAutoscalingLimits=} [properties] Properties to set + */ + function AutoscalingLimits(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]]; + } + + /** + * AutoscalingLimits minServeNodes. + * @member {number} minServeNodes + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @instance + */ + AutoscalingLimits.prototype.minServeNodes = 0; + + /** + * AutoscalingLimits maxServeNodes. + * @member {number} maxServeNodes + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @instance + */ + AutoscalingLimits.prototype.maxServeNodes = 0; + + /** + * Creates a new AutoscalingLimits instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {google.bigtable.admin.v2.IAutoscalingLimits=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.AutoscalingLimits} AutoscalingLimits instance + */ + AutoscalingLimits.create = function create(properties) { + return new AutoscalingLimits(properties); + }; + + /** + * Encodes the specified AutoscalingLimits message. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingLimits.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {google.bigtable.admin.v2.IAutoscalingLimits} message AutoscalingLimits message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscalingLimits.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.minServeNodes != null && Object.hasOwnProperty.call(message, "minServeNodes")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.minServeNodes); + if (message.maxServeNodes != null && Object.hasOwnProperty.call(message, "maxServeNodes")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxServeNodes); + return writer; + }; + + /** + * Encodes the specified AutoscalingLimits message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.AutoscalingLimits.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {google.bigtable.admin.v2.IAutoscalingLimits} message AutoscalingLimits message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscalingLimits.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoscalingLimits message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.AutoscalingLimits} AutoscalingLimits + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscalingLimits.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.bigtable.admin.v2.AutoscalingLimits(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.minServeNodes = reader.int32(); + break; + case 2: + message.maxServeNodes = reader.int32(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoscalingLimits message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.AutoscalingLimits} AutoscalingLimits + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscalingLimits.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoscalingLimits message. + * @function verify + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoscalingLimits.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.minServeNodes != null && message.hasOwnProperty("minServeNodes")) + if (!$util.isInteger(message.minServeNodes)) + return "minServeNodes: integer expected"; + if (message.maxServeNodes != null && message.hasOwnProperty("maxServeNodes")) + if (!$util.isInteger(message.maxServeNodes)) + return "maxServeNodes: integer expected"; + return null; + }; + + /** + * Creates an AutoscalingLimits message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.AutoscalingLimits} AutoscalingLimits + */ + AutoscalingLimits.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.AutoscalingLimits) + return object; + var message = new $root.google.bigtable.admin.v2.AutoscalingLimits(); + if (object.minServeNodes != null) + message.minServeNodes = object.minServeNodes | 0; + if (object.maxServeNodes != null) + message.maxServeNodes = object.maxServeNodes | 0; + return message; + }; + + /** + * Creates a plain object from an AutoscalingLimits message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @static + * @param {google.bigtable.admin.v2.AutoscalingLimits} message AutoscalingLimits + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoscalingLimits.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.minServeNodes = 0; + object.maxServeNodes = 0; + } + if (message.minServeNodes != null && message.hasOwnProperty("minServeNodes")) + object.minServeNodes = message.minServeNodes; + if (message.maxServeNodes != null && message.hasOwnProperty("maxServeNodes")) + object.maxServeNodes = message.maxServeNodes; + return object; + }; + + /** + * Converts this AutoscalingLimits to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.AutoscalingLimits + * @instance + * @returns {Object.} JSON object + */ + AutoscalingLimits.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AutoscalingLimits; + })(); + + v2.Cluster = (function() { + + /** + * Properties of a Cluster. + * @memberof google.bigtable.admin.v2 + * @interface ICluster + * @property {string|null} [name] Cluster name + * @property {string|null} [location] Cluster location + * @property {google.bigtable.admin.v2.Cluster.State|null} [state] Cluster state + * @property {number|null} [serveNodes] Cluster serveNodes + * @property {google.bigtable.admin.v2.Cluster.IClusterConfig|null} [clusterConfig] Cluster clusterConfig + * @property {google.bigtable.admin.v2.StorageType|null} [defaultStorageType] Cluster defaultStorageType + * @property {google.bigtable.admin.v2.Cluster.IEncryptionConfig|null} [encryptionConfig] Cluster encryptionConfig + */ + + /** + * Constructs a new Cluster. + * @memberof google.bigtable.admin.v2 + * @classdesc Represents a Cluster. + * @implements ICluster + * @constructor + * @param {google.bigtable.admin.v2.ICluster=} [properties] Properties to set + */ + function Cluster(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]]; + } + + /** + * Cluster name. + * @member {string} name + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.name = ""; + + /** + * Cluster location. + * @member {string} location + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.location = ""; + + /** + * Cluster state. + * @member {google.bigtable.admin.v2.Cluster.State} state + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.state = 0; + + /** + * Cluster serveNodes. + * @member {number} serveNodes + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.serveNodes = 0; + + /** + * Cluster clusterConfig. + * @member {google.bigtable.admin.v2.Cluster.IClusterConfig|null|undefined} clusterConfig + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.clusterConfig = null; + + /** + * Cluster defaultStorageType. + * @member {google.bigtable.admin.v2.StorageType} defaultStorageType + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.defaultStorageType = 0; + + /** + * Cluster encryptionConfig. + * @member {google.bigtable.admin.v2.Cluster.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Cluster.prototype.encryptionConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Cluster config. + * @member {"clusterConfig"|undefined} config + * @memberof google.bigtable.admin.v2.Cluster + * @instance + */ + Object.defineProperty(Cluster.prototype, "config", { + get: $util.oneOfGetter($oneOfFields = ["clusterConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Cluster instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {google.bigtable.admin.v2.ICluster=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Cluster} Cluster instance + */ + Cluster.create = function create(properties) { + return new Cluster(properties); + }; + + /** + * Encodes the specified Cluster message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {google.bigtable.admin.v2.ICluster} message Cluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cluster.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.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.location); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.serveNodes != null && Object.hasOwnProperty.call(message, "serveNodes")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.serveNodes); + if (message.defaultStorageType != null && Object.hasOwnProperty.call(message, "defaultStorageType")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.defaultStorageType); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.clusterConfig != null && Object.hasOwnProperty.call(message, "clusterConfig")) + $root.google.bigtable.admin.v2.Cluster.ClusterConfig.encode(message.clusterConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Cluster message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {google.bigtable.admin.v2.ICluster} message Cluster message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Cluster.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Cluster message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Cluster} Cluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cluster.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.bigtable.admin.v2.Cluster(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.name = reader.string(); + break; + case 2: + message.location = reader.string(); + break; + case 3: + message.state = reader.int32(); + break; + case 4: + message.serveNodes = reader.int32(); + break; + case 7: + message.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.decode(reader, reader.uint32()); + break; + case 5: + message.defaultStorageType = reader.int32(); + break; + case 6: + message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Cluster message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Cluster} Cluster + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Cluster.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Cluster message. + * @function verify + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Cluster.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.serveNodes != null && message.hasOwnProperty("serveNodes")) + if (!$util.isInteger(message.serveNodes)) + return "serveNodes: integer expected"; + if (message.clusterConfig != null && message.hasOwnProperty("clusterConfig")) { + properties.config = 1; + { + var error = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.verify(message.clusterConfig); + if (error) + return "clusterConfig." + error; + } + } + if (message.defaultStorageType != null && message.hasOwnProperty("defaultStorageType")) + switch (message.defaultStorageType) { + default: + return "defaultStorageType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + var error = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.verify(message.encryptionConfig); + if (error) + return "encryptionConfig." + error; + } + return null; + }; + + /** + * Creates a Cluster message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Cluster} Cluster + */ + Cluster.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Cluster) + return object; + var message = new $root.google.bigtable.admin.v2.Cluster(); + if (object.name != null) + message.name = String(object.name); + if (object.location != null) + message.location = String(object.location); + switch (object.state) { + case "STATE_NOT_KNOWN": + case 0: + message.state = 0; + break; + case "READY": + case 1: + message.state = 1; + break; + case "CREATING": + case 2: + message.state = 2; + break; + case "RESIZING": + case 3: + message.state = 3; + break; + case "DISABLED": + case 4: + message.state = 4; + break; + } + if (object.serveNodes != null) + message.serveNodes = object.serveNodes | 0; + if (object.clusterConfig != null) { + if (typeof object.clusterConfig !== "object") + throw TypeError(".google.bigtable.admin.v2.Cluster.clusterConfig: object expected"); + message.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.fromObject(object.clusterConfig); + } + switch (object.defaultStorageType) { + case "STORAGE_TYPE_UNSPECIFIED": + case 0: + message.defaultStorageType = 0; + break; + case "SSD": + case 1: + message.defaultStorageType = 1; + break; + case "HDD": + case 2: + message.defaultStorageType = 2; + break; + } + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.bigtable.admin.v2.Cluster.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.fromObject(object.encryptionConfig); + } + return message; + }; + + /** + * Creates a plain object from a Cluster message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Cluster + * @static + * @param {google.bigtable.admin.v2.Cluster} message Cluster + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Cluster.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.location = ""; + object.state = options.enums === String ? "STATE_NOT_KNOWN" : 0; + object.serveNodes = 0; + object.defaultStorageType = options.enums === String ? "STORAGE_TYPE_UNSPECIFIED" : 0; + object.encryptionConfig = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.bigtable.admin.v2.Cluster.State[message.state] : message.state; + if (message.serveNodes != null && message.hasOwnProperty("serveNodes")) + object.serveNodes = message.serveNodes; + if (message.defaultStorageType != null && message.hasOwnProperty("defaultStorageType")) + object.defaultStorageType = options.enums === String ? $root.google.bigtable.admin.v2.StorageType[message.defaultStorageType] : message.defaultStorageType; + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) + object.encryptionConfig = $root.google.bigtable.admin.v2.Cluster.EncryptionConfig.toObject(message.encryptionConfig, options); + if (message.clusterConfig != null && message.hasOwnProperty("clusterConfig")) { + object.clusterConfig = $root.google.bigtable.admin.v2.Cluster.ClusterConfig.toObject(message.clusterConfig, options); + if (options.oneofs) + object.config = "clusterConfig"; + } + return object; + }; + + /** + * Converts this Cluster to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Cluster + * @instance + * @returns {Object.} JSON object + */ + Cluster.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + Cluster.ClusterAutoscalingConfig = (function() { + + /** + * Properties of a ClusterAutoscalingConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @interface IClusterAutoscalingConfig + * @property {google.bigtable.admin.v2.IAutoscalingLimits|null} [autoscalingLimits] ClusterAutoscalingConfig autoscalingLimits + * @property {google.bigtable.admin.v2.IAutoscalingTargets|null} [autoscalingTargets] ClusterAutoscalingConfig autoscalingTargets + */ + + /** + * Constructs a new ClusterAutoscalingConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @classdesc Represents a ClusterAutoscalingConfig. + * @implements IClusterAutoscalingConfig + * @constructor + * @param {google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig=} [properties] Properties to set + */ + function ClusterAutoscalingConfig(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]]; + } + + /** + * ClusterAutoscalingConfig autoscalingLimits. + * @member {google.bigtable.admin.v2.IAutoscalingLimits|null|undefined} autoscalingLimits + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @instance + */ + ClusterAutoscalingConfig.prototype.autoscalingLimits = null; + + /** + * ClusterAutoscalingConfig autoscalingTargets. + * @member {google.bigtable.admin.v2.IAutoscalingTargets|null|undefined} autoscalingTargets + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @instance + */ + ClusterAutoscalingConfig.prototype.autoscalingTargets = null; + + /** + * Creates a new ClusterAutoscalingConfig instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig} ClusterAutoscalingConfig instance + */ + ClusterAutoscalingConfig.create = function create(properties) { + return new ClusterAutoscalingConfig(properties); + }; + + /** + * Encodes the specified ClusterAutoscalingConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig} message ClusterAutoscalingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterAutoscalingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.autoscalingLimits != null && Object.hasOwnProperty.call(message, "autoscalingLimits")) + $root.google.bigtable.admin.v2.AutoscalingLimits.encode(message.autoscalingLimits, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.autoscalingTargets != null && Object.hasOwnProperty.call(message, "autoscalingTargets")) + $root.google.bigtable.admin.v2.AutoscalingTargets.encode(message.autoscalingTargets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClusterAutoscalingConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig} message ClusterAutoscalingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterAutoscalingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClusterAutoscalingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig} ClusterAutoscalingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterAutoscalingConfig.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.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.decode(reader, reader.uint32()); + break; + case 2: + message.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterAutoscalingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig} ClusterAutoscalingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterAutoscalingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterAutoscalingConfig message. + * @function verify + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterAutoscalingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.autoscalingLimits != null && message.hasOwnProperty("autoscalingLimits")) { + var error = $root.google.bigtable.admin.v2.AutoscalingLimits.verify(message.autoscalingLimits); + if (error) + return "autoscalingLimits." + error; + } + if (message.autoscalingTargets != null && message.hasOwnProperty("autoscalingTargets")) { + var error = $root.google.bigtable.admin.v2.AutoscalingTargets.verify(message.autoscalingTargets); + if (error) + return "autoscalingTargets." + error; + } + return null; + }; + + /** + * Creates a ClusterAutoscalingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig} ClusterAutoscalingConfig + */ + ClusterAutoscalingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig) + return object; + var message = new $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig(); + if (object.autoscalingLimits != null) { + if (typeof object.autoscalingLimits !== "object") + throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.autoscalingLimits: object expected"); + message.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.fromObject(object.autoscalingLimits); + } + if (object.autoscalingTargets != null) { + if (typeof object.autoscalingTargets !== "object") + throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.autoscalingTargets: object expected"); + message.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.fromObject(object.autoscalingTargets); + } + return message; + }; + + /** + * Creates a plain object from a ClusterAutoscalingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig} message ClusterAutoscalingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterAutoscalingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.autoscalingLimits = null; + object.autoscalingTargets = null; + } + if (message.autoscalingLimits != null && message.hasOwnProperty("autoscalingLimits")) + object.autoscalingLimits = $root.google.bigtable.admin.v2.AutoscalingLimits.toObject(message.autoscalingLimits, options); + if (message.autoscalingTargets != null && message.hasOwnProperty("autoscalingTargets")) + object.autoscalingTargets = $root.google.bigtable.admin.v2.AutoscalingTargets.toObject(message.autoscalingTargets, options); + return object; + }; + + /** + * Converts this ClusterAutoscalingConfig to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig + * @instance + * @returns {Object.} JSON object + */ + ClusterAutoscalingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClusterAutoscalingConfig; + })(); + + Cluster.ClusterConfig = (function() { + + /** + * Properties of a ClusterConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @interface IClusterConfig + * @property {google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig|null} [clusterAutoscalingConfig] ClusterConfig clusterAutoscalingConfig + */ + + /** + * Constructs a new ClusterConfig. + * @memberof google.bigtable.admin.v2.Cluster + * @classdesc Represents a ClusterConfig. + * @implements IClusterConfig + * @constructor + * @param {google.bigtable.admin.v2.Cluster.IClusterConfig=} [properties] Properties to set + */ + function ClusterConfig(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]]; + } + + /** + * ClusterConfig clusterAutoscalingConfig. + * @member {google.bigtable.admin.v2.Cluster.IClusterAutoscalingConfig|null|undefined} clusterAutoscalingConfig + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @instance + */ + ClusterConfig.prototype.clusterAutoscalingConfig = null; + + /** + * Creates a new ClusterConfig instance using the specified properties. + * @function create + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IClusterConfig=} [properties] Properties to set + * @returns {google.bigtable.admin.v2.Cluster.ClusterConfig} ClusterConfig instance + */ + ClusterConfig.create = function create(properties) { + return new ClusterConfig(properties); + }; + + /** + * Encodes the specified ClusterConfig message. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterConfig.verify|verify} messages. + * @function encode + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IClusterConfig} message ClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.clusterAutoscalingConfig != null && Object.hasOwnProperty.call(message, "clusterAutoscalingConfig")) + $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.encode(message.clusterAutoscalingConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClusterConfig message, length delimited. Does not implicitly {@link google.bigtable.admin.v2.Cluster.ClusterConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.IClusterConfig} message ClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClusterConfig message from the specified reader or buffer. + * @function decode + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.bigtable.admin.v2.Cluster.ClusterConfig} ClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterConfig.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.bigtable.admin.v2.Cluster.ClusterConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClusterConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.bigtable.admin.v2.Cluster.ClusterConfig} ClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClusterConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClusterConfig message. + * @function verify + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClusterConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.clusterAutoscalingConfig != null && message.hasOwnProperty("clusterAutoscalingConfig")) { + var error = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.verify(message.clusterAutoscalingConfig); + if (error) + return "clusterAutoscalingConfig." + error; + } + return null; + }; + + /** + * Creates a ClusterConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {Object.} object Plain object + * @returns {google.bigtable.admin.v2.Cluster.ClusterConfig} ClusterConfig + */ + ClusterConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.bigtable.admin.v2.Cluster.ClusterConfig) + return object; + var message = new $root.google.bigtable.admin.v2.Cluster.ClusterConfig(); + if (object.clusterAutoscalingConfig != null) { + if (typeof object.clusterAutoscalingConfig !== "object") + throw TypeError(".google.bigtable.admin.v2.Cluster.ClusterConfig.clusterAutoscalingConfig: object expected"); + message.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.fromObject(object.clusterAutoscalingConfig); + } + return message; + }; + + /** + * Creates a plain object from a ClusterConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @static + * @param {google.bigtable.admin.v2.Cluster.ClusterConfig} message ClusterConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClusterConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.clusterAutoscalingConfig = null; + if (message.clusterAutoscalingConfig != null && message.hasOwnProperty("clusterAutoscalingConfig")) + object.clusterAutoscalingConfig = $root.google.bigtable.admin.v2.Cluster.ClusterAutoscalingConfig.toObject(message.clusterAutoscalingConfig, options); + return object; + }; + + /** + * Converts this ClusterConfig to JSON. + * @function toJSON + * @memberof google.bigtable.admin.v2.Cluster.ClusterConfig + * @instance + * @returns {Object.} JSON object + */ + ClusterConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return ClusterConfig; + })(); + Cluster.EncryptionConfig = (function() { /** diff --git a/protos/protos.json b/protos/protos.json index 84584b1ab..cccbe144a 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -239,6 +239,34 @@ } ] }, + "PartialUpdateCluster": { + "requestType": "PartialUpdateClusterRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v2/{cluster.name=projects/*/instances/*/clusters/*}", + "(google.api.http).body": "cluster", + "(google.api.method_signature)": "cluster,update_mask", + "(google.longrunning.operation_info).response_type": "Cluster", + "(google.longrunning.operation_info).metadata_type": "PartialUpdateClusterMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v2/{cluster.name=projects/*/instances/*/clusters/*}", + "body": "cluster" + } + }, + { + "(google.api.method_signature)": "cluster,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Cluster", + "metadata_type": "PartialUpdateClusterMetadata" + } + } + ] + }, "DeleteCluster": { "requestType": "DeleteClusterRequest", "responseType": "google.protobuf.Empty", @@ -679,6 +707,40 @@ } } }, + "PartialUpdateClusterMetadata": { + "fields": { + "requestTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "finishTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "originalRequest": { + "type": "PartialUpdateClusterRequest", + "id": 3 + } + } + }, + "PartialUpdateClusterRequest": { + "fields": { + "cluster": { + "type": "Cluster", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "CreateAppProfileRequest": { "fields": { "parent": { @@ -861,11 +923,44 @@ } } }, + "AutoscalingTargets": { + "fields": { + "cpuUtilizationPercent": { + "type": "int32", + "id": 2 + } + } + }, + "AutoscalingLimits": { + "fields": { + "minServeNodes": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "maxServeNodes": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "Cluster": { "options": { "(google.api.resource).type": "bigtableadmin.googleapis.com/Cluster", "(google.api.resource).pattern": "projects/{project}/instances/{instance}/clusters/{cluster}" }, + "oneofs": { + "config": { + "oneof": [ + "clusterConfig" + ] + } + }, "fields": { "name": { "type": "string", @@ -890,10 +985,11 @@ }, "serveNodes": { "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } + "id": 4 + }, + "clusterConfig": { + "type": "ClusterConfig", + "id": 7 }, "defaultStorageType": { "type": "StorageType", @@ -908,6 +1004,32 @@ } }, "nested": { + "ClusterAutoscalingConfig": { + "fields": { + "autoscalingLimits": { + "type": "AutoscalingLimits", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "autoscalingTargets": { + "type": "AutoscalingTargets", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ClusterConfig": { + "fields": { + "clusterAutoscalingConfig": { + "type": "ClusterAutoscalingConfig", + "id": 1 + } + } + }, "EncryptionConfig": { "fields": { "kmsKeyName": { diff --git a/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js b/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js new file mode 100644 index 000000000..1feb933ab --- /dev/null +++ b/samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js @@ -0,0 +1,59 @@ +// Copyright 2021 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. + +'use strict'; + +function main(cluster, updateMask) { + // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async] + /** + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The Cluster which contains the partial updates to be applied, subject to + * the update_mask. + */ + // const cluster = {} + /** + * Required. The subset of Cluster fields which should be replaced. + */ + // const updateMask = {} + + // Imports the Admin library + const {BigtableInstanceAdminClient} = require('@google-cloud/bigtable').v2; + + // Instantiates a client + const adminClient = new BigtableInstanceAdminClient(); + + async function callPartialUpdateCluster() { + // Construct request + const request = { + cluster, + updateMask, + }; + + // Run request + const [operation] = await adminClient.partialUpdateCluster(request); + const [response] = await operation.promise(); + console.log(response); + } + + callPartialUpdateCluster(); + // [END bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/samples/generated/v2/bigtable_instance_admin.update_cluster.js b/samples/generated/v2/bigtable_instance_admin.update_cluster.js index d63c3000b..78366e6c1 100644 --- a/samples/generated/v2/bigtable_instance_admin.update_cluster.js +++ b/samples/generated/v2/bigtable_instance_admin.update_cluster.js @@ -14,7 +14,7 @@ 'use strict'; -function main(name, state, serveNodes, encryptionConfig) { +function main(name, state, encryptionConfig) { // [START bigtableadmin_v2_generated_BigtableInstanceAdmin_UpdateCluster_async] /** * TODO(developer): Uncomment these variables before running the sample. @@ -37,10 +37,14 @@ function main(name, state, serveNodes, encryptionConfig) { */ // const state = {} /** - * Required. The number of nodes allocated to this cluster. More nodes enable - * higher throughput and more consistent performance. + * The number of nodes allocated to this cluster. More nodes enable higher + * throughput and more consistent performance. */ // const serveNodes = 1234 + /** + * Configuration for this cluster. + */ + // const clusterConfig = {} /** * (`CreationOnly`) * The type of storage used by this cluster to serve its @@ -63,7 +67,6 @@ function main(name, state, serveNodes, encryptionConfig) { const request = { name, state, - serveNodes, encryptionConfig, }; diff --git a/src/v2/bigtable_instance_admin_client.ts b/src/v2/bigtable_instance_admin_client.ts index a3c67288e..c2ec98235 100644 --- a/src/v2/bigtable_instance_admin_client.ts +++ b/src/v2/bigtable_instance_admin_client.ts @@ -239,6 +239,12 @@ export class BigtableInstanceAdminClient { const updateClusterMetadata = protoFilesRoot.lookup( '.google.bigtable.admin.v2.UpdateClusterMetadata' ) as gax.protobuf.Type; + const partialUpdateClusterResponse = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.Cluster' + ) as gax.protobuf.Type; + const partialUpdateClusterMetadata = protoFilesRoot.lookup( + '.google.bigtable.admin.v2.PartialUpdateClusterMetadata' + ) as gax.protobuf.Type; const updateAppProfileResponse = protoFilesRoot.lookup( '.google.bigtable.admin.v2.AppProfile' ) as gax.protobuf.Type; @@ -269,6 +275,11 @@ export class BigtableInstanceAdminClient { updateClusterResponse.decode.bind(updateClusterResponse), updateClusterMetadata.decode.bind(updateClusterMetadata) ), + partialUpdateCluster: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + partialUpdateClusterResponse.decode.bind(partialUpdateClusterResponse), + partialUpdateClusterMetadata.decode.bind(partialUpdateClusterMetadata) + ), updateAppProfile: new this._gaxModule.LongrunningDescriptor( this.operationsClient, updateAppProfileResponse.decode.bind(updateAppProfileResponse), @@ -336,6 +347,7 @@ export class BigtableInstanceAdminClient { 'getCluster', 'listClusters', 'updateCluster', + 'partialUpdateCluster', 'deleteCluster', 'createAppProfile', 'getAppProfile', @@ -1622,6 +1634,12 @@ export class BigtableInstanceAdminClient { /** * Create an instance within a project. * + * Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If + * serve_nodes is set to non-zero, then the cluster is manually scaled. If + * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is + * enabled. + * * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -1914,6 +1932,12 @@ export class BigtableInstanceAdminClient { /** * Creates a cluster within an instance. * + * Note that exactly one of Cluster.serve_nodes and + * Cluster.cluster_config.cluster_autoscaling_config can be set. If + * serve_nodes is set to non-zero, then the cluster is manually scaled. If + * cluster_config.cluster_autoscaling_config is non-empty, then autoscaling is + * enabled. + * * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -2060,6 +2084,10 @@ export class BigtableInstanceAdminClient { /** * Updates a cluster within an instance. * + * Note that UpdateCluster does not support updating + * cluster_config.cluster_autoscaling_config. In order to update it, you + * must use PartialUpdateCluster. + * * @param {Object} request * The request object that will be sent. * @param {string} request.name @@ -2074,8 +2102,10 @@ export class BigtableInstanceAdminClient { * @param {google.bigtable.admin.v2.Cluster.State} request.state * The current state of the cluster. * @param {number} request.serveNodes - * Required. The number of nodes allocated to this cluster. More nodes enable - * higher throughput and more consistent performance. + * The number of nodes allocated to this cluster. More nodes enable higher + * throughput and more consistent performance. + * @param {google.bigtable.admin.v2.Cluster.ClusterConfig} request.clusterConfig + * Configuration for this cluster. * @param {google.bigtable.admin.v2.StorageType} request.defaultStorageType * (`CreationOnly`) * The type of storage used by this cluster to serve its @@ -2212,6 +2242,157 @@ export class BigtableInstanceAdminClient { protos.google.bigtable.admin.v2.UpdateClusterMetadata >; } + /** + * Partially updates a cluster within a project. This method is the preferred + * way to update a Cluster. + * + * To enable and update autoscaling, set + * cluster_config.cluster_autoscaling_config. When autoscaling is enabled, + * serve_nodes is treated as an OUTPUT_ONLY field, meaning that updates to it + * are ignored. Note that an update cannot simultaneously set serve_nodes to + * non-zero and cluster_config.cluster_autoscaling_config to non-empty, and + * also specify both in the update_mask. + * + * To disable autoscaling, clear cluster_config.cluster_autoscaling_config, + * and explicitly set a serve_node count via the update_mask. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.bigtable.admin.v2.Cluster} request.cluster + * Required. The Cluster which contains the partial updates to be applied, subject to + * the update_mask. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The subset of Cluster fields which should be replaced. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async + */ + partialUpdateCluster( + request?: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + partialUpdateCluster( + request: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + partialUpdateCluster( + request: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, + callback: Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + partialUpdateCluster( + request?: protos.google.bigtable.admin.v2.IPartialUpdateClusterRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >, + 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'] = + gax.routingHeader.fromParams({ + 'cluster.name': request.cluster!.name || '', + }); + this.initialize(); + return this.innerApiCalls.partialUpdateCluster(request, options, callback); + } + /** + * Check the status of the long running operation returned by `partialUpdateCluster()`. + * @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 + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v2/bigtable_instance_admin.partial_update_cluster.js + * region_tag:bigtableadmin_v2_generated_BigtableInstanceAdmin_PartialUpdateCluster_async + */ + async checkPartialUpdateClusterProgress( + name: string + ): Promise< + LROperation< + protos.google.bigtable.admin.v2.Cluster, + protos.google.bigtable.admin.v2.PartialUpdateClusterMetadata + > + > { + const request = new operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new gax.Operation( + operation, + this.descriptors.longrunning.partialUpdateCluster, + gax.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.bigtable.admin.v2.Cluster, + protos.google.bigtable.admin.v2.PartialUpdateClusterMetadata + >; + } /** * Updates an app profile within an instance. * diff --git a/src/v2/bigtable_instance_admin_client_config.json b/src/v2/bigtable_instance_admin_client_config.json index 2f6b84535..535ce9372 100644 --- a/src/v2/bigtable_instance_admin_client_config.json +++ b/src/v2/bigtable_instance_admin_client_config.json @@ -79,6 +79,11 @@ "retry_codes_name": "idempotent", "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" }, + "PartialUpdateCluster": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent", + "retry_params_name": "264268458a9e88347dbacbd9398202ff5885a40b" + }, "DeleteCluster": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", diff --git a/src/v2/gapic_metadata.json b/src/v2/gapic_metadata.json index 7c0177a6c..f53c67d90 100644 --- a/src/v2/gapic_metadata.json +++ b/src/v2/gapic_metadata.json @@ -95,6 +95,11 @@ "updateCluster" ] }, + "PartialUpdateCluster": { + "methods": [ + "partialUpdateCluster" + ] + }, "UpdateAppProfile": { "methods": [ "updateAppProfile" @@ -197,6 +202,11 @@ "updateCluster" ] }, + "PartialUpdateCluster": { + "methods": [ + "partialUpdateCluster" + ] + }, "UpdateAppProfile": { "methods": [ "updateAppProfile" diff --git a/test/gapic_bigtable_instance_admin_v2.ts b/test/gapic_bigtable_instance_admin_v2.ts index 4ed8b8942..c48f8d358 100644 --- a/test/gapic_bigtable_instance_admin_v2.ts +++ b/test/gapic_bigtable_instance_admin_v2.ts @@ -2524,6 +2524,210 @@ describe('v2.BigtableInstanceAdminClient', () => { }); }); + describe('partialUpdateCluster', () => { + it('invokes partialUpdateCluster without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.PartialUpdateClusterRequest() + ); + request.cluster = {}; + request.cluster.name = ''; + const expectedHeaderRequestParams = 'cluster.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.partialUpdateCluster = + stubLongRunningCall(expectedResponse); + const [operation] = await client.partialUpdateCluster(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.partialUpdateCluster as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes partialUpdateCluster without error using callback', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.PartialUpdateClusterRequest() + ); + request.cluster = {}; + request.cluster.name = ''; + const expectedHeaderRequestParams = 'cluster.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.partialUpdateCluster = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.partialUpdateCluster( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.bigtable.admin.v2.ICluster, + protos.google.bigtable.admin.v2.IPartialUpdateClusterMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + assert( + (client.innerApiCalls.partialUpdateCluster as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions /*, callback defined above */) + ); + }); + + it('invokes partialUpdateCluster with call error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.PartialUpdateClusterRequest() + ); + request.cluster = {}; + request.cluster.name = ''; + const expectedHeaderRequestParams = 'cluster.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.partialUpdateCluster = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.partialUpdateCluster(request), expectedError); + assert( + (client.innerApiCalls.partialUpdateCluster as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes partialUpdateCluster with LRO error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.bigtable.admin.v2.PartialUpdateClusterRequest() + ); + request.cluster = {}; + request.cluster.name = ''; + const expectedHeaderRequestParams = 'cluster.name='; + const expectedOptions = { + otherArgs: { + headers: { + 'x-goog-request-params': expectedHeaderRequestParams, + }, + }, + }; + const expectedError = new Error('expected'); + client.innerApiCalls.partialUpdateCluster = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.partialUpdateCluster(request); + await assert.rejects(operation.promise(), expectedError); + assert( + (client.innerApiCalls.partialUpdateCluster as SinonStub) + .getCall(0) + .calledWith(request, expectedOptions, undefined) + ); + }); + + it('invokes checkPartialUpdateClusterProgress without error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkPartialUpdateClusterProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkPartialUpdateClusterProgress with error', async () => { + const client = + new bigtableinstanceadminModule.v2.BigtableInstanceAdminClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkPartialUpdateClusterProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('updateAppProfile', () => { it('invokes updateAppProfile without error', async () => { const client =