Skip to content

Commit a141dc5

Browse files
feat: Automated regeneration of SQLAdmin client (googleapis#12961)
Auto-created at 2025-02-12 13:15:34 +0000 using the toys pull request generator.
1 parent 6faf268 commit a141dc5

14 files changed

+689
-4
lines changed

clients/sql_admin/lib/google_api/sql_admin/v1beta4/api/backups.ex

Lines changed: 339 additions & 0 deletions
Large diffs are not rendered by default.

clients/sql_admin/lib/google_api/sql_admin/v1beta4/api/instances.ex

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,10 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Api.Instances do
497497
* `:quotaUser` (*type:* `String.t`) - Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
498498
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
499499
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
500+
* `:enableFinalBackup` (*type:* `boolean()`) - Flag to opt-in for final backup. By default, it is turned off.
501+
* `:finalBackupDescription` (*type:* `String.t`) - Optional. The description of the final backup.
502+
* `:finalBackupExpiryTime` (*type:* `DateTime.t`) - Optional. Final Backup expiration time. Timestamp in UTC of when this resource is considered expired.
503+
* `:finalBackupTtlDays` (*type:* `String.t`) - Optional. Retention period of the final backup.
500504
* `opts` (*type:* `keyword()`) - Call options
501505
502506
## Returns
@@ -521,7 +525,11 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Api.Instances do
521525
:prettyPrint => :query,
522526
:quotaUser => :query,
523527
:uploadType => :query,
524-
:upload_protocol => :query
528+
:upload_protocol => :query,
529+
:enableFinalBackup => :query,
530+
:finalBackupDescription => :query,
531+
:finalBackupExpiryTime => :query,
532+
:finalBackupTtlDays => :query
525533
}
526534

527535
request =

clients/sql_admin/lib/google_api/sql_admin/v1beta4/metadata.ex

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

23-
@discovery_revision "20250129"
23+
@discovery_revision "20250205"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
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.SQLAdmin.V1beta4.Model.Backup do
19+
@moduledoc """
20+
A backup resource.
21+
22+
## Attributes
23+
24+
* `backupInterval` (*type:* `GoogleApi.SQLAdmin.V1beta4.Model.Interval.t`, *default:* `nil`) - Output only. This output contains the following values: start_time: All database writes up to this time are available. end_time: Any database writes after this time aren't available.
25+
* `backupKind` (*type:* `String.t`, *default:* `nil`) - Output only. Specifies the kind of backup, PHYSICAL or DEFAULT_SNAPSHOT.
26+
* `backupRun` (*type:* `String.t`, *default:* `nil`) - Output only. The mapping to backup run resource used for IAM validations.
27+
* `description` (*type:* `String.t`, *default:* `nil`) - The description of this backup.
28+
* `error` (*type:* `GoogleApi.SQLAdmin.V1beta4.Model.OperationError.t`, *default:* `nil`) - Output only. Information about why the backup operation fails (for example, when the backup state fails).
29+
* `expiryTime` (*type:* `DateTime.t`, *default:* `nil`) - Backup expiration time. A UTC timestamp of when this resource expired.
30+
* `instance` (*type:* `String.t`, *default:* `nil`) - The name of the database instance.
31+
* `kind` (*type:* `String.t`, *default:* `nil`) - Output only. This is always `sql#backup`.
32+
* `kmsKey` (*type:* `String.t`, *default:* `nil`) - Output only. This output contains the encryption configuration for a backup and the resource name of the KMS key for disk encryption.
33+
* `kmsKeyVersion` (*type:* `String.t`, *default:* `nil`) - Output only. This output contains the encryption status for a backup and the version of the KMS key that's used to encrypt the Cloud SQL instance.
34+
* `location` (*type:* `String.t`, *default:* `nil`) - The storage location of the backups. The location can be multi-regional.
35+
* `maxChargeableBytes` (*type:* `String.t`, *default:* `nil`) - Output only. The maximum chargeable bytes for the backup.
36+
* `name` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the backup. Format: projects/{project}/backups/{backup}
37+
* `satisfiesPzi` (*type:* `boolean()`, *default:* `nil`) - Output only. This status indicates whether the backup satisfies PZI. The status is reserved for future use.
38+
* `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - Output only. This status indicates whether the backup satisfies PZS. The status is reserved for future use.
39+
* `selfLink` (*type:* `String.t`, *default:* `nil`) - Output only. The URI of this resource.
40+
* `state` (*type:* `String.t`, *default:* `nil`) - Output only. The state of this backup.
41+
* `timeZone` (*type:* `String.t`, *default:* `nil`) - Output only. This output contains a backup time zone. If a Cloud SQL for SQL Server instance has a different time zone from the backup's time zone, then restores to the instance won't happen.
42+
* `ttlDays` (*type:* `String.t`, *default:* `nil`) - Input only. The time-to-live (TTL) interval for this resource (in days). For example: ttlDays:7 means 7 days.
43+
* `type` (*type:* `String.t`, *default:* `nil`) - Output only. The type of this backup. The type can be "AUTOMATED", "ON_DEMAND", or “FINAL”.
44+
"""
45+
46+
use GoogleApi.Gax.ModelBase
47+
48+
@type t :: %__MODULE__{
49+
:backupInterval => GoogleApi.SQLAdmin.V1beta4.Model.Interval.t() | nil,
50+
:backupKind => String.t() | nil,
51+
:backupRun => String.t() | nil,
52+
:description => String.t() | nil,
53+
:error => GoogleApi.SQLAdmin.V1beta4.Model.OperationError.t() | nil,
54+
:expiryTime => DateTime.t() | nil,
55+
:instance => String.t() | nil,
56+
:kind => String.t() | nil,
57+
:kmsKey => String.t() | nil,
58+
:kmsKeyVersion => String.t() | nil,
59+
:location => String.t() | nil,
60+
:maxChargeableBytes => String.t() | nil,
61+
:name => String.t() | nil,
62+
:satisfiesPzi => boolean() | nil,
63+
:satisfiesPzs => boolean() | nil,
64+
:selfLink => String.t() | nil,
65+
:state => String.t() | nil,
66+
:timeZone => String.t() | nil,
67+
:ttlDays => String.t() | nil,
68+
:type => String.t() | nil
69+
}
70+
71+
field(:backupInterval, as: GoogleApi.SQLAdmin.V1beta4.Model.Interval)
72+
field(:backupKind)
73+
field(:backupRun)
74+
field(:description)
75+
field(:error, as: GoogleApi.SQLAdmin.V1beta4.Model.OperationError)
76+
field(:expiryTime, as: DateTime)
77+
field(:instance)
78+
field(:kind)
79+
field(:kmsKey)
80+
field(:kmsKeyVersion)
81+
field(:location)
82+
field(:maxChargeableBytes)
83+
field(:name)
84+
field(:satisfiesPzi)
85+
field(:satisfiesPzs)
86+
field(:selfLink)
87+
field(:state)
88+
field(:timeZone)
89+
field(:ttlDays)
90+
field(:type)
91+
end
92+
93+
defimpl Poison.Decoder, for: GoogleApi.SQLAdmin.V1beta4.Model.Backup do
94+
def decode(value, options) do
95+
GoogleApi.SQLAdmin.V1beta4.Model.Backup.decode(value, options)
96+
end
97+
end
98+
99+
defimpl Poison.Encoder, for: GoogleApi.SQLAdmin.V1beta4.Model.Backup do
100+
def encode(value, options) do
101+
GoogleApi.Gax.ModelBase.encode(value, options)
102+
end
103+
end

clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/backup_context.ex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,20 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Model.BackupContext do
2323
2424
* `backupId` (*type:* `String.t`, *default:* `nil`) - The identifier of the backup.
2525
* `kind` (*type:* `String.t`, *default:* `nil`) - This is always `sql#backupContext`.
26+
* `name` (*type:* `String.t`, *default:* `nil`) - The name of the backup. Format: projects/{project}/backups/{backup}
2627
"""
2728

2829
use GoogleApi.Gax.ModelBase
2930

3031
@type t :: %__MODULE__{
3132
:backupId => String.t() | nil,
32-
:kind => String.t() | nil
33+
:kind => String.t() | nil,
34+
:name => String.t() | nil
3335
}
3436

3537
field(:backupId)
3638
field(:kind)
39+
field(:name)
3740
end
3841

3942
defimpl Poison.Decoder, for: GoogleApi.SQLAdmin.V1beta4.Model.BackupContext do

clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/database_instance.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Model.DatabaseInstance do
3939
* `sqlNetworkArchitecture` (*type:* `String.t`, *default:* `nil`) - The SQL network architecture for the instance.
4040
* `instanceType` (*type:* `String.t`, *default:* `nil`) - The instance type.
4141
* `backendType` (*type:* `String.t`, *default:* `nil`) - The backend type. `SECOND_GEN`: Cloud SQL database instance. `EXTERNAL`: A database server that is not managed by Google. This property is read-only; use the `tier` property in the `settings` object to determine the database type.
42+
* `includeReplicasForMajorVersionUpgrade` (*type:* `boolean()`, *default:* `nil`) - Input only. Determines whether an in-place major version upgrade of replicas happens when an in-place major version upgrade of a primary instance is initiated.
4243
* `replicaNames` (*type:* `list(String.t)`, *default:* `nil`) - The replicas of the instance.
4344
* `writeEndpoint` (*type:* `String.t`, *default:* `nil`) - Output only. The dns name of the primary instance in a replication group.
4445
* `region` (*type:* `String.t`, *default:* `nil`) - The geographical region of the Cloud SQL instance. It can be one of the [regions](https://cloud.google.com/sql/docs/mysql/locations#location-r) where Cloud SQL operates: For example, `asia-east1`, `europe-west1`, and `us-central1`. The default value is `us-central1`.
@@ -93,6 +94,7 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Model.DatabaseInstance do
9394
:sqlNetworkArchitecture => String.t() | nil,
9495
:instanceType => String.t() | nil,
9596
:backendType => String.t() | nil,
97+
:includeReplicasForMajorVersionUpgrade => boolean() | nil,
9698
:replicaNames => list(String.t()) | nil,
9799
:writeEndpoint => String.t() | nil,
98100
:region => String.t() | nil,
@@ -152,6 +154,7 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Model.DatabaseInstance do
152154
field(:sqlNetworkArchitecture)
153155
field(:instanceType)
154156
field(:backendType)
157+
field(:includeReplicasForMajorVersionUpgrade)
155158
field(:replicaNames, type: :list)
156159
field(:writeEndpoint)
157160
field(:region)

clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/export_context.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Model.ExportContext do
2828
* `kind` (*type:* `String.t`, *default:* `nil`) - This is always `sql#exportContext`.
2929
* `offload` (*type:* `boolean()`, *default:* `nil`) - Option for export offload.
3030
* `sqlExportOptions` (*type:* `GoogleApi.SQLAdmin.V1beta4.Model.ExportContextSqlExportOptions.t`, *default:* `nil`) - Options for exporting data as SQL statements.
31+
* `tdeExportOptions` (*type:* `GoogleApi.SQLAdmin.V1beta4.Model.ExportContextTdeExportOptions.t`, *default:* `nil`) - Optional. Export parameters specific to SQL Server TDE certificates
3132
* `uri` (*type:* `String.t`, *default:* `nil`) - The path to the file in Google Cloud Storage where the export will be stored. The URI is in the form `gs://bucketName/fileName`. If the file already exists, the request succeeds, but the operation fails. If `fileType` is `SQL` and the filename ends with .gz, the contents are compressed.
3233
"""
3334

@@ -44,6 +45,8 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Model.ExportContext do
4445
:offload => boolean() | nil,
4546
:sqlExportOptions =>
4647
GoogleApi.SQLAdmin.V1beta4.Model.ExportContextSqlExportOptions.t() | nil,
48+
:tdeExportOptions =>
49+
GoogleApi.SQLAdmin.V1beta4.Model.ExportContextTdeExportOptions.t() | nil,
4750
:uri => String.t() | nil
4851
}
4952

@@ -54,6 +57,7 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Model.ExportContext do
5457
field(:kind)
5558
field(:offload)
5659
field(:sqlExportOptions, as: GoogleApi.SQLAdmin.V1beta4.Model.ExportContextSqlExportOptions)
60+
field(:tdeExportOptions, as: GoogleApi.SQLAdmin.V1beta4.Model.ExportContextTdeExportOptions)
5761
field(:uri)
5862
end
5963

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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.SQLAdmin.V1beta4.Model.ExportContextTdeExportOptions do
19+
@moduledoc """
20+
Optional. Export parameters specific to SQL Server TDE certificates
21+
22+
## Attributes
23+
24+
* `certificatePath` (*type:* `String.t`, *default:* `nil`) - Required. Path to the TDE certificate public key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.
25+
* `name` (*type:* `String.t`, *default:* `nil`) - Required. Certificate name. Applicable only for SQL Server instances.
26+
* `privateKeyPassword` (*type:* `String.t`, *default:* `nil`) - Required. Password that encrypts the private key.
27+
* `privateKeyPath` (*type:* `String.t`, *default:* `nil`) - Required. Path to the TDE certificate private key in the form gs://bucketName/fileName. The instance must have write access to the location. Applicable only for SQL Server instances.
28+
"""
29+
30+
use GoogleApi.Gax.ModelBase
31+
32+
@type t :: %__MODULE__{
33+
:certificatePath => String.t() | nil,
34+
:name => String.t() | nil,
35+
:privateKeyPassword => String.t() | nil,
36+
:privateKeyPath => String.t() | nil
37+
}
38+
39+
field(:certificatePath)
40+
field(:name)
41+
field(:privateKeyPassword)
42+
field(:privateKeyPath)
43+
end
44+
45+
defimpl Poison.Decoder, for: GoogleApi.SQLAdmin.V1beta4.Model.ExportContextTdeExportOptions do
46+
def decode(value, options) do
47+
GoogleApi.SQLAdmin.V1beta4.Model.ExportContextTdeExportOptions.decode(value, options)
48+
end
49+
end
50+
51+
defimpl Poison.Encoder, for: GoogleApi.SQLAdmin.V1beta4.Model.ExportContextTdeExportOptions do
52+
def encode(value, options) do
53+
GoogleApi.Gax.ModelBase.encode(value, options)
54+
end
55+
end

clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/import_context.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Model.ImportContext do
2828
* `importUser` (*type:* `String.t`, *default:* `nil`) - The PostgreSQL user for this import operation. PostgreSQL instances only.
2929
* `kind` (*type:* `String.t`, *default:* `nil`) - This is always `sql#importContext`.
3030
* `sqlImportOptions` (*type:* `GoogleApi.SQLAdmin.V1beta4.Model.ImportContextSqlImportOptions.t`, *default:* `nil`) - Optional. Options for importing data from SQL statements.
31+
* `tdeImportOptions` (*type:* `GoogleApi.SQLAdmin.V1beta4.Model.ImportContextTdeImportOptions.t`, *default:* `nil`) - Optional. Import parameters specific to SQL Server .TDE files Import parameters specific to SQL Server TDE certificates
3132
* `uri` (*type:* `String.t`, *default:* `nil`) - Path to the import file in Cloud Storage, in the form `gs://bucketName/fileName`. Compressed gzip files (.gz) are supported when `fileType` is `SQL`. The instance must have write permissions to the bucket and read access to the file.
3233
"""
3334

@@ -44,6 +45,8 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Model.ImportContext do
4445
:kind => String.t() | nil,
4546
:sqlImportOptions =>
4647
GoogleApi.SQLAdmin.V1beta4.Model.ImportContextSqlImportOptions.t() | nil,
48+
:tdeImportOptions =>
49+
GoogleApi.SQLAdmin.V1beta4.Model.ImportContextTdeImportOptions.t() | nil,
4750
:uri => String.t() | nil
4851
}
4952

@@ -54,6 +57,7 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Model.ImportContext do
5457
field(:importUser)
5558
field(:kind)
5659
field(:sqlImportOptions, as: GoogleApi.SQLAdmin.V1beta4.Model.ImportContextSqlImportOptions)
60+
field(:tdeImportOptions, as: GoogleApi.SQLAdmin.V1beta4.Model.ImportContextTdeImportOptions)
5761
field(:uri)
5862
end
5963

clients/sql_admin/lib/google_api/sql_admin/v1beta4/model/import_context_bak_import_options_encryption_options.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Model.ImportContextBakImportOptionsEncrypti
2222
## Attributes
2323
2424
* `certPath` (*type:* `String.t`, *default:* `nil`) - Path to the Certificate (.cer) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.
25+
* `keepEncrypted` (*type:* `boolean()`, *default:* `nil`) - Optional. Whether the imported file remains encrypted.
2526
* `pvkPassword` (*type:* `String.t`, *default:* `nil`) - Password that encrypts the private key
2627
* `pvkPath` (*type:* `String.t`, *default:* `nil`) - Path to the Certificate Private Key (.pvk) in Cloud Storage, in the form `gs://bucketName/fileName`. The instance must have write permissions to the bucket and read access to the file.
2728
"""
@@ -30,11 +31,13 @@ defmodule GoogleApi.SQLAdmin.V1beta4.Model.ImportContextBakImportOptionsEncrypti
3031

3132
@type t :: %__MODULE__{
3233
:certPath => String.t() | nil,
34+
:keepEncrypted => boolean() | nil,
3335
:pvkPassword => String.t() | nil,
3436
:pvkPath => String.t() | nil
3537
}
3638

3739
field(:certPath)
40+
field(:keepEncrypted)
3841
field(:pvkPassword)
3942
field(:pvkPath)
4043
end

0 commit comments

Comments
 (0)