Skip to content

Commit cfd0672

Browse files
feat: Automated regeneration of AlloyDB client (#13047)
Auto-created at 2025-02-28 13:12:11 +0000 using the toys pull request generator.
1 parent dd85f66 commit cfd0672

15 files changed

+481
-6
lines changed

clients/alloy_db/lib/google_api/alloy_db/v1/api/projects.ex

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,78 @@ defmodule GoogleApi.AlloyDB.V1.Api.Projects do
12791279
|> Response.decode(opts ++ [struct: %GoogleApi.AlloyDB.V1.Model.Operation{}])
12801280
end
12811281

1282+
@doc """
1283+
Restores an AlloyDB cluster from a CloudSQL resource.
1284+
1285+
## Parameters
1286+
1287+
* `connection` (*type:* `GoogleApi.AlloyDB.V1.Connection.t`) - Connection to server
1288+
* `parent` (*type:* `String.t`) - Required. The location of the new cluster. For the required format, see the comment on Cluster.name field.
1289+
* `optional_params` (*type:* `keyword()`) - Optional parameters
1290+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
1291+
* `:access_token` (*type:* `String.t`) - OAuth access token.
1292+
* `:alt` (*type:* `String.t`) - Data format for response.
1293+
* `:callback` (*type:* `String.t`) - JSONP
1294+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
1295+
* `:key` (*type:* `String.t`) - API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
1296+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
1297+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
1298+
* `: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.
1299+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
1300+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
1301+
* `:body` (*type:* `GoogleApi.AlloyDB.V1.Model.RestoreFromCloudSQLRequest.t`) -
1302+
* `opts` (*type:* `keyword()`) - Call options
1303+
1304+
## Returns
1305+
1306+
* `{:ok, %GoogleApi.AlloyDB.V1.Model.Operation{}}` on success
1307+
* `{:error, info}` on failure
1308+
"""
1309+
@spec alloydb_projects_locations_clusters_restore_from_cloud_sql(
1310+
Tesla.Env.client(),
1311+
String.t(),
1312+
keyword(),
1313+
keyword()
1314+
) ::
1315+
{:ok, GoogleApi.AlloyDB.V1.Model.Operation.t()}
1316+
| {:ok, Tesla.Env.t()}
1317+
| {:ok, list()}
1318+
| {:error, any()}
1319+
def alloydb_projects_locations_clusters_restore_from_cloud_sql(
1320+
connection,
1321+
parent,
1322+
optional_params \\ [],
1323+
opts \\ []
1324+
) do
1325+
optional_params_config = %{
1326+
:"$.xgafv" => :query,
1327+
:access_token => :query,
1328+
:alt => :query,
1329+
:callback => :query,
1330+
:fields => :query,
1331+
:key => :query,
1332+
:oauth_token => :query,
1333+
:prettyPrint => :query,
1334+
:quotaUser => :query,
1335+
:uploadType => :query,
1336+
:upload_protocol => :query,
1337+
:body => :body
1338+
}
1339+
1340+
request =
1341+
Request.new()
1342+
|> Request.method(:post)
1343+
|> Request.url("/v1/{+parent}/clusters:restoreFromCloudSQL", %{
1344+
"parent" => URI.encode(parent, &URI.char_unreserved?/1)
1345+
})
1346+
|> Request.add_optional_params(optional_params_config, optional_params)
1347+
|> Request.library_version(@library_version)
1348+
1349+
connection
1350+
|> Connection.execute(request)
1351+
|> Response.decode(opts ++ [struct: %GoogleApi.AlloyDB.V1.Model.Operation{}])
1352+
end
1353+
12821354
@doc """
12831355
Switches the roles of PRIMARY and SECONDARY clusters without any data loss. This promotes the SECONDARY cluster to PRIMARY and sets up the original PRIMARY cluster to replicate from this newly promoted cluster.
12841356
@@ -2862,6 +2934,7 @@ defmodule GoogleApi.AlloyDB.V1.Api.Projects do
28622934
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
28632935
* `:pageSize` (*type:* `integer()`) - Requested page size. Server may return fewer items than requested. If unspecified, server will pick an appropriate default.
28642936
* `:pageToken` (*type:* `String.t`) - A token identifying a page of results the server should return.
2937+
* `:scope` (*type:* `String.t`) - Optional. The scope for which supported flags are requested. If not specified, default is DATABASE.
28652938
* `opts` (*type:* `keyword()`) - Call options
28662939
28672940
## Returns
@@ -2898,7 +2971,8 @@ defmodule GoogleApi.AlloyDB.V1.Api.Projects do
28982971
:uploadType => :query,
28992972
:upload_protocol => :query,
29002973
:pageSize => :query,
2901-
:pageToken => :query
2974+
:pageToken => :query,
2975+
:scope => :query
29022976
}
29032977

29042978
request =

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

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

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

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

clients/alloy_db/lib/google_api/alloy_db/v1/model/continuous_backup_config.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defmodule GoogleApi.AlloyDB.V1.Model.ContinuousBackupConfig do
2222
## Attributes
2323
2424
* `enabled` (*type:* `boolean()`, *default:* `nil`) - Whether ContinuousBackup is enabled.
25-
* `encryptionConfig` (*type:* `GoogleApi.AlloyDB.V1.Model.EncryptionConfig.t`, *default:* `nil`) - The encryption config can be specified to encrypt the backups with a customer-managed encryption key (CMEK). When this field is not specified, the backup will then use default encryption scheme to protect the user data.
25+
* `encryptionConfig` (*type:* `GoogleApi.AlloyDB.V1.Model.EncryptionConfig.t`, *default:* `nil`) - The encryption config can be specified to encrypt the backups with a customer-managed encryption key (CMEK). When this field is not specified, the backup will use the cluster's encryption config.
2626
* `recoveryWindowDays` (*type:* `integer()`, *default:* `nil`) - The number of days that are eligible to restore from using PITR. To support the entire recovery window, backups and logs are retained for one day more than the recovery window. If not set, defaults to 14 days.
2727
"""
2828

clients/alloy_db/lib/google_api/alloy_db/v1/model/node.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
defmodule GoogleApi.AlloyDB.V1.Model.Node do
1919
@moduledoc """
20-
Details of a single node in the instance. Nodes in an AlloyDB instance are ephemereal, they can change during update, failover, autohealing and resize operations.
20+
Details of a single node in the instance. Nodes in an AlloyDB instance are ephemeral, they can change during update, failover, autohealing and resize operations.
2121
2222
## Attributes
2323

clients/alloy_db/lib/google_api/alloy_db/v1/model/operation_metadata.ex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ defmodule GoogleApi.AlloyDB.V1.Model.OperationMetadata do
2727
* `requestedCancellation` (*type:* `boolean()`, *default:* `nil`) - Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have google.longrunning.Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
2828
* `statusMessage` (*type:* `String.t`, *default:* `nil`) - Output only. Human-readable status of the operation, if any.
2929
* `target` (*type:* `String.t`, *default:* `nil`) - Output only. Server-defined resource path for the target of the operation.
30+
* `upgradeClusterStatus` (*type:* `GoogleApi.AlloyDB.V1.Model.UpgradeClusterStatus.t`, *default:* `nil`) - Output only. UpgradeClusterStatus related metadata.
3031
* `verb` (*type:* `String.t`, *default:* `nil`) - Output only. Name of the verb executed by the operation.
3132
"""
3233

@@ -39,6 +40,7 @@ defmodule GoogleApi.AlloyDB.V1.Model.OperationMetadata do
3940
:requestedCancellation => boolean() | nil,
4041
:statusMessage => String.t() | nil,
4142
:target => String.t() | nil,
43+
:upgradeClusterStatus => GoogleApi.AlloyDB.V1.Model.UpgradeClusterStatus.t() | nil,
4244
:verb => String.t() | nil
4345
}
4446

@@ -48,6 +50,7 @@ defmodule GoogleApi.AlloyDB.V1.Model.OperationMetadata do
4850
field(:requestedCancellation)
4951
field(:statusMessage)
5052
field(:target)
53+
field(:upgradeClusterStatus, as: GoogleApi.AlloyDB.V1.Model.UpgradeClusterStatus)
5154
field(:verb)
5255
end
5356

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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.AlloyDB.V1.Model.PscAutoConnectionConfig do
19+
@moduledoc """
20+
Configuration for setting up PSC service automation. Consumer projects in the configs will be allowlisted automatically for the instance.
21+
22+
## Attributes
23+
24+
* `consumerNetwork` (*type:* `String.t`, *default:* `nil`) - The consumer network for the PSC service automation, example: "projects/vpc-host-project/global/networks/default". The consumer network might be hosted a different project than the consumer project.
25+
* `consumerNetworkStatus` (*type:* `String.t`, *default:* `nil`) - Output only. The status of the service connection policy.
26+
* `consumerProject` (*type:* `String.t`, *default:* `nil`) - The consumer project to which the PSC service automation endpoint will be created.
27+
* `ipAddress` (*type:* `String.t`, *default:* `nil`) - Output only. The IP address of the PSC service automation endpoint.
28+
* `status` (*type:* `String.t`, *default:* `nil`) - Output only. The status of the PSC service automation connection.
29+
"""
30+
31+
use GoogleApi.Gax.ModelBase
32+
33+
@type t :: %__MODULE__{
34+
:consumerNetwork => String.t() | nil,
35+
:consumerNetworkStatus => String.t() | nil,
36+
:consumerProject => String.t() | nil,
37+
:ipAddress => String.t() | nil,
38+
:status => String.t() | nil
39+
}
40+
41+
field(:consumerNetwork)
42+
field(:consumerNetworkStatus)
43+
field(:consumerProject)
44+
field(:ipAddress)
45+
field(:status)
46+
end
47+
48+
defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.PscAutoConnectionConfig do
49+
def decode(value, options) do
50+
GoogleApi.AlloyDB.V1.Model.PscAutoConnectionConfig.decode(value, options)
51+
end
52+
end
53+
54+
defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.PscAutoConnectionConfig do
55+
def encode(value, options) do
56+
GoogleApi.Gax.ModelBase.encode(value, options)
57+
end
58+
end

clients/alloy_db/lib/google_api/alloy_db/v1/model/psc_instance_config.ex

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ defmodule GoogleApi.AlloyDB.V1.Model.PscInstanceConfig do
2222
## Attributes
2323
2424
* `allowedConsumerProjects` (*type:* `list(String.t)`, *default:* `nil`) - Optional. List of consumer projects that are allowed to create PSC endpoints to service-attachments to this instance.
25+
* `pscAutoConnections` (*type:* `list(GoogleApi.AlloyDB.V1.Model.PscAutoConnectionConfig.t)`, *default:* `nil`) - Optional. Configurations for setting up PSC service automation.
2526
* `pscDnsName` (*type:* `String.t`, *default:* `nil`) - Output only. The DNS name of the instance for PSC connectivity. Name convention: ...alloydb-psc.goog
2627
* `pscInterfaceConfigs` (*type:* `list(GoogleApi.AlloyDB.V1.Model.PscInterfaceConfig.t)`, *default:* `nil`) - Optional. Configurations for setting up PSC interfaces attached to the instance which are used for outbound connectivity. Only primary instances can have PSC interface attached. Currently we only support 0 or 1 PSC interface.
2728
* `serviceAttachmentLink` (*type:* `String.t`, *default:* `nil`) - Output only. The service attachment created when Private Service Connect (PSC) is enabled for the instance. The name of the resource will be in the format of `projects//regions//serviceAttachments/`
@@ -31,12 +32,15 @@ defmodule GoogleApi.AlloyDB.V1.Model.PscInstanceConfig do
3132

3233
@type t :: %__MODULE__{
3334
:allowedConsumerProjects => list(String.t()) | nil,
35+
:pscAutoConnections =>
36+
list(GoogleApi.AlloyDB.V1.Model.PscAutoConnectionConfig.t()) | nil,
3437
:pscDnsName => String.t() | nil,
3538
:pscInterfaceConfigs => list(GoogleApi.AlloyDB.V1.Model.PscInterfaceConfig.t()) | nil,
3639
:serviceAttachmentLink => String.t() | nil
3740
}
3841

3942
field(:allowedConsumerProjects, type: :list)
43+
field(:pscAutoConnections, as: GoogleApi.AlloyDB.V1.Model.PscAutoConnectionConfig, type: :list)
4044
field(:pscDnsName)
4145
field(:pscInterfaceConfigs, as: GoogleApi.AlloyDB.V1.Model.PscInterfaceConfig, type: :list)
4246
field(:serviceAttachmentLink)
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.AlloyDB.V1.Model.ReadPoolInstancesUpgradeStageStatus do
19+
@moduledoc """
20+
Read pool instances upgrade specific status.
21+
22+
## Attributes
23+
24+
* `upgradeStats` (*type:* `GoogleApi.AlloyDB.V1.Model.Stats.t`, *default:* `nil`) - Read pool instances upgrade statistics.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:upgradeStats => GoogleApi.AlloyDB.V1.Model.Stats.t() | nil
31+
}
32+
33+
field(:upgradeStats, as: GoogleApi.AlloyDB.V1.Model.Stats)
34+
end
35+
36+
defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.ReadPoolInstancesUpgradeStageStatus do
37+
def decode(value, options) do
38+
GoogleApi.AlloyDB.V1.Model.ReadPoolInstancesUpgradeStageStatus.decode(value, options)
39+
end
40+
end
41+
42+
defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.ReadPoolInstancesUpgradeStageStatus do
43+
def encode(value, options) do
44+
GoogleApi.Gax.ModelBase.encode(value, options)
45+
end
46+
end
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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.AlloyDB.V1.Model.RestoreFromCloudSQLRequest do
19+
@moduledoc """
20+
Message for registering Restoring from CloudSQL resource.
21+
22+
## Attributes
23+
24+
* `cloudsqlBackupRunSource` (*type:* `GoogleApi.AlloyDB.V1.Model.CloudSQLBackupRunSource.t`, *default:* `nil`) - Cluster created from CloudSQL backup run.
25+
* `cluster` (*type:* `GoogleApi.AlloyDB.V1.Model.Cluster.t`, *default:* `nil`) - Required. The resource being created
26+
* `clusterId` (*type:* `String.t`, *default:* `nil`) - Required. ID of the requesting object.
27+
"""
28+
29+
use GoogleApi.Gax.ModelBase
30+
31+
@type t :: %__MODULE__{
32+
:cloudsqlBackupRunSource =>
33+
GoogleApi.AlloyDB.V1.Model.CloudSQLBackupRunSource.t() | nil,
34+
:cluster => GoogleApi.AlloyDB.V1.Model.Cluster.t() | nil,
35+
:clusterId => String.t() | nil
36+
}
37+
38+
field(:cloudsqlBackupRunSource, as: GoogleApi.AlloyDB.V1.Model.CloudSQLBackupRunSource)
39+
field(:cluster, as: GoogleApi.AlloyDB.V1.Model.Cluster)
40+
field(:clusterId)
41+
end
42+
43+
defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.RestoreFromCloudSQLRequest do
44+
def decode(value, options) do
45+
GoogleApi.AlloyDB.V1.Model.RestoreFromCloudSQLRequest.decode(value, options)
46+
end
47+
end
48+
49+
defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.RestoreFromCloudSQLRequest do
50+
def encode(value, options) do
51+
GoogleApi.Gax.ModelBase.encode(value, options)
52+
end
53+
end
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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.AlloyDB.V1.Model.StageStatus do
19+
@moduledoc """
20+
Status of an upgrade stage.
21+
22+
## Attributes
23+
24+
* `readPoolInstancesUpgrade` (*type:* `GoogleApi.AlloyDB.V1.Model.ReadPoolInstancesUpgradeStageStatus.t`, *default:* `nil`) - Read pool instances upgrade metadata.
25+
* `stage` (*type:* `String.t`, *default:* `nil`) - Upgrade stage.
26+
* `state` (*type:* `String.t`, *default:* `nil`) - State of this stage.
27+
"""
28+
29+
use GoogleApi.Gax.ModelBase
30+
31+
@type t :: %__MODULE__{
32+
:readPoolInstancesUpgrade =>
33+
GoogleApi.AlloyDB.V1.Model.ReadPoolInstancesUpgradeStageStatus.t() | nil,
34+
:stage => String.t() | nil,
35+
:state => String.t() | nil
36+
}
37+
38+
field(:readPoolInstancesUpgrade,
39+
as: GoogleApi.AlloyDB.V1.Model.ReadPoolInstancesUpgradeStageStatus
40+
)
41+
42+
field(:stage)
43+
field(:state)
44+
end
45+
46+
defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.StageStatus do
47+
def decode(value, options) do
48+
GoogleApi.AlloyDB.V1.Model.StageStatus.decode(value, options)
49+
end
50+
end
51+
52+
defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.StageStatus do
53+
def encode(value, options) do
54+
GoogleApi.Gax.ModelBase.encode(value, options)
55+
end
56+
end

0 commit comments

Comments
 (0)