diff --git a/.jsdoc.js b/.jsdoc.js index fa936266d..b9d1cc7e7 100644 --- a/.jsdoc.js +++ b/.jsdoc.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -40,7 +40,7 @@ module.exports = { includePattern: '\\.js$' }, templates: { - copyright: 'Copyright 2024 Google LLC', + copyright: 'Copyright 2025 Google LLC', includeDate: false, sourceFiles: false, systemName: '@google-cloud/spanner', diff --git a/protos/google/spanner/admin/instance/v1/common.proto b/protos/google/spanner/admin/instance/v1/common.proto index 69717ec22..11e00368c 100644 --- a/protos/google/spanner/admin/instance/v1/common.proto +++ b/protos/google/spanner/admin/instance/v1/common.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.spanner.admin.instance.v1; import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Spanner.Admin.Instance.V1"; diff --git a/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto b/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto index ba6726b31..615a86c6f 100644 --- a/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +++ b/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto @@ -64,6 +64,9 @@ service InstanceAdmin { "https://www.googleapis.com/auth/spanner.admin"; // Lists the supported instance configurations for a given project. + // + // Returns both Google-managed configurations and user-managed + // configurations. rpc ListInstanceConfigs(ListInstanceConfigsRequest) returns (ListInstanceConfigsResponse) { option (google.api.http) = { @@ -81,7 +84,7 @@ service InstanceAdmin { } // Creates an instance configuration and begins preparing it to be used. The - // returned [long-running operation][google.longrunning.Operation] + // returned long-running operation // can be used to track the progress of preparing the new // instance configuration. The instance configuration name is assigned by the // caller. If the named instance configuration already exists, @@ -108,13 +111,13 @@ service InstanceAdmin { // [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] // field becomes false. Its state becomes `READY`. // - // The returned [long-running operation][google.longrunning.Operation] will + // The returned long-running operation will // have a name of the format // `/operations/` and can be used to track // creation of the instance configuration. The - // [metadata][google.longrunning.Operation.metadata] field type is + // metadata field type is // [CreateInstanceConfigMetadata][google.spanner.admin.instance.v1.CreateInstanceConfigMetadata]. - // The [response][google.longrunning.Operation.response] field type is + // The response field type is // [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if // successful. // @@ -136,7 +139,7 @@ service InstanceAdmin { } // Updates an instance configuration. The returned - // [long-running operation][google.longrunning.Operation] can be used to track + // long-running operation can be used to track // the progress of updating the instance. If the named instance configuration // does not exist, returns `NOT_FOUND`. // @@ -167,13 +170,13 @@ service InstanceAdmin { // [reconciling][google.spanner.admin.instance.v1.InstanceConfig.reconciling] // field becomes false. // - // The returned [long-running operation][google.longrunning.Operation] will + // The returned long-running operation will // have a name of the format // `/operations/` and can be used to track // the instance configuration modification. The - // [metadata][google.longrunning.Operation.metadata] field type is + // metadata field type is // [UpdateInstanceConfigMetadata][google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata]. - // The [response][google.longrunning.Operation.response] field type is + // The response field type is // [InstanceConfig][google.spanner.admin.instance.v1.InstanceConfig], if // successful. // @@ -208,12 +211,12 @@ service InstanceAdmin { option (google.api.method_signature) = "name"; } - // Lists the user-managed instance configuration [long-running - // operations][google.longrunning.Operation] in the given project. An instance + // Lists the user-managed instance configuration long-running + // operations in the given project. An instance // configuration operation has a name of the form // `projects//instanceConfigs//operations/`. // The long-running operation - // [metadata][google.longrunning.Operation.metadata] field type + // metadata field type // `metadata.type_url` describes the type of the metadata. Operations returned // include those that have completed/failed/canceled within the last 7 days, // and pending operations. Operations returned are ordered by @@ -253,7 +256,7 @@ service InstanceAdmin { } // Creates an instance and begins preparing it to begin serving. The - // returned [long-running operation][google.longrunning.Operation] + // returned long-running operation // can be used to track the progress of preparing the new // instance. The instance name is assigned by the caller. If the // named instance already exists, `CreateInstance` returns @@ -279,12 +282,12 @@ service InstanceAdmin { // * The instance's allocated resource levels are readable via the API. // * The instance's state becomes `READY`. // - // The returned [long-running operation][google.longrunning.Operation] will + // The returned long-running operation will // have a name of the format `/operations/` and // can be used to track creation of the instance. The - // [metadata][google.longrunning.Operation.metadata] field type is + // metadata field type is // [CreateInstanceMetadata][google.spanner.admin.instance.v1.CreateInstanceMetadata]. - // The [response][google.longrunning.Operation.response] field type is + // The response field type is // [Instance][google.spanner.admin.instance.v1.Instance], if successful. rpc CreateInstance(CreateInstanceRequest) returns (google.longrunning.Operation) { @@ -300,8 +303,7 @@ service InstanceAdmin { } // Updates an instance, and begins allocating or releasing resources - // as requested. The returned [long-running - // operation][google.longrunning.Operation] can be used to track the + // as requested. The returned long-running operation can be used to track the // progress of updating the instance. If the named instance does not // exist, returns `NOT_FOUND`. // @@ -329,12 +331,12 @@ service InstanceAdmin { // tables. // * The instance's new resource levels are readable via the API. // - // The returned [long-running operation][google.longrunning.Operation] will + // The returned long-running operation will // have a name of the format `/operations/` and // can be used to track the instance modification. The - // [metadata][google.longrunning.Operation.metadata] field type is + // metadata field type is // [UpdateInstanceMetadata][google.spanner.admin.instance.v1.UpdateInstanceMetadata]. - // The [response][google.longrunning.Operation.response] field type is + // The response field type is // [Instance][google.spanner.admin.instance.v1.Instance], if successful. // // Authorization requires `spanner.instances.update` permission on @@ -423,7 +425,7 @@ service InstanceAdmin { } // Creates an instance partition and begins preparing it to be used. The - // returned [long-running operation][google.longrunning.Operation] + // returned long-running operation // can be used to track the progress of preparing the new instance partition. // The instance partition name is assigned by the caller. If the named // instance partition already exists, `CreateInstancePartition` returns @@ -450,13 +452,13 @@ service InstanceAdmin { // API. // * The instance partition's state becomes `READY`. // - // The returned [long-running operation][google.longrunning.Operation] will + // The returned long-running operation will // have a name of the format // `/operations/` and can be used to // track creation of the instance partition. The - // [metadata][google.longrunning.Operation.metadata] field type is + // metadata field type is // [CreateInstancePartitionMetadata][google.spanner.admin.instance.v1.CreateInstancePartitionMetadata]. - // The [response][google.longrunning.Operation.response] field type is + // The response field type is // [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if // successful. rpc CreateInstancePartition(CreateInstancePartitionRequest) @@ -489,8 +491,7 @@ service InstanceAdmin { } // Updates an instance partition, and begins allocating or releasing resources - // as requested. The returned [long-running - // operation][google.longrunning.Operation] can be used to track the + // as requested. The returned long-running operation can be used to track the // progress of updating the instance partition. If the named instance // partition does not exist, returns `NOT_FOUND`. // @@ -519,13 +520,13 @@ service InstanceAdmin { // partition's tables. // * The instance partition's new resource levels are readable via the API. // - // The returned [long-running operation][google.longrunning.Operation] will + // The returned long-running operation will // have a name of the format // `/operations/` and can be used to // track the instance partition modification. The - // [metadata][google.longrunning.Operation.metadata] field type is + // metadata field type is // [UpdateInstancePartitionMetadata][google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata]. - // The [response][google.longrunning.Operation.response] field type is + // The response field type is // [InstancePartition][google.spanner.admin.instance.v1.InstancePartition], if // successful. // @@ -545,12 +546,11 @@ service InstanceAdmin { }; } - // Lists instance partition [long-running - // operations][google.longrunning.Operation] in the given instance. + // Lists instance partition long-running operations in the given instance. // An instance partition operation has a name of the form // `projects//instances//instancePartitions//operations/`. // The long-running operation - // [metadata][google.longrunning.Operation.metadata] field type + // metadata field type // `metadata.type_url` describes the type of the metadata. Operations returned // include those that have completed/failed/canceled within the last 7 days, // and pending operations. Operations returned are ordered by @@ -569,7 +569,7 @@ service InstanceAdmin { } // Moves an instance to the target instance configuration. You can use the - // returned [long-running operation][google.longrunning.Operation] to track + // returned long-running operation to track // the progress of moving the instance. // // `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of @@ -600,13 +600,13 @@ service InstanceAdmin { // transaction abort rate. However, moving an instance doesn't cause any // downtime. // - // The returned [long-running operation][google.longrunning.Operation] has + // The returned long-running operation has // a name of the format // `/operations/` and can be used to track // the move instance operation. The - // [metadata][google.longrunning.Operation.metadata] field type is + // metadata field type is // [MoveInstanceMetadata][google.spanner.admin.instance.v1.MoveInstanceMetadata]. - // The [response][google.longrunning.Operation.response] field type is + // The response field type is // [Instance][google.spanner.admin.instance.v1.Instance], // if successful. // Cancelling the operation sets its metadata's @@ -676,7 +676,7 @@ message ReplicaInfo { WITNESS = 3; } - // The location of the serving resources, e.g. "us-central1". + // The location of the serving resources, e.g., "us-central1". string location = 1; // The type of replica. @@ -695,6 +695,8 @@ message InstanceConfig { option (google.api.resource) = { type: "spanner.googleapis.com/InstanceConfig" pattern: "projects/{project}/instanceConfigs/{instance_config}" + plural: "instanceConfigs" + singular: "instanceConfig" }; // The type of this configuration. @@ -702,10 +704,10 @@ message InstanceConfig { // Unspecified. TYPE_UNSPECIFIED = 0; - // Google managed configuration. + // Google-managed configuration. GOOGLE_MANAGED = 1; - // User managed configuration. + // User-managed configuration. USER_MANAGED = 2; } @@ -722,6 +724,53 @@ message InstanceConfig { READY = 2; } + // Describes the availability for free instances to be created in an instance + // configuration. + enum FreeInstanceAvailability { + // Not specified. + FREE_INSTANCE_AVAILABILITY_UNSPECIFIED = 0; + + // Indicates that free instances are available to be created in this + // instance configuration. + AVAILABLE = 1; + + // Indicates that free instances are not supported in this instance + // configuration. + UNSUPPORTED = 2; + + // Indicates that free instances are currently not available to be created + // in this instance configuration. + DISABLED = 3; + + // Indicates that additional free instances cannot be created in this + // instance configuration because the project has reached its limit of free + // instances. + QUOTA_EXCEEDED = 4; + } + + // Indicates the quorum type of this instance configuration. + enum QuorumType { + // Quorum type not specified. + QUORUM_TYPE_UNSPECIFIED = 0; + + // An instance configuration tagged with `REGION` quorum type forms a write + // quorum in a single region. + REGION = 1; + + // An instance configuration tagged with the `DUAL_REGION` quorum type forms + // a write quorum with exactly two read-write regions in a multi-region + // configuration. + // + // This instance configuration requires failover in the event of + // regional failures. + DUAL_REGION = 2; + + // An instance configuration tagged with the `MULTI_REGION` quorum type + // forms a write quorum from replicas that are spread across more than one + // region in a multi-region configuration. + MULTI_REGION = 3; + } + // A unique identifier for the instance configuration. Values // are of the form // `projects//instanceConfigs/[a-z][-a-z0-9]*`. @@ -738,17 +787,22 @@ message InstanceConfig { // The geographic placement of nodes in this instance configuration and their // replication properties. + // + // To create user-managed configurations, input + // `replicas` must include all replicas in `replicas` of the `base_config` + // and include one or more replicas in the `optional_replicas` of the + // `base_config`. repeated ReplicaInfo replicas = 3; - // Output only. The available optional replicas to choose from for user - // managed configurations. Populated for Google managed configurations. + // Output only. The available optional replicas to choose from for + // user-managed configurations. Populated for Google-managed configurations. repeated ReplicaInfo optional_replicas = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; // Base configuration name, e.g. projects//instanceConfigs/nam3, - // based on which this configuration is created. Only set for user managed + // based on which this configuration is created. Only set for user-managed // configurations. `base_config` must refer to a configuration of type - // GOOGLE_MANAGED in the same project as this configuration. + // `GOOGLE_MANAGED` in the same project as this configuration. string base_config = 7 [(google.api.resource_reference) = { type: "spanner.googleapis.com/InstanceConfig" }]; @@ -801,6 +855,18 @@ message InstanceConfig { // Output only. The current instance configuration state. Applicable only for // `USER_MANAGED` configurations. State state = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Describes whether free instances are available to be created + // in this instance configuration. + FreeInstanceAvailability free_instance_availability = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The `QuorumType` of the instance configuration. + QuorumType quorum_type = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The storage limit in bytes per processing unit. + int64 storage_limit_per_processing_unit = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // ReplicaComputeCapacity describes the amount of server resources that are @@ -877,7 +943,7 @@ message AutoscalingConfig { // Required. The target storage utilization percentage that the autoscaler // should be trying to achieve for the instance. This number is on a scale // from 0 (no utilization) to 100 (full utilization). The valid range is - // [10, 100] inclusive. + // [10, 99] inclusive. int32 storage_utilization_percent = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -939,6 +1005,8 @@ message Instance { option (google.api.resource) = { type: "spanner.googleapis.com/Instance" pattern: "projects/{project}/instances/{instance}" + plural: "instances" + singular: "instance" }; // Indicates the current state of the instance. @@ -956,6 +1024,24 @@ message Instance { READY = 2; } + // The type of this instance. The type can be used to distinguish product + // variants, that can affect aspects like: usage restrictions, quotas and + // billing. Currently this is used to distinguish FREE_INSTANCE vs PROVISIONED + // instances. + enum InstanceType { + // Not specified. + INSTANCE_TYPE_UNSPECIFIED = 0; + + // Provisioned instances have dedicated resources, standard usage limits and + // support. + PROVISIONED = 1; + + // Free instances provide no guarantee for dedicated resources, + // [node_count, processing_units] should be 0. They come + // with stricter usage limits and limited support. + FREE_INSTANCE = 2; + } + // The edition selected for this instance. Different editions provide // different capabilities at different price points. enum Edition { @@ -972,21 +1058,22 @@ message Instance { ENTERPRISE_PLUS = 3; } - // Indicates the default backup behavior for new databases within the - // instance. + // Indicates the + // [default backup + // schedule](https://cloud.google.com/spanner/docs/backup#default-backup-schedules) + // behavior for new databases within the instance. enum DefaultBackupScheduleType { // Not specified. DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED = 0; - // No default backup schedule will be created automatically on creation of a - // database within the instance. + // A default backup schedule isn't created automatically when a new database + // is created in the instance. NONE = 1; - // A default backup schedule will be created automatically on creation of a - // database within the instance. The default backup schedule creates a full - // backup every 24 hours and retains the backup for a period of 7 days. Once - // created, the default backup schedule can be edited/deleted similar to any - // other backup schedule. + // A default backup schedule is created automatically when a new database + // is created in the instance. The default backup schedule creates a full + // backup every 24 hours. These full backups are retained for 7 days. + // You can edit or delete the default backup schedule once it's created. AUTOMATIC = 2; } @@ -1023,9 +1110,6 @@ message Instance { // This might be zero in API responses for instances that are not yet in the // `READY` state. // - // If the instance has varying node count across replicas (achieved by - // setting asymmetric_autoscaling_options in autoscaling config), the - // node_count here is the maximum node count across all replicas. // // For more information, see // [Compute capacity, nodes, and processing @@ -1045,10 +1129,6 @@ message Instance { // This might be zero in API responses for instances that are not yet in the // `READY` state. // - // If the instance has varying processing units per replica - // (achieved by setting asymmetric_autoscaling_options in autoscaling config), - // the processing_units here is the maximum processing units across all - // replicas. // // For more information, see // [Compute capacity, nodes and processing @@ -1098,6 +1178,9 @@ message Instance { // allow "_" in a future release. map labels = 7; + // The `InstanceType` of the current instance. + InstanceType instance_type = 10; + // Deprecated. This field is not populated. repeated string endpoint_uris = 8; @@ -1109,18 +1192,22 @@ message Instance { google.protobuf.Timestamp update_time = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Free instance metadata. Only populated for free instances. + FreeInstanceMetadata free_instance_metadata = 13; + // Optional. The `Edition` of the current instance. Edition edition = 20 [(google.api.field_behavior) = OPTIONAL]; - // Optional. Controls the default backup behavior for new databases within the - // instance. + // Optional. Controls the default backup schedule behavior for new databases + // within the instance. By default, a backup schedule is created automatically + // when a new database is created in a new instance. // - // Note that `AUTOMATIC` is not permitted for free instances, as backups and - // backup schedules are not allowed for free instances. + // Note that the `AUTOMATIC` value isn't permitted for free instances, + // as backups and backup schedules aren't supported for free instances. // // In the `GetInstance` or `ListInstances` response, if the value of - // default_backup_schedule_type is unset or NONE, no default backup - // schedule will be created for new databases within the instance. + // `default_backup_schedule_type` isn't set, or set to `NONE`, Spanner doesn't + // create a default backup schedule for new databases in the instance. DefaultBackupScheduleType default_backup_schedule_type = 23 [(google.api.field_behavior) = OPTIONAL]; } @@ -1175,7 +1262,7 @@ message GetInstanceConfigRequest { } // The request for -// [CreateInstanceConfigRequest][InstanceAdmin.CreateInstanceConfigRequest]. +// [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig]. message CreateInstanceConfigRequest { // Required. The name of the project in which to create the instance // configuration. Values are of the form `projects/`. @@ -1192,10 +1279,10 @@ message CreateInstanceConfigRequest { // conflicts with Google-managed configurations. string instance_config_id = 2 [(google.api.field_behavior) = REQUIRED]; - // Required. The InstanceConfig proto of the configuration to create. - // instance_config.name must be + // Required. The `InstanceConfig` proto of the configuration to create. + // `instance_config.name` must be // `/instanceConfigs/`. - // instance_config.base_config must be a Google managed configuration name, + // `instance_config.base_config` must be a Google-managed configuration name, // e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3. InstanceConfig instance_config = 3 [(google.api.field_behavior) = REQUIRED]; @@ -1205,7 +1292,7 @@ message CreateInstanceConfigRequest { } // The request for -// [UpdateInstanceConfigRequest][InstanceAdmin.UpdateInstanceConfigRequest]. +// [UpdateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.UpdateInstanceConfig]. message UpdateInstanceConfigRequest { // Required. The user instance configuration to update, which must always // include the instance configuration name. Otherwise, only fields mentioned @@ -1231,7 +1318,7 @@ message UpdateInstanceConfigRequest { } // The request for -// [DeleteInstanceConfigRequest][InstanceAdmin.DeleteInstanceConfigRequest]. +// [DeleteInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.DeleteInstanceConfig]. message DeleteInstanceConfigRequest { // Required. The name of the instance configuration to be deleted. // Values are of the form @@ -1277,8 +1364,7 @@ message ListInstanceConfigOperationsRequest { // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. // Colon `:` is the contains operator. Filter rules are not case sensitive. // - // The following fields in the [Operation][google.longrunning.Operation] - // are eligible for filtering: + // The following fields in the Operation are eligible for filtering: // // * `name` - The name of the long-running operation // * `done` - False if the operation is in progress, else true. @@ -1329,10 +1415,10 @@ message ListInstanceConfigOperationsRequest { // The response for // [ListInstanceConfigOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstanceConfigOperations]. message ListInstanceConfigOperationsResponse { - // The list of matching instance configuration [long-running - // operations][google.longrunning.Operation]. Each operation's name will be + // The list of matching instance configuration long-running operations. Each + // operation's name will be // prefixed by the name of the instance configuration. The operation's - // [metadata][google.longrunning.Operation.metadata] field type + // metadata field type // `metadata.type_url` describes the type of the metadata. repeated google.longrunning.Operation operations = 1; @@ -1530,6 +1616,41 @@ message UpdateInstanceMetadata { FulfillmentPeriod expected_fulfillment_period = 5; } +// Free instance specific metadata that is kept even after an instance has been +// upgraded for tracking purposes. +message FreeInstanceMetadata { + // Allows users to change behavior when a free instance expires. + enum ExpireBehavior { + // Not specified. + EXPIRE_BEHAVIOR_UNSPECIFIED = 0; + + // When the free instance expires, upgrade the instance to a provisioned + // instance. + FREE_TO_PROVISIONED = 1; + + // When the free instance expires, disable the instance, and delete it + // after the grace period passes if it has not been upgraded. + REMOVE_AFTER_GRACE_PERIOD = 2; + } + + // Output only. Timestamp after which the instance will either be upgraded or + // scheduled for deletion after a grace period. ExpireBehavior is used to + // choose between upgrading or scheduling the free instance for deletion. This + // timestamp is set during the creation of a free instance. + google.protobuf.Timestamp expire_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. If present, the timestamp at which the free instance was + // upgraded to a provisioned instance. + google.protobuf.Timestamp upgrade_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Specifies the expiration behavior of a free instance. The default of + // ExpireBehavior is `REMOVE_AFTER_GRACE_PERIOD`. This can be modified during + // or after creation, and before expiration. + ExpireBehavior expire_behavior = 3; +} + // Metadata type for the operation returned by // [CreateInstanceConfig][google.spanner.admin.instance.v1.InstanceAdmin.CreateInstanceConfig]. message CreateInstanceConfigMetadata { @@ -1566,6 +1687,8 @@ message InstancePartition { option (google.api.resource) = { type: "spanner.googleapis.com/InstancePartition" pattern: "projects/{project}/instances/{instance}/instancePartitions/{instance_partition}" + plural: "instancePartitions" + singular: "instancePartition" }; // Indicates the current state of the instance partition. @@ -1607,15 +1730,16 @@ message InstancePartition { string display_name = 3 [(google.api.field_behavior) = REQUIRED]; // Compute capacity defines amount of server and storage resources that are - // available to the databases in an instance partition. At most one of either - // node_count or processing_units should be present in the message. See [the - // documentation](https://cloud.google.com/spanner/docs/compute-capacity) - // for more information about nodes and processing units. + // available to the databases in an instance partition. At most, one of either + // `node_count` or` processing_units` should be present in the message. For + // more information, see + // [Compute capacity, nodes, and processing + // units](https://cloud.google.com/spanner/docs/compute-capacity). oneof compute_capacity { // The number of nodes allocated to this instance partition. // - // Users can set the node_count field to specify the target number of nodes - // allocated to the instance partition. + // Users can set the `node_count` field to specify the target number of + // nodes allocated to the instance partition. // // This may be zero in API responses for instance partitions that are not // yet in state `READY`. @@ -1623,11 +1747,11 @@ message InstancePartition { // The number of processing units allocated to this instance partition. // - // Users can set the processing_units field to specify the target number of - // processing units allocated to the instance partition. + // Users can set the `processing_units` field to specify the target number + // of processing units allocated to the instance partition. // - // This may be zero in API responses for instance partitions that are not - // yet in state `READY`. + // This might be zero in API responses for instance partitions that are not + // yet in the `READY` state. int32 processing_units = 6; } @@ -1650,12 +1774,13 @@ message InstancePartition { repeated string referencing_databases = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Deprecated: This field is not populated. // Output only. The names of the backups that reference this instance // partition. Referencing backups should share the parent instance. The // existence of any referencing backup prevents the instance partition from // being deleted. repeated string referencing_backups = 11 - [(google.api.field_behavior) = OUTPUT_ONLY]; + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; // Used for optimistic concurrency control as a way // to help prevent simultaneous updates of a instance partition from @@ -1793,7 +1918,9 @@ message UpdateInstancePartitionMetadata { // [ListInstancePartitions][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitions]. message ListInstancePartitionsRequest { // Required. The instance whose instance partitions should be listed. Values - // are of the form `projects//instances/`. + // are of the form `projects//instances/`. Use `{instance} + // = '-'` to list instance partitions for all Instances in a project, e.g., + // `projects/myproject/instances/-`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference) = { @@ -1832,9 +1959,9 @@ message ListInstancePartitionsResponse { // call to fetch more of the matching instance partitions. string next_page_token = 2; - // The list of unreachable instance partitions. - // It includes the names of instance partitions whose metadata could - // not be retrieved within + // The list of unreachable instances or instance partitions. + // It includes the names of instances or instance partitions whose metadata + // could not be retrieved within // [instance_partition_deadline][google.spanner.admin.instance.v1.ListInstancePartitionsRequest.instance_partition_deadline]. repeated string unreachable = 3; } @@ -1859,8 +1986,7 @@ message ListInstancePartitionOperationsRequest { // must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. // Colon `:` is the contains operator. Filter rules are not case sensitive. // - // The following fields in the [Operation][google.longrunning.Operation] - // are eligible for filtering: + // The following fields in the Operation are eligible for filtering: // // * `name` - The name of the long-running operation // * `done` - False if the operation is in progress, else true. @@ -1910,7 +2036,8 @@ message ListInstancePartitionOperationsRequest { // Optional. Deadline used while retrieving metadata for instance partition // operations. Instance partitions whose operation metadata cannot be // retrieved within this deadline will be added to - // [unreachable][ListInstancePartitionOperationsResponse.unreachable] in + // [unreachable_instance_partitions][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.unreachable_instance_partitions] + // in // [ListInstancePartitionOperationsResponse][google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse]. google.protobuf.Timestamp instance_partition_deadline = 5 [(google.api.field_behavior) = OPTIONAL]; @@ -1919,10 +2046,10 @@ message ListInstancePartitionOperationsRequest { // The response for // [ListInstancePartitionOperations][google.spanner.admin.instance.v1.InstanceAdmin.ListInstancePartitionOperations]. message ListInstancePartitionOperationsResponse { - // The list of matching instance partition [long-running - // operations][google.longrunning.Operation]. Each operation's name will be + // The list of matching instance partition long-running operations. Each + // operation's name will be // prefixed by the instance partition's name. The operation's - // [metadata][google.longrunning.Operation.metadata] field type + // metadata field type // `metadata.type_url` describes the type of the metadata. repeated google.longrunning.Operation operations = 1; diff --git a/protos/google/spanner/v1/type.proto b/protos/google/spanner/v1/type.proto index 734cfb54c..a8a73bf31 100644 --- a/protos/google/spanner/v1/type.proto +++ b/protos/google/spanner/v1/type.proto @@ -175,6 +175,10 @@ enum TypeCode { // For example, `P1Y2M3DT4H5M6.5S` represents time duration of 1 year, 2 // months, 3 days, 4 hours, 5 minutes, and 6.5 seconds. INTERVAL = 16; + + // Encoded as `string`, in lower-case hexa-decimal format, as described + // in RFC 9562, section 4. + UUID = 17; } // `TypeAnnotationCode` is used as a part of [Type][google.spanner.v1.Type] to diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 2ada44c72..546770b40 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -13841,6 +13841,15 @@ export namespace google { /** InstanceConfig state */ state?: (google.spanner.admin.instance.v1.InstanceConfig.State|keyof typeof google.spanner.admin.instance.v1.InstanceConfig.State|null); + + /** InstanceConfig freeInstanceAvailability */ + freeInstanceAvailability?: (google.spanner.admin.instance.v1.InstanceConfig.FreeInstanceAvailability|keyof typeof google.spanner.admin.instance.v1.InstanceConfig.FreeInstanceAvailability|null); + + /** InstanceConfig quorumType */ + quorumType?: (google.spanner.admin.instance.v1.InstanceConfig.QuorumType|keyof typeof google.spanner.admin.instance.v1.InstanceConfig.QuorumType|null); + + /** InstanceConfig storageLimitPerProcessingUnit */ + storageLimitPerProcessingUnit?: (number|Long|string|null); } /** Represents an InstanceConfig. */ @@ -13885,6 +13894,15 @@ export namespace google { /** InstanceConfig state. */ public state: (google.spanner.admin.instance.v1.InstanceConfig.State|keyof typeof google.spanner.admin.instance.v1.InstanceConfig.State); + /** InstanceConfig freeInstanceAvailability. */ + public freeInstanceAvailability: (google.spanner.admin.instance.v1.InstanceConfig.FreeInstanceAvailability|keyof typeof google.spanner.admin.instance.v1.InstanceConfig.FreeInstanceAvailability); + + /** InstanceConfig quorumType. */ + public quorumType: (google.spanner.admin.instance.v1.InstanceConfig.QuorumType|keyof typeof google.spanner.admin.instance.v1.InstanceConfig.QuorumType); + + /** InstanceConfig storageLimitPerProcessingUnit. */ + public storageLimitPerProcessingUnit: (number|Long|string); + /** * Creates a new InstanceConfig instance using the specified properties. * @param [properties] Properties to set @@ -13978,6 +13996,23 @@ export namespace google { CREATING = 1, READY = 2 } + + /** FreeInstanceAvailability enum. */ + enum FreeInstanceAvailability { + FREE_INSTANCE_AVAILABILITY_UNSPECIFIED = 0, + AVAILABLE = 1, + UNSUPPORTED = 2, + DISABLED = 3, + QUOTA_EXCEEDED = 4 + } + + /** QuorumType enum. */ + enum QuorumType { + QUORUM_TYPE_UNSPECIFIED = 0, + REGION = 1, + DUAL_REGION = 2, + MULTI_REGION = 3 + } } /** Properties of a ReplicaComputeCapacity. */ @@ -14667,6 +14702,9 @@ export namespace google { /** Instance labels */ labels?: ({ [k: string]: string }|null); + /** Instance instanceType */ + instanceType?: (google.spanner.admin.instance.v1.Instance.InstanceType|keyof typeof google.spanner.admin.instance.v1.Instance.InstanceType|null); + /** Instance endpointUris */ endpointUris?: (string[]|null); @@ -14676,6 +14714,9 @@ export namespace google { /** Instance updateTime */ updateTime?: (google.protobuf.ITimestamp|null); + /** Instance freeInstanceMetadata */ + freeInstanceMetadata?: (google.spanner.admin.instance.v1.IFreeInstanceMetadata|null); + /** Instance edition */ edition?: (google.spanner.admin.instance.v1.Instance.Edition|keyof typeof google.spanner.admin.instance.v1.Instance.Edition|null); @@ -14719,6 +14760,9 @@ export namespace google { /** Instance labels. */ public labels: { [k: string]: string }; + /** Instance instanceType. */ + public instanceType: (google.spanner.admin.instance.v1.Instance.InstanceType|keyof typeof google.spanner.admin.instance.v1.Instance.InstanceType); + /** Instance endpointUris. */ public endpointUris: string[]; @@ -14728,6 +14772,9 @@ export namespace google { /** Instance updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); + /** Instance freeInstanceMetadata. */ + public freeInstanceMetadata?: (google.spanner.admin.instance.v1.IFreeInstanceMetadata|null); + /** Instance edition. */ public edition: (google.spanner.admin.instance.v1.Instance.Edition|keyof typeof google.spanner.admin.instance.v1.Instance.Edition); @@ -14821,6 +14868,13 @@ export namespace google { READY = 2 } + /** InstanceType enum. */ + enum InstanceType { + INSTANCE_TYPE_UNSPECIFIED = 0, + PROVISIONED = 1, + FREE_INSTANCE = 2 + } + /** Edition enum. */ enum Edition { EDITION_UNSPECIFIED = 0, @@ -16581,6 +16635,125 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a FreeInstanceMetadata. */ + interface IFreeInstanceMetadata { + + /** FreeInstanceMetadata expireTime */ + expireTime?: (google.protobuf.ITimestamp|null); + + /** FreeInstanceMetadata upgradeTime */ + upgradeTime?: (google.protobuf.ITimestamp|null); + + /** FreeInstanceMetadata expireBehavior */ + expireBehavior?: (google.spanner.admin.instance.v1.FreeInstanceMetadata.ExpireBehavior|keyof typeof google.spanner.admin.instance.v1.FreeInstanceMetadata.ExpireBehavior|null); + } + + /** Represents a FreeInstanceMetadata. */ + class FreeInstanceMetadata implements IFreeInstanceMetadata { + + /** + * Constructs a new FreeInstanceMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.spanner.admin.instance.v1.IFreeInstanceMetadata); + + /** FreeInstanceMetadata expireTime. */ + public expireTime?: (google.protobuf.ITimestamp|null); + + /** FreeInstanceMetadata upgradeTime. */ + public upgradeTime?: (google.protobuf.ITimestamp|null); + + /** FreeInstanceMetadata expireBehavior. */ + public expireBehavior: (google.spanner.admin.instance.v1.FreeInstanceMetadata.ExpireBehavior|keyof typeof google.spanner.admin.instance.v1.FreeInstanceMetadata.ExpireBehavior); + + /** + * Creates a new FreeInstanceMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns FreeInstanceMetadata instance + */ + public static create(properties?: google.spanner.admin.instance.v1.IFreeInstanceMetadata): google.spanner.admin.instance.v1.FreeInstanceMetadata; + + /** + * Encodes the specified FreeInstanceMetadata message. Does not implicitly {@link google.spanner.admin.instance.v1.FreeInstanceMetadata.verify|verify} messages. + * @param message FreeInstanceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.spanner.admin.instance.v1.IFreeInstanceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FreeInstanceMetadata message, length delimited. Does not implicitly {@link google.spanner.admin.instance.v1.FreeInstanceMetadata.verify|verify} messages. + * @param message FreeInstanceMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.spanner.admin.instance.v1.IFreeInstanceMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FreeInstanceMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FreeInstanceMetadata + * @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.spanner.admin.instance.v1.FreeInstanceMetadata; + + /** + * Decodes a FreeInstanceMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FreeInstanceMetadata + * @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.spanner.admin.instance.v1.FreeInstanceMetadata; + + /** + * Verifies a FreeInstanceMetadata 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 FreeInstanceMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FreeInstanceMetadata + */ + public static fromObject(object: { [k: string]: any }): google.spanner.admin.instance.v1.FreeInstanceMetadata; + + /** + * Creates a plain object from a FreeInstanceMetadata message. Also converts values to other types if specified. + * @param message FreeInstanceMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.spanner.admin.instance.v1.FreeInstanceMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FreeInstanceMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FreeInstanceMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FreeInstanceMetadata { + + /** ExpireBehavior enum. */ + enum ExpireBehavior { + EXPIRE_BEHAVIOR_UNSPECIFIED = 0, + FREE_TO_PROVISIONED = 1, + REMOVE_AFTER_GRACE_PERIOD = 2 + } + } + /** Properties of a CreateInstanceConfigMetadata. */ interface ICreateInstanceConfigMetadata { @@ -34373,7 +34546,8 @@ export namespace google { JSON = 11, PROTO = 13, ENUM = 14, - INTERVAL = 16 + INTERVAL = 16, + UUID = 17 } /** TypeAnnotationCode enum. */ diff --git a/protos/protos.js b/protos/protos.js index 6a0b1f694..0ea60ab00 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -34778,6 +34778,9 @@ * @property {Array.|null} [leaderOptions] InstanceConfig leaderOptions * @property {boolean|null} [reconciling] InstanceConfig reconciling * @property {google.spanner.admin.instance.v1.InstanceConfig.State|null} [state] InstanceConfig state + * @property {google.spanner.admin.instance.v1.InstanceConfig.FreeInstanceAvailability|null} [freeInstanceAvailability] InstanceConfig freeInstanceAvailability + * @property {google.spanner.admin.instance.v1.InstanceConfig.QuorumType|null} [quorumType] InstanceConfig quorumType + * @property {number|Long|null} [storageLimitPerProcessingUnit] InstanceConfig storageLimitPerProcessingUnit */ /** @@ -34887,6 +34890,30 @@ */ InstanceConfig.prototype.state = 0; + /** + * InstanceConfig freeInstanceAvailability. + * @member {google.spanner.admin.instance.v1.InstanceConfig.FreeInstanceAvailability} freeInstanceAvailability + * @memberof google.spanner.admin.instance.v1.InstanceConfig + * @instance + */ + InstanceConfig.prototype.freeInstanceAvailability = 0; + + /** + * InstanceConfig quorumType. + * @member {google.spanner.admin.instance.v1.InstanceConfig.QuorumType} quorumType + * @memberof google.spanner.admin.instance.v1.InstanceConfig + * @instance + */ + InstanceConfig.prototype.quorumType = 0; + + /** + * InstanceConfig storageLimitPerProcessingUnit. + * @member {number|Long} storageLimitPerProcessingUnit + * @memberof google.spanner.admin.instance.v1.InstanceConfig + * @instance + */ + InstanceConfig.prototype.storageLimitPerProcessingUnit = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + /** * Creates a new InstanceConfig instance using the specified properties. * @function create @@ -34937,6 +34964,12 @@ writer.uint32(/* id 10, wireType 0 =*/80).bool(message.reconciling); if (message.state != null && Object.hasOwnProperty.call(message, "state")) writer.uint32(/* id 11, wireType 0 =*/88).int32(message.state); + if (message.freeInstanceAvailability != null && Object.hasOwnProperty.call(message, "freeInstanceAvailability")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.freeInstanceAvailability); + if (message.quorumType != null && Object.hasOwnProperty.call(message, "quorumType")) + writer.uint32(/* id 18, wireType 0 =*/144).int32(message.quorumType); + if (message.storageLimitPerProcessingUnit != null && Object.hasOwnProperty.call(message, "storageLimitPerProcessingUnit")) + writer.uint32(/* id 19, wireType 0 =*/152).int64(message.storageLimitPerProcessingUnit); return writer; }; @@ -35040,6 +35073,18 @@ message.state = reader.int32(); break; } + case 12: { + message.freeInstanceAvailability = reader.int32(); + break; + } + case 18: { + message.quorumType = reader.int32(); + break; + } + case 19: { + message.storageLimitPerProcessingUnit = reader.int64(); + break; + } default: reader.skipType(tag & 7); break; @@ -35141,6 +35186,30 @@ case 2: break; } + if (message.freeInstanceAvailability != null && message.hasOwnProperty("freeInstanceAvailability")) + switch (message.freeInstanceAvailability) { + default: + return "freeInstanceAvailability: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.quorumType != null && message.hasOwnProperty("quorumType")) + switch (message.quorumType) { + default: + return "quorumType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.storageLimitPerProcessingUnit != null && message.hasOwnProperty("storageLimitPerProcessingUnit")) + if (!$util.isInteger(message.storageLimitPerProcessingUnit) && !(message.storageLimitPerProcessingUnit && $util.isInteger(message.storageLimitPerProcessingUnit.low) && $util.isInteger(message.storageLimitPerProcessingUnit.high))) + return "storageLimitPerProcessingUnit: integer|Long expected"; return null; }; @@ -35240,6 +35309,67 @@ message.state = 2; break; } + switch (object.freeInstanceAvailability) { + default: + if (typeof object.freeInstanceAvailability === "number") { + message.freeInstanceAvailability = object.freeInstanceAvailability; + break; + } + break; + case "FREE_INSTANCE_AVAILABILITY_UNSPECIFIED": + case 0: + message.freeInstanceAvailability = 0; + break; + case "AVAILABLE": + case 1: + message.freeInstanceAvailability = 1; + break; + case "UNSUPPORTED": + case 2: + message.freeInstanceAvailability = 2; + break; + case "DISABLED": + case 3: + message.freeInstanceAvailability = 3; + break; + case "QUOTA_EXCEEDED": + case 4: + message.freeInstanceAvailability = 4; + break; + } + switch (object.quorumType) { + default: + if (typeof object.quorumType === "number") { + message.quorumType = object.quorumType; + break; + } + break; + case "QUORUM_TYPE_UNSPECIFIED": + case 0: + message.quorumType = 0; + break; + case "REGION": + case 1: + message.quorumType = 1; + break; + case "DUAL_REGION": + case 2: + message.quorumType = 2; + break; + case "MULTI_REGION": + case 3: + message.quorumType = 3; + break; + } + if (object.storageLimitPerProcessingUnit != null) + if ($util.Long) + (message.storageLimitPerProcessingUnit = $util.Long.fromValue(object.storageLimitPerProcessingUnit)).unsigned = false; + else if (typeof object.storageLimitPerProcessingUnit === "string") + message.storageLimitPerProcessingUnit = parseInt(object.storageLimitPerProcessingUnit, 10); + else if (typeof object.storageLimitPerProcessingUnit === "number") + message.storageLimitPerProcessingUnit = object.storageLimitPerProcessingUnit; + else if (typeof object.storageLimitPerProcessingUnit === "object") + message.storageLimitPerProcessingUnit = new $util.LongBits(object.storageLimitPerProcessingUnit.low >>> 0, object.storageLimitPerProcessingUnit.high >>> 0).toNumber(); return message; }; @@ -35271,6 +35401,13 @@ object.etag = ""; object.reconciling = false; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.freeInstanceAvailability = options.enums === String ? "FREE_INSTANCE_AVAILABILITY_UNSPECIFIED" : 0; + object.quorumType = options.enums === String ? "QUORUM_TYPE_UNSPECIFIED" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.storageLimitPerProcessingUnit = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.storageLimitPerProcessingUnit = options.longs === String ? "0" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -35307,6 +35444,15 @@ object.reconciling = message.reconciling; if (message.state != null && message.hasOwnProperty("state")) object.state = options.enums === String ? $root.google.spanner.admin.instance.v1.InstanceConfig.State[message.state] === undefined ? message.state : $root.google.spanner.admin.instance.v1.InstanceConfig.State[message.state] : message.state; + if (message.freeInstanceAvailability != null && message.hasOwnProperty("freeInstanceAvailability")) + object.freeInstanceAvailability = options.enums === String ? $root.google.spanner.admin.instance.v1.InstanceConfig.FreeInstanceAvailability[message.freeInstanceAvailability] === undefined ? message.freeInstanceAvailability : $root.google.spanner.admin.instance.v1.InstanceConfig.FreeInstanceAvailability[message.freeInstanceAvailability] : message.freeInstanceAvailability; + if (message.quorumType != null && message.hasOwnProperty("quorumType")) + object.quorumType = options.enums === String ? $root.google.spanner.admin.instance.v1.InstanceConfig.QuorumType[message.quorumType] === undefined ? message.quorumType : $root.google.spanner.admin.instance.v1.InstanceConfig.QuorumType[message.quorumType] : message.quorumType; + if (message.storageLimitPerProcessingUnit != null && message.hasOwnProperty("storageLimitPerProcessingUnit")) + if (typeof message.storageLimitPerProcessingUnit === "number") + object.storageLimitPerProcessingUnit = options.longs === String ? String(message.storageLimitPerProcessingUnit) : message.storageLimitPerProcessingUnit; + else + object.storageLimitPerProcessingUnit = options.longs === String ? $util.Long.prototype.toString.call(message.storageLimitPerProcessingUnit) : options.longs === Number ? new $util.LongBits(message.storageLimitPerProcessingUnit.low >>> 0, message.storageLimitPerProcessingUnit.high >>> 0).toNumber() : message.storageLimitPerProcessingUnit; return object; }; @@ -35368,6 +35514,44 @@ return values; })(); + /** + * FreeInstanceAvailability enum. + * @name google.spanner.admin.instance.v1.InstanceConfig.FreeInstanceAvailability + * @enum {number} + * @property {number} FREE_INSTANCE_AVAILABILITY_UNSPECIFIED=0 FREE_INSTANCE_AVAILABILITY_UNSPECIFIED value + * @property {number} AVAILABLE=1 AVAILABLE value + * @property {number} UNSUPPORTED=2 UNSUPPORTED value + * @property {number} DISABLED=3 DISABLED value + * @property {number} QUOTA_EXCEEDED=4 QUOTA_EXCEEDED value + */ + InstanceConfig.FreeInstanceAvailability = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FREE_INSTANCE_AVAILABILITY_UNSPECIFIED"] = 0; + values[valuesById[1] = "AVAILABLE"] = 1; + values[valuesById[2] = "UNSUPPORTED"] = 2; + values[valuesById[3] = "DISABLED"] = 3; + values[valuesById[4] = "QUOTA_EXCEEDED"] = 4; + return values; + })(); + + /** + * QuorumType enum. + * @name google.spanner.admin.instance.v1.InstanceConfig.QuorumType + * @enum {number} + * @property {number} QUORUM_TYPE_UNSPECIFIED=0 QUORUM_TYPE_UNSPECIFIED value + * @property {number} REGION=1 REGION value + * @property {number} DUAL_REGION=2 DUAL_REGION value + * @property {number} MULTI_REGION=3 MULTI_REGION value + */ + InstanceConfig.QuorumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "QUORUM_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "REGION"] = 1; + values[valuesById[2] = "DUAL_REGION"] = 2; + values[valuesById[3] = "MULTI_REGION"] = 3; + return values; + })(); + return InstanceConfig; })(); @@ -36960,9 +37144,11 @@ * @property {google.spanner.admin.instance.v1.IAutoscalingConfig|null} [autoscalingConfig] Instance autoscalingConfig * @property {google.spanner.admin.instance.v1.Instance.State|null} [state] Instance state * @property {Object.|null} [labels] Instance labels + * @property {google.spanner.admin.instance.v1.Instance.InstanceType|null} [instanceType] Instance instanceType * @property {Array.|null} [endpointUris] Instance endpointUris * @property {google.protobuf.ITimestamp|null} [createTime] Instance createTime * @property {google.protobuf.ITimestamp|null} [updateTime] Instance updateTime + * @property {google.spanner.admin.instance.v1.IFreeInstanceMetadata|null} [freeInstanceMetadata] Instance freeInstanceMetadata * @property {google.spanner.admin.instance.v1.Instance.Edition|null} [edition] Instance edition * @property {google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleType|null} [defaultBackupScheduleType] Instance defaultBackupScheduleType */ @@ -37057,6 +37243,14 @@ */ Instance.prototype.labels = $util.emptyObject; + /** + * Instance instanceType. + * @member {google.spanner.admin.instance.v1.Instance.InstanceType} instanceType + * @memberof google.spanner.admin.instance.v1.Instance + * @instance + */ + Instance.prototype.instanceType = 0; + /** * Instance endpointUris. * @member {Array.} endpointUris @@ -37081,6 +37275,14 @@ */ Instance.prototype.updateTime = null; + /** + * Instance freeInstanceMetadata. + * @member {google.spanner.admin.instance.v1.IFreeInstanceMetadata|null|undefined} freeInstanceMetadata + * @memberof google.spanner.admin.instance.v1.Instance + * @instance + */ + Instance.prototype.freeInstanceMetadata = null; + /** * Instance edition. * @member {google.spanner.admin.instance.v1.Instance.Edition} edition @@ -37139,10 +37341,14 @@ writer.uint32(/* id 8, wireType 2 =*/66).string(message.endpointUris[i]); if (message.processingUnits != null && Object.hasOwnProperty.call(message, "processingUnits")) writer.uint32(/* id 9, wireType 0 =*/72).int32(message.processingUnits); + if (message.instanceType != null && Object.hasOwnProperty.call(message, "instanceType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.instanceType); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.freeInstanceMetadata != null && Object.hasOwnProperty.call(message, "freeInstanceMetadata")) + $root.google.spanner.admin.instance.v1.FreeInstanceMetadata.encode(message.freeInstanceMetadata, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); if (message.autoscalingConfig != null && Object.hasOwnProperty.call(message, "autoscalingConfig")) $root.google.spanner.admin.instance.v1.AutoscalingConfig.encode(message.autoscalingConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.replicaComputeCapacity != null && message.replicaComputeCapacity.length) @@ -37243,6 +37449,10 @@ message.labels[key] = value; break; } + case 10: { + message.instanceType = reader.int32(); + break; + } case 8: { if (!(message.endpointUris && message.endpointUris.length)) message.endpointUris = []; @@ -37257,6 +37467,10 @@ message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 13: { + message.freeInstanceMetadata = $root.google.spanner.admin.instance.v1.FreeInstanceMetadata.decode(reader, reader.uint32()); + break; + } case 20: { message.edition = reader.int32(); break; @@ -37346,6 +37560,15 @@ if (!$util.isString(message.labels[key[i]])) return "labels: string{k:string} expected"; } + if (message.instanceType != null && message.hasOwnProperty("instanceType")) + switch (message.instanceType) { + default: + return "instanceType: enum value expected"; + case 0: + case 1: + case 2: + break; + } if (message.endpointUris != null && message.hasOwnProperty("endpointUris")) { if (!Array.isArray(message.endpointUris)) return "endpointUris: array expected"; @@ -37363,6 +37586,11 @@ if (error) return "updateTime." + error; } + if (message.freeInstanceMetadata != null && message.hasOwnProperty("freeInstanceMetadata")) { + var error = $root.google.spanner.admin.instance.v1.FreeInstanceMetadata.verify(message.freeInstanceMetadata); + if (error) + return "freeInstanceMetadata." + error; + } if (message.edition != null && message.hasOwnProperty("edition")) switch (message.edition) { default: @@ -37449,6 +37677,26 @@ for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) message.labels[keys[i]] = String(object.labels[keys[i]]); } + switch (object.instanceType) { + default: + if (typeof object.instanceType === "number") { + message.instanceType = object.instanceType; + break; + } + break; + case "INSTANCE_TYPE_UNSPECIFIED": + case 0: + message.instanceType = 0; + break; + case "PROVISIONED": + case 1: + message.instanceType = 1; + break; + case "FREE_INSTANCE": + case 2: + message.instanceType = 2; + break; + } if (object.endpointUris) { if (!Array.isArray(object.endpointUris)) throw TypeError(".google.spanner.admin.instance.v1.Instance.endpointUris: array expected"); @@ -37466,6 +37714,11 @@ throw TypeError(".google.spanner.admin.instance.v1.Instance.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } + if (object.freeInstanceMetadata != null) { + if (typeof object.freeInstanceMetadata !== "object") + throw TypeError(".google.spanner.admin.instance.v1.Instance.freeInstanceMetadata: object expected"); + message.freeInstanceMetadata = $root.google.spanner.admin.instance.v1.FreeInstanceMetadata.fromObject(object.freeInstanceMetadata); + } switch (object.edition) { default: if (typeof object.edition === "number") { @@ -37539,8 +37792,10 @@ object.nodeCount = 0; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.processingUnits = 0; + object.instanceType = options.enums === String ? "INSTANCE_TYPE_UNSPECIFIED" : 0; object.createTime = null; object.updateTime = null; + object.freeInstanceMetadata = null; object.autoscalingConfig = null; object.edition = options.enums === String ? "EDITION_UNSPECIFIED" : 0; object.defaultBackupScheduleType = options.enums === String ? "DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED" : 0; @@ -37568,10 +37823,14 @@ } if (message.processingUnits != null && message.hasOwnProperty("processingUnits")) object.processingUnits = message.processingUnits; + if (message.instanceType != null && message.hasOwnProperty("instanceType")) + object.instanceType = options.enums === String ? $root.google.spanner.admin.instance.v1.Instance.InstanceType[message.instanceType] === undefined ? message.instanceType : $root.google.spanner.admin.instance.v1.Instance.InstanceType[message.instanceType] : message.instanceType; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.freeInstanceMetadata != null && message.hasOwnProperty("freeInstanceMetadata")) + object.freeInstanceMetadata = $root.google.spanner.admin.instance.v1.FreeInstanceMetadata.toObject(message.freeInstanceMetadata, options); if (message.autoscalingConfig != null && message.hasOwnProperty("autoscalingConfig")) object.autoscalingConfig = $root.google.spanner.admin.instance.v1.AutoscalingConfig.toObject(message.autoscalingConfig, options); if (message.replicaComputeCapacity && message.replicaComputeCapacity.length) { @@ -37628,6 +37887,22 @@ return values; })(); + /** + * InstanceType enum. + * @name google.spanner.admin.instance.v1.Instance.InstanceType + * @enum {number} + * @property {number} INSTANCE_TYPE_UNSPECIFIED=0 INSTANCE_TYPE_UNSPECIFIED value + * @property {number} PROVISIONED=1 PROVISIONED value + * @property {number} FREE_INSTANCE=2 FREE_INSTANCE value + */ + Instance.InstanceType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "INSTANCE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROVISIONED"] = 1; + values[valuesById[2] = "FREE_INSTANCE"] = 2; + return values; + })(); + /** * Edition enum. * @name google.spanner.admin.instance.v1.Instance.Edition @@ -41871,6 +42146,306 @@ return UpdateInstanceMetadata; })(); + v1.FreeInstanceMetadata = (function() { + + /** + * Properties of a FreeInstanceMetadata. + * @memberof google.spanner.admin.instance.v1 + * @interface IFreeInstanceMetadata + * @property {google.protobuf.ITimestamp|null} [expireTime] FreeInstanceMetadata expireTime + * @property {google.protobuf.ITimestamp|null} [upgradeTime] FreeInstanceMetadata upgradeTime + * @property {google.spanner.admin.instance.v1.FreeInstanceMetadata.ExpireBehavior|null} [expireBehavior] FreeInstanceMetadata expireBehavior + */ + + /** + * Constructs a new FreeInstanceMetadata. + * @memberof google.spanner.admin.instance.v1 + * @classdesc Represents a FreeInstanceMetadata. + * @implements IFreeInstanceMetadata + * @constructor + * @param {google.spanner.admin.instance.v1.IFreeInstanceMetadata=} [properties] Properties to set + */ + function FreeInstanceMetadata(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]]; + } + + /** + * FreeInstanceMetadata expireTime. + * @member {google.protobuf.ITimestamp|null|undefined} expireTime + * @memberof google.spanner.admin.instance.v1.FreeInstanceMetadata + * @instance + */ + FreeInstanceMetadata.prototype.expireTime = null; + + /** + * FreeInstanceMetadata upgradeTime. + * @member {google.protobuf.ITimestamp|null|undefined} upgradeTime + * @memberof google.spanner.admin.instance.v1.FreeInstanceMetadata + * @instance + */ + FreeInstanceMetadata.prototype.upgradeTime = null; + + /** + * FreeInstanceMetadata expireBehavior. + * @member {google.spanner.admin.instance.v1.FreeInstanceMetadata.ExpireBehavior} expireBehavior + * @memberof google.spanner.admin.instance.v1.FreeInstanceMetadata + * @instance + */ + FreeInstanceMetadata.prototype.expireBehavior = 0; + + /** + * Creates a new FreeInstanceMetadata instance using the specified properties. + * @function create + * @memberof google.spanner.admin.instance.v1.FreeInstanceMetadata + * @static + * @param {google.spanner.admin.instance.v1.IFreeInstanceMetadata=} [properties] Properties to set + * @returns {google.spanner.admin.instance.v1.FreeInstanceMetadata} FreeInstanceMetadata instance + */ + FreeInstanceMetadata.create = function create(properties) { + return new FreeInstanceMetadata(properties); + }; + + /** + * Encodes the specified FreeInstanceMetadata message. Does not implicitly {@link google.spanner.admin.instance.v1.FreeInstanceMetadata.verify|verify} messages. + * @function encode + * @memberof google.spanner.admin.instance.v1.FreeInstanceMetadata + * @static + * @param {google.spanner.admin.instance.v1.IFreeInstanceMetadata} message FreeInstanceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FreeInstanceMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.expireTime != null && Object.hasOwnProperty.call(message, "expireTime")) + $root.google.protobuf.Timestamp.encode(message.expireTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.upgradeTime != null && Object.hasOwnProperty.call(message, "upgradeTime")) + $root.google.protobuf.Timestamp.encode(message.upgradeTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.expireBehavior != null && Object.hasOwnProperty.call(message, "expireBehavior")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.expireBehavior); + return writer; + }; + + /** + * Encodes the specified FreeInstanceMetadata message, length delimited. Does not implicitly {@link google.spanner.admin.instance.v1.FreeInstanceMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.spanner.admin.instance.v1.FreeInstanceMetadata + * @static + * @param {google.spanner.admin.instance.v1.IFreeInstanceMetadata} message FreeInstanceMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FreeInstanceMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FreeInstanceMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.spanner.admin.instance.v1.FreeInstanceMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.spanner.admin.instance.v1.FreeInstanceMetadata} FreeInstanceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FreeInstanceMetadata.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.spanner.admin.instance.v1.FreeInstanceMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.expireTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.upgradeTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.expireBehavior = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FreeInstanceMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.spanner.admin.instance.v1.FreeInstanceMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.spanner.admin.instance.v1.FreeInstanceMetadata} FreeInstanceMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FreeInstanceMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FreeInstanceMetadata message. + * @function verify + * @memberof google.spanner.admin.instance.v1.FreeInstanceMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FreeInstanceMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.expireTime != null && message.hasOwnProperty("expireTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.expireTime); + if (error) + return "expireTime." + error; + } + if (message.upgradeTime != null && message.hasOwnProperty("upgradeTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.upgradeTime); + if (error) + return "upgradeTime." + error; + } + if (message.expireBehavior != null && message.hasOwnProperty("expireBehavior")) + switch (message.expireBehavior) { + default: + return "expireBehavior: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a FreeInstanceMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.spanner.admin.instance.v1.FreeInstanceMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.spanner.admin.instance.v1.FreeInstanceMetadata} FreeInstanceMetadata + */ + FreeInstanceMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.admin.instance.v1.FreeInstanceMetadata) + return object; + var message = new $root.google.spanner.admin.instance.v1.FreeInstanceMetadata(); + if (object.expireTime != null) { + if (typeof object.expireTime !== "object") + throw TypeError(".google.spanner.admin.instance.v1.FreeInstanceMetadata.expireTime: object expected"); + message.expireTime = $root.google.protobuf.Timestamp.fromObject(object.expireTime); + } + if (object.upgradeTime != null) { + if (typeof object.upgradeTime !== "object") + throw TypeError(".google.spanner.admin.instance.v1.FreeInstanceMetadata.upgradeTime: object expected"); + message.upgradeTime = $root.google.protobuf.Timestamp.fromObject(object.upgradeTime); + } + switch (object.expireBehavior) { + default: + if (typeof object.expireBehavior === "number") { + message.expireBehavior = object.expireBehavior; + break; + } + break; + case "EXPIRE_BEHAVIOR_UNSPECIFIED": + case 0: + message.expireBehavior = 0; + break; + case "FREE_TO_PROVISIONED": + case 1: + message.expireBehavior = 1; + break; + case "REMOVE_AFTER_GRACE_PERIOD": + case 2: + message.expireBehavior = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a FreeInstanceMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.spanner.admin.instance.v1.FreeInstanceMetadata + * @static + * @param {google.spanner.admin.instance.v1.FreeInstanceMetadata} message FreeInstanceMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FreeInstanceMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.expireTime = null; + object.upgradeTime = null; + object.expireBehavior = options.enums === String ? "EXPIRE_BEHAVIOR_UNSPECIFIED" : 0; + } + if (message.expireTime != null && message.hasOwnProperty("expireTime")) + object.expireTime = $root.google.protobuf.Timestamp.toObject(message.expireTime, options); + if (message.upgradeTime != null && message.hasOwnProperty("upgradeTime")) + object.upgradeTime = $root.google.protobuf.Timestamp.toObject(message.upgradeTime, options); + if (message.expireBehavior != null && message.hasOwnProperty("expireBehavior")) + object.expireBehavior = options.enums === String ? $root.google.spanner.admin.instance.v1.FreeInstanceMetadata.ExpireBehavior[message.expireBehavior] === undefined ? message.expireBehavior : $root.google.spanner.admin.instance.v1.FreeInstanceMetadata.ExpireBehavior[message.expireBehavior] : message.expireBehavior; + return object; + }; + + /** + * Converts this FreeInstanceMetadata to JSON. + * @function toJSON + * @memberof google.spanner.admin.instance.v1.FreeInstanceMetadata + * @instance + * @returns {Object.} JSON object + */ + FreeInstanceMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FreeInstanceMetadata + * @function getTypeUrl + * @memberof google.spanner.admin.instance.v1.FreeInstanceMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FreeInstanceMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.spanner.admin.instance.v1.FreeInstanceMetadata"; + }; + + /** + * ExpireBehavior enum. + * @name google.spanner.admin.instance.v1.FreeInstanceMetadata.ExpireBehavior + * @enum {number} + * @property {number} EXPIRE_BEHAVIOR_UNSPECIFIED=0 EXPIRE_BEHAVIOR_UNSPECIFIED value + * @property {number} FREE_TO_PROVISIONED=1 FREE_TO_PROVISIONED value + * @property {number} REMOVE_AFTER_GRACE_PERIOD=2 REMOVE_AFTER_GRACE_PERIOD value + */ + FreeInstanceMetadata.ExpireBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EXPIRE_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "FREE_TO_PROVISIONED"] = 1; + values[valuesById[2] = "REMOVE_AFTER_GRACE_PERIOD"] = 2; + return values; + })(); + + return FreeInstanceMetadata; + })(); + v1.CreateInstanceConfigMetadata = (function() { /** @@ -87382,6 +87957,7 @@ case 13: case 14: case 16: + case 17: break; } if (message.arrayElementType != null && message.hasOwnProperty("arrayElementType")) { @@ -87493,6 +88069,10 @@ case 16: message.code = 16; break; + case "UUID": + case 17: + message.code = 17; + break; } if (object.arrayElementType != null) { if (typeof object.arrayElementType !== "object") @@ -88071,6 +88651,7 @@ * @property {number} PROTO=13 PROTO value * @property {number} ENUM=14 ENUM value * @property {number} INTERVAL=16 INTERVAL value + * @property {number} UUID=17 UUID value */ v1.TypeCode = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -88090,6 +88671,7 @@ values[valuesById[13] = "PROTO"] = 13; values[valuesById[14] = "ENUM"] = 14; values[valuesById[16] = "INTERVAL"] = 16; + values[valuesById[17] = "UUID"] = 17; return values; })(); diff --git a/protos/protos.json b/protos/protos.json index aa5a29c92..34d294690 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -4117,7 +4117,9 @@ "InstanceConfig": { "options": { "(google.api.resource).type": "spanner.googleapis.com/InstanceConfig", - "(google.api.resource).pattern": "projects/{project}/instanceConfigs/{instance_config}" + "(google.api.resource).pattern": "projects/{project}/instanceConfigs/{instance_config}", + "(google.api.resource).plural": "instanceConfigs", + "(google.api.resource).singular": "instanceConfig" }, "fields": { "name": { @@ -4182,6 +4184,27 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "freeInstanceAvailability": { + "type": "FreeInstanceAvailability", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "quorumType": { + "type": "QuorumType", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "storageLimitPerProcessingUnit": { + "type": "int64", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -4198,6 +4221,23 @@ "CREATING": 1, "READY": 2 } + }, + "FreeInstanceAvailability": { + "values": { + "FREE_INSTANCE_AVAILABILITY_UNSPECIFIED": 0, + "AVAILABLE": 1, + "UNSUPPORTED": 2, + "DISABLED": 3, + "QUOTA_EXCEEDED": 4 + } + }, + "QuorumType": { + "values": { + "QUORUM_TYPE_UNSPECIFIED": 0, + "REGION": 1, + "DUAL_REGION": 2, + "MULTI_REGION": 3 + } } } }, @@ -4349,7 +4389,9 @@ "Instance": { "options": { "(google.api.resource).type": "spanner.googleapis.com/Instance", - "(google.api.resource).pattern": "projects/{project}/instances/{instance}" + "(google.api.resource).pattern": "projects/{project}/instances/{instance}", + "(google.api.resource).plural": "instances", + "(google.api.resource).singular": "instance" }, "fields": { "name": { @@ -4409,6 +4451,10 @@ "type": "string", "id": 7 }, + "instanceType": { + "type": "InstanceType", + "id": 10 + }, "endpointUris": { "rule": "repeated", "type": "string", @@ -4428,6 +4474,10 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "freeInstanceMetadata": { + "type": "FreeInstanceMetadata", + "id": 13 + }, "edition": { "type": "Edition", "id": 20, @@ -4451,6 +4501,13 @@ "READY": 2 } }, + "InstanceType": { + "values": { + "INSTANCE_TYPE_UNSPECIFIED": 0, + "PROVISIONED": 1, + "FREE_INSTANCE": 2 + } + }, "Edition": { "values": { "EDITION_UNSPECIFIED": 0, @@ -4788,6 +4845,37 @@ } } }, + "FreeInstanceMetadata": { + "fields": { + "expireTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "upgradeTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "expireBehavior": { + "type": "ExpireBehavior", + "id": 3 + } + }, + "nested": { + "ExpireBehavior": { + "values": { + "EXPIRE_BEHAVIOR_UNSPECIFIED": 0, + "FREE_TO_PROVISIONED": 1, + "REMOVE_AFTER_GRACE_PERIOD": 2 + } + } + } + }, "CreateInstanceConfigMetadata": { "fields": { "instanceConfig": { @@ -4823,7 +4911,9 @@ "InstancePartition": { "options": { "(google.api.resource).type": "spanner.googleapis.com/InstancePartition", - "(google.api.resource).pattern": "projects/{project}/instances/{instance}/instancePartitions/{instance_partition}" + "(google.api.resource).pattern": "projects/{project}/instances/{instance}/instancePartitions/{instance_partition}", + "(google.api.resource).plural": "instancePartitions", + "(google.api.resource).singular": "instancePartition" }, "oneofs": { "computeCapacity": { @@ -4898,6 +4988,7 @@ "type": "string", "id": 11, "options": { + "deprecated": true, "(google.api.field_behavior)": "OUTPUT_ONLY" } }, @@ -9117,7 +9208,8 @@ "JSON": 11, "PROTO": 13, "ENUM": 14, - "INTERVAL": 16 + "INTERVAL": 16, + "UUID": 17 } }, "TypeAnnotationCode": { diff --git a/src/v1/database_admin_client.ts b/src/v1/database_admin_client.ts index 4b71eb300..17ecea32b 100644 --- a/src/v1/database_admin_client.ts +++ b/src/v1/database_admin_client.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/src/v1/instance_admin_client.ts b/src/v1/instance_admin_client.ts index 815a55ad4..e425a7efc 100644 --- a/src/v1/instance_admin_client.ts +++ b/src/v1/instance_admin_client.ts @@ -1484,7 +1484,7 @@ export class InstanceAdminClient { /** * Creates an instance configuration and begins preparing it to be used. The - * returned {@link protos.google.longrunning.Operation|long-running operation} + * returned long-running operation * can be used to track the progress of preparing the new * instance configuration. The instance configuration name is assigned by the * caller. If the named instance configuration already exists, @@ -1511,13 +1511,13 @@ export class InstanceAdminClient { * {@link protos.google.spanner.admin.instance.v1.InstanceConfig.reconciling|reconciling} * field becomes false. Its state becomes `READY`. * - * The returned {@link protos.google.longrunning.Operation|long-running operation} will + * The returned long-running operation will * have a name of the format * `/operations/` and can be used to track * creation of the instance configuration. The - * {@link protos.google.longrunning.Operation.metadata|metadata} field type is + * metadata field type is * {@link protos.google.spanner.admin.instance.v1.CreateInstanceConfigMetadata|CreateInstanceConfigMetadata}. - * The {@link protos.google.longrunning.Operation.response|response} field type is + * The response field type is * {@link protos.google.spanner.admin.instance.v1.InstanceConfig|InstanceConfig}, if * successful. * @@ -1536,10 +1536,10 @@ export class InstanceAdminClient { * characters in length. The `custom-` prefix is required to avoid name * conflicts with Google-managed configurations. * @param {google.spanner.admin.instance.v1.InstanceConfig} request.instanceConfig - * Required. The InstanceConfig proto of the configuration to create. - * instance_config.name must be + * Required. The `InstanceConfig` proto of the configuration to create. + * `instance_config.name` must be * `/instanceConfigs/`. - * instance_config.base_config must be a Google managed configuration name, + * `instance_config.base_config` must be a Google-managed configuration name, * e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3. * @param {boolean} request.validateOnly * An option to validate, but not actually execute, a request, @@ -1671,7 +1671,7 @@ export class InstanceAdminClient { } /** * Updates an instance configuration. The returned - * {@link protos.google.longrunning.Operation|long-running operation} can be used to track + * long-running operation can be used to track * the progress of updating the instance. If the named instance configuration * does not exist, returns `NOT_FOUND`. * @@ -1702,13 +1702,13 @@ export class InstanceAdminClient { * {@link protos.google.spanner.admin.instance.v1.InstanceConfig.reconciling|reconciling} * field becomes false. * - * The returned {@link protos.google.longrunning.Operation|long-running operation} will + * The returned long-running operation will * have a name of the format * `/operations/` and can be used to track * the instance configuration modification. The - * {@link protos.google.longrunning.Operation.metadata|metadata} field type is + * metadata field type is * {@link protos.google.spanner.admin.instance.v1.UpdateInstanceConfigMetadata|UpdateInstanceConfigMetadata}. - * The {@link protos.google.longrunning.Operation.response|response} field type is + * The response field type is * {@link protos.google.spanner.admin.instance.v1.InstanceConfig|InstanceConfig}, if * successful. * @@ -1862,7 +1862,7 @@ export class InstanceAdminClient { } /** * Creates an instance and begins preparing it to begin serving. The - * returned {@link protos.google.longrunning.Operation|long-running operation} + * returned long-running operation * can be used to track the progress of preparing the new * instance. The instance name is assigned by the caller. If the * named instance already exists, `CreateInstance` returns @@ -1888,12 +1888,12 @@ export class InstanceAdminClient { * * The instance's allocated resource levels are readable via the API. * * The instance's state becomes `READY`. * - * The returned {@link protos.google.longrunning.Operation|long-running operation} will + * The returned long-running operation will * have a name of the format `/operations/` and * can be used to track creation of the instance. The - * {@link protos.google.longrunning.Operation.metadata|metadata} field type is + * metadata field type is * {@link protos.google.spanner.admin.instance.v1.CreateInstanceMetadata|CreateInstanceMetadata}. - * The {@link protos.google.longrunning.Operation.response|response} field type is + * The response field type is * {@link protos.google.spanner.admin.instance.v1.Instance|Instance}, if successful. * * @param {Object} request @@ -2035,8 +2035,7 @@ export class InstanceAdminClient { } /** * Updates an instance, and begins allocating or releasing resources - * as requested. The returned [long-running - * operation][google.longrunning.Operation] can be used to track the + * as requested. The returned long-running operation can be used to track the * progress of updating the instance. If the named instance does not * exist, returns `NOT_FOUND`. * @@ -2064,12 +2063,12 @@ export class InstanceAdminClient { * tables. * * The instance's new resource levels are readable via the API. * - * The returned {@link protos.google.longrunning.Operation|long-running operation} will + * The returned long-running operation will * have a name of the format `/operations/` and * can be used to track the instance modification. The - * {@link protos.google.longrunning.Operation.metadata|metadata} field type is + * metadata field type is * {@link protos.google.spanner.admin.instance.v1.UpdateInstanceMetadata|UpdateInstanceMetadata}. - * The {@link protos.google.longrunning.Operation.response|response} field type is + * The response field type is * {@link protos.google.spanner.admin.instance.v1.Instance|Instance}, if successful. * * Authorization requires `spanner.instances.update` permission on @@ -2215,7 +2214,7 @@ export class InstanceAdminClient { } /** * Creates an instance partition and begins preparing it to be used. The - * returned {@link protos.google.longrunning.Operation|long-running operation} + * returned long-running operation * can be used to track the progress of preparing the new instance partition. * The instance partition name is assigned by the caller. If the named * instance partition already exists, `CreateInstancePartition` returns @@ -2242,13 +2241,13 @@ export class InstanceAdminClient { * API. * * The instance partition's state becomes `READY`. * - * The returned {@link protos.google.longrunning.Operation|long-running operation} will + * The returned long-running operation will * have a name of the format * `/operations/` and can be used to * track creation of the instance partition. The - * {@link protos.google.longrunning.Operation.metadata|metadata} field type is + * metadata field type is * {@link protos.google.spanner.admin.instance.v1.CreateInstancePartitionMetadata|CreateInstancePartitionMetadata}. - * The {@link protos.google.longrunning.Operation.response|response} field type is + * The response field type is * {@link protos.google.spanner.admin.instance.v1.InstancePartition|InstancePartition}, if * successful. * @@ -2397,8 +2396,7 @@ export class InstanceAdminClient { } /** * Updates an instance partition, and begins allocating or releasing resources - * as requested. The returned [long-running - * operation][google.longrunning.Operation] can be used to track the + * as requested. The returned long-running operation can be used to track the * progress of updating the instance partition. If the named instance * partition does not exist, returns `NOT_FOUND`. * @@ -2427,13 +2425,13 @@ export class InstanceAdminClient { * partition's tables. * * The instance partition's new resource levels are readable via the API. * - * The returned {@link protos.google.longrunning.Operation|long-running operation} will + * The returned long-running operation will * have a name of the format * `/operations/` and can be used to * track the instance partition modification. The - * {@link protos.google.longrunning.Operation.metadata|metadata} field type is + * metadata field type is * {@link protos.google.spanner.admin.instance.v1.UpdateInstancePartitionMetadata|UpdateInstancePartitionMetadata}. - * The {@link protos.google.longrunning.Operation.response|response} field type is + * The response field type is * {@link protos.google.spanner.admin.instance.v1.InstancePartition|InstancePartition}, if * successful. * @@ -2586,7 +2584,7 @@ export class InstanceAdminClient { } /** * Moves an instance to the target instance configuration. You can use the - * returned {@link protos.google.longrunning.Operation|long-running operation} to track + * returned long-running operation to track * the progress of moving the instance. * * `MoveInstance` returns `FAILED_PRECONDITION` if the instance meets any of @@ -2617,13 +2615,13 @@ export class InstanceAdminClient { * transaction abort rate. However, moving an instance doesn't cause any * downtime. * - * The returned {@link protos.google.longrunning.Operation|long-running operation} has + * The returned long-running operation has * a name of the format * `/operations/` and can be used to track * the move instance operation. The - * {@link protos.google.longrunning.Operation.metadata|metadata} field type is + * metadata field type is * {@link protos.google.spanner.admin.instance.v1.MoveInstanceMetadata|MoveInstanceMetadata}. - * The {@link protos.google.longrunning.Operation.response|response} field type is + * The response field type is * {@link protos.google.spanner.admin.instance.v1.Instance|Instance}, * if successful. * Cancelling the operation sets its metadata's @@ -2783,6 +2781,9 @@ export class InstanceAdminClient { /** * Lists the supported instance configurations for a given project. * + * Returns both Google-managed configurations and user-managed + * configurations. + * * @param {Object} request * The request object that will be sent. * @param {string} request.parent @@ -2983,12 +2984,12 @@ export class InstanceAdminClient { ) as AsyncIterable; } /** - * Lists the user-managed instance configuration [long-running - * operations][google.longrunning.Operation] in the given project. An instance + * Lists the user-managed instance configuration long-running + * operations in the given project. An instance * configuration operation has a name of the form * `projects//instanceConfigs//operations/`. * The long-running operation - * {@link protos.google.longrunning.Operation.metadata|metadata} field type + * metadata field type * `metadata.type_url` describes the type of the metadata. Operations returned * include those that have completed/failed/canceled within the last 7 days, * and pending operations. Operations returned are ordered by @@ -3009,8 +3010,7 @@ export class InstanceAdminClient { * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. * Colon `:` is the contains operator. Filter rules are not case sensitive. * - * The following fields in the {@link protos.google.longrunning.Operation|Operation} - * are eligible for filtering: + * The following fields in the Operation are eligible for filtering: * * * `name` - The name of the long-running operation * * `done` - False if the operation is in progress, else true. @@ -3160,8 +3160,7 @@ export class InstanceAdminClient { * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. * Colon `:` is the contains operator. Filter rules are not case sensitive. * - * The following fields in the {@link protos.google.longrunning.Operation|Operation} - * are eligible for filtering: + * The following fields in the Operation are eligible for filtering: * * * `name` - The name of the long-running operation * * `done` - False if the operation is in progress, else true. @@ -3255,8 +3254,7 @@ export class InstanceAdminClient { * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. * Colon `:` is the contains operator. Filter rules are not case sensitive. * - * The following fields in the {@link protos.google.longrunning.Operation|Operation} - * are eligible for filtering: + * The following fields in the Operation are eligible for filtering: * * * `name` - The name of the long-running operation * * `done` - False if the operation is in progress, else true. @@ -3617,7 +3615,9 @@ export class InstanceAdminClient { * The request object that will be sent. * @param {string} request.parent * Required. The instance whose instance partitions should be listed. Values - * are of the form `projects//instances/`. + * are of the form `projects//instances/`. Use `{instance} + * = '-'` to list instance partitions for all Instances in a project, e.g., + * `projects/myproject/instances/-`. * @param {number} request.pageSize * Number of instance partitions to be returned in the response. If 0 or less, * defaults to the server's maximum allowed page size. @@ -3730,7 +3730,9 @@ export class InstanceAdminClient { * The request object that will be sent. * @param {string} request.parent * Required. The instance whose instance partitions should be listed. Values - * are of the form `projects//instances/`. + * are of the form `projects//instances/`. Use `{instance} + * = '-'` to list instance partitions for all Instances in a project, e.g., + * `projects/myproject/instances/-`. * @param {number} request.pageSize * Number of instance partitions to be returned in the response. If 0 or less, * defaults to the server's maximum allowed page size. @@ -3787,7 +3789,9 @@ export class InstanceAdminClient { * The request object that will be sent. * @param {string} request.parent * Required. The instance whose instance partitions should be listed. Values - * are of the form `projects//instances/`. + * are of the form `projects//instances/`. Use `{instance} + * = '-'` to list instance partitions for all Instances in a project, e.g., + * `projects/myproject/instances/-`. * @param {number} request.pageSize * Number of instance partitions to be returned in the response. If 0 or less, * defaults to the server's maximum allowed page size. @@ -3835,12 +3839,11 @@ export class InstanceAdminClient { ) as AsyncIterable; } /** - * Lists instance partition [long-running - * operations][google.longrunning.Operation] in the given instance. + * Lists instance partition long-running operations in the given instance. * An instance partition operation has a name of the form * `projects//instances//instancePartitions//operations/`. * The long-running operation - * {@link protos.google.longrunning.Operation.metadata|metadata} field type + * metadata field type * `metadata.type_url` describes the type of the metadata. Operations returned * include those that have completed/failed/canceled within the last 7 days, * and pending operations. Operations returned are ordered by @@ -3865,8 +3868,7 @@ export class InstanceAdminClient { * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. * Colon `:` is the contains operator. Filter rules are not case sensitive. * - * The following fields in the {@link protos.google.longrunning.Operation|Operation} - * are eligible for filtering: + * The following fields in the Operation are eligible for filtering: * * * `name` - The name of the long-running operation * * `done` - False if the operation is in progress, else true. @@ -3913,7 +3915,8 @@ export class InstanceAdminClient { * Optional. Deadline used while retrieving metadata for instance partition * operations. Instance partitions whose operation metadata cannot be * retrieved within this deadline will be added to - * {@link protos.ListInstancePartitionOperationsResponse.unreachable|unreachable} in + * {@link protos.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.unreachable_instance_partitions|unreachable_instance_partitions} + * in * {@link protos.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse|ListInstancePartitionOperationsResponse}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -4022,8 +4025,7 @@ export class InstanceAdminClient { * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. * Colon `:` is the contains operator. Filter rules are not case sensitive. * - * The following fields in the {@link protos.google.longrunning.Operation|Operation} - * are eligible for filtering: + * The following fields in the Operation are eligible for filtering: * * * `name` - The name of the long-running operation * * `done` - False if the operation is in progress, else true. @@ -4070,7 +4072,8 @@ export class InstanceAdminClient { * Optional. Deadline used while retrieving metadata for instance partition * operations. Instance partitions whose operation metadata cannot be * retrieved within this deadline will be added to - * {@link protos.ListInstancePartitionOperationsResponse.unreachable|unreachable} in + * {@link protos.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.unreachable_instance_partitions|unreachable_instance_partitions} + * in * {@link protos.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse|ListInstancePartitionOperationsResponse}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. @@ -4124,8 +4127,7 @@ export class InstanceAdminClient { * must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. * Colon `:` is the contains operator. Filter rules are not case sensitive. * - * The following fields in the {@link protos.google.longrunning.Operation|Operation} - * are eligible for filtering: + * The following fields in the Operation are eligible for filtering: * * * `name` - The name of the long-running operation * * `done` - False if the operation is in progress, else true. @@ -4172,7 +4174,8 @@ export class InstanceAdminClient { * Optional. Deadline used while retrieving metadata for instance partition * operations. Instance partitions whose operation metadata cannot be * retrieved within this deadline will be added to - * {@link protos.ListInstancePartitionOperationsResponse.unreachable|unreachable} in + * {@link protos.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse.unreachable_instance_partitions|unreachable_instance_partitions} + * in * {@link protos.google.spanner.admin.instance.v1.ListInstancePartitionOperationsResponse|ListInstancePartitionOperationsResponse}. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. diff --git a/src/v1/spanner_client.ts b/src/v1/spanner_client.ts index f74b84b0b..2d0808283 100644 --- a/src/v1/spanner_client.ts +++ b/src/v1/spanner_client.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_database_admin_v1.ts b/test/gapic_database_admin_v1.ts index f30e64281..403a643b9 100644 --- a/test/gapic_database_admin_v1.ts +++ b/test/gapic_database_admin_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/test/gapic_spanner_v1.ts b/test/gapic_spanner_v1.ts index b98138a1a..9fd09edbd 100644 --- a/test/gapic_spanner_v1.ts +++ b/test/gapic_spanner_v1.ts @@ -1,4 +1,4 @@ -// Copyright 2024 Google LLC +// Copyright 2025 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License.