Skip to content

Commit c6c5f59

Browse files
feat: Automated regeneration of Spanner client (googleapis#12940)
Auto-created at 2025-02-08 13:09:29 +0000 using the toys pull request generator.
1 parent e21ff22 commit c6c5f59

File tree

5 files changed

+56
-6
lines changed

5 files changed

+56
-6
lines changed

clients/spanner/lib/google_api/spanner/v1/metadata.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule GoogleApi.Spanner.V1 do
2020
API client metadata for GoogleApi.Spanner.V1.
2121
"""
2222

23-
@discovery_revision "20250123"
23+
@discovery_revision "20250201"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end

clients/spanner/lib/google_api/spanner/v1/model/backup.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ defmodule GoogleApi.Spanner.V1.Model.Backup do
3131
* `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Required for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.
3232
* `freeableSizeBytes` (*type:* `String.t`, *default:* `nil`) - Output only. The number of bytes that will be freed by deleting this backup. This value will be zero if, for example, this backup is part of an incremental backup chain and younger backups in the chain require that we keep its data. For backups not in an incremental backup chain, this is always the size of the backup. This value may change if backups on the same chain get created, deleted or expired.
3333
* `incrementalBackupChainId` (*type:* `String.t`, *default:* `nil`) - Output only. Populated only for backups in an incremental backup chain. Backups share the same chain id if and only if they belong to the same incremental backup chain. Use this field to determine which backups are part of the same incremental backup chain. The ordering of backups in the chain can be determined by ordering the backup `version_time`.
34+
* `instancePartitions` (*type:* `list(GoogleApi.Spanner.V1.Model.BackupInstancePartition.t)`, *default:* `nil`) - Output only. The instance partition(s) storing the backup. This is the same as the list of the instance partition(s) that the database had footprint in at the backup's `version_time`.
3435
* `maxExpireTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The max allowed expiration time of the backup, with microseconds granularity. A backup's expiration time can be configured in multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or copying an existing backup, the expiration time specified must be less than `Backup.max_expire_time`.
3536
* `name` (*type:* `String.t`, *default:* `nil`) - Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`.
3637
* `oldestVersionTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Data deleted at a time older than this is guaranteed not to be retained in order to support this backup. For a backup in an incremental backup chain, this is the version time of the oldest backup that exists or ever existed in the chain. For all other backups, this is the version time of the backup. This field can be used to understand what data is being retained by the backup system.
@@ -54,6 +55,8 @@ defmodule GoogleApi.Spanner.V1.Model.Backup do
5455
:expireTime => DateTime.t() | nil,
5556
:freeableSizeBytes => String.t() | nil,
5657
:incrementalBackupChainId => String.t() | nil,
58+
:instancePartitions =>
59+
list(GoogleApi.Spanner.V1.Model.BackupInstancePartition.t()) | nil,
5760
:maxExpireTime => DateTime.t() | nil,
5861
:name => String.t() | nil,
5962
:oldestVersionTime => DateTime.t() | nil,
@@ -74,6 +77,7 @@ defmodule GoogleApi.Spanner.V1.Model.Backup do
7477
field(:expireTime, as: DateTime)
7578
field(:freeableSizeBytes)
7679
field(:incrementalBackupChainId)
80+
field(:instancePartitions, as: GoogleApi.Spanner.V1.Model.BackupInstancePartition, type: :list)
7781
field(:maxExpireTime, as: DateTime)
7882
field(:name)
7983
field(:oldestVersionTime, as: DateTime)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright 2019 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# NOTE: This file is auto generated by the elixir code generator program.
16+
# Do not edit this file manually.
17+
18+
defmodule GoogleApi.Spanner.V1.Model.BackupInstancePartition do
19+
@moduledoc """
20+
Instance partition information for the backup.
21+
22+
## Attributes
23+
24+
* `instancePartition` (*type:* `String.t`, *default:* `nil`) - A unique identifier for the instance partition. Values are of the form `projects//instances//instancePartitions/`
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:instancePartition => String.t() | nil
31+
}
32+
33+
field(:instancePartition)
34+
end
35+
36+
defimpl Poison.Decoder, for: GoogleApi.Spanner.V1.Model.BackupInstancePartition do
37+
def decode(value, options) do
38+
GoogleApi.Spanner.V1.Model.BackupInstancePartition.decode(value, options)
39+
end
40+
end
41+
42+
defimpl Poison.Encoder, for: GoogleApi.Spanner.V1.Model.BackupInstancePartition do
43+
def encode(value, options) do
44+
GoogleApi.Gax.ModelBase.encode(value, options)
45+
end
46+
end

clients/spanner/lib/google_api/spanner/v1/model/backup_schedule.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ defmodule GoogleApi.Spanner.V1.Model.BackupSchedule do
2121
2222
## Attributes
2323
24-
* `encryptionConfig` (*type:* `GoogleApi.Spanner.V1.Model.CreateBackupEncryptionConfig.t`, *default:* `nil`) - Optional. The encryption configuration that will be used to encrypt the backup. If this field is not specified, the backup will use the same encryption configuration as the database.
24+
* `encryptionConfig` (*type:* `GoogleApi.Spanner.V1.Model.CreateBackupEncryptionConfig.t`, *default:* `nil`) - Optional. The encryption configuration that is used to encrypt the backup. If this field is not specified, the backup uses the same encryption configuration as the database.
2525
* `fullBackupSpec` (*type:* `GoogleApi.Spanner.V1.Model.FullBackupSpec.t`, *default:* `nil`) - The schedule creates only full backups.
2626
* `incrementalBackupSpec` (*type:* `GoogleApi.Spanner.V1.Model.IncrementalBackupSpec.t`, *default:* `nil`) - The schedule creates incremental backup chains.
2727
* `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Output only for the CreateBackupSchedule operation. Required for the UpdateBackupSchedule operation. A globally unique identifier for the backup schedule which cannot be changed. Values are of the form `projects//instances//databases//backupSchedules/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length.

clients/spanner/lib/google_api/spanner/v1/model/crontab_spec.ex

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717

1818
defmodule GoogleApi.Spanner.V1.Model.CrontabSpec do
1919
@moduledoc """
20-
CrontabSpec can be used to specify the version time and frequency at which the backup should be created.
20+
CrontabSpec can be used to specify the version time and frequency at which the backup is created.
2121
2222
## Attributes
2323
24-
* `creationWindow` (*type:* `String.t`, *default:* `nil`) - Output only. Schedule backups will contain an externally consistent copy of the database at the version time specified in `schedule_spec.cron_spec`. However, Spanner may not initiate the creation of the scheduled backups at that version time. Spanner will initiate the creation of scheduled backups within the time window bounded by the version_time specified in `schedule_spec.cron_spec` and version_time + `creation_window`.
25-
* `text` (*type:* `String.t`, *default:* `nil`) - Required. Textual representation of the crontab. User can customize the backup frequency and the backup version time using the cron expression. The version time must be in UTC timezone. The backup will contain an externally consistent copy of the database at the version time. Full backups must be scheduled a minimum of 12 hours apart and incremental backups must be scheduled a minimum of 4 hours apart. Examples of valid cron specifications: * `0 2/12 * * *` : every 12 hours at (2, 14) hours past midnight in UTC. * `0 2,14 * * *` : every 12 hours at (2,14) hours past midnight in UTC. * `0 */4 * * *` : (incremental backups only) every 4 hours at (0, 4, 8, 12, 16, 20) hours past midnight in UTC. * `0 2 * * *` : once a day at 2 past midnight in UTC. * `0 2 * * 0` : once a week every Sunday at 2 past midnight in UTC. * `0 2 8 * *` : once a month on 8th day at 2 past midnight in UTC.
26-
* `timeZone` (*type:* `String.t`, *default:* `nil`) - Output only. The time zone of the times in `CrontabSpec.text`. Currently only UTC is supported.
24+
* `creationWindow` (*type:* `String.t`, *default:* `nil`) - Output only. Scheduled backups contain an externally consistent copy of the database at the version time specified in `schedule_spec.cron_spec`. However, Spanner might not initiate the creation of the scheduled backups at that version time. Spanner initiates the creation of scheduled backups within the time window bounded by the version_time specified in `schedule_spec.cron_spec` and version_time + `creation_window`.
25+
* `text` (*type:* `String.t`, *default:* `nil`) - Required. Textual representation of the crontab. User can customize the backup frequency and the backup version time using the cron expression. The version time must be in UTC timezone. The backup will contain an externally consistent copy of the database at the version time. Full backups must be scheduled a minimum of 12 hours apart and incremental backups must be scheduled a minimum of 4 hours apart. Examples of valid cron specifications: * `0 2/12 * * *` : every 12 hours at (2, 14) hours past midnight in UTC. * `0 2,14 * * *` : every 12 hours at (2, 14) hours past midnight in UTC. * `0 */4 * * *` : (incremental backups only) every 4 hours at (0, 4, 8, 12, 16, 20) hours past midnight in UTC. * `0 2 * * *` : once a day at 2 past midnight in UTC. * `0 2 * * 0` : once a week every Sunday at 2 past midnight in UTC. * `0 2 8 * *` : once a month on 8th day at 2 past midnight in UTC.
26+
* `timeZone` (*type:* `String.t`, *default:* `nil`) - Output only. The time zone of the times in `CrontabSpec.text`. Currently, only UTC is supported.
2727
"""
2828

2929
use GoogleApi.Gax.ModelBase

0 commit comments

Comments
 (0)