Skip to content

Commit 0d0ee87

Browse files
feat: Automated regeneration of AlloyDB client (googleapis#12968)
Auto-created at 2025-02-15 13:09:37 +0000 using the toys pull request generator.
1 parent cebc3a7 commit 0d0ee87

15 files changed

+394
-5
lines changed

clients/alloy_db/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding
1111

1212
```elixir
1313
def deps do
14-
[{:google_api_alloy_db, "~> 0.15"}]
14+
[{:google_api_alloy_db, "~> 0.16"}]
1515
end
1616
```
1717

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

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,78 @@ defmodule GoogleApi.AlloyDB.V1.Api.Projects do
905905
|> Response.decode(opts ++ [struct: %GoogleApi.AlloyDB.V1.Model.Cluster{}])
906906
end
907907

908+
@doc """
909+
Imports data to the cluster. Imperative only.
910+
911+
## Parameters
912+
913+
* `connection` (*type:* `GoogleApi.AlloyDB.V1.Connection.t`) - Connection to server
914+
* `name` (*type:* `String.t`) - Required. The resource name of the cluster.
915+
* `optional_params` (*type:* `keyword()`) - Optional parameters
916+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
917+
* `:access_token` (*type:* `String.t`) - OAuth access token.
918+
* `:alt` (*type:* `String.t`) - Data format for response.
919+
* `:callback` (*type:* `String.t`) - JSONP
920+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
921+
* `: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.
922+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
923+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
924+
* `: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.
925+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
926+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
927+
* `:body` (*type:* `GoogleApi.AlloyDB.V1.Model.ImportClusterRequest.t`) -
928+
* `opts` (*type:* `keyword()`) - Call options
929+
930+
## Returns
931+
932+
* `{:ok, %GoogleApi.AlloyDB.V1.Model.Operation{}}` on success
933+
* `{:error, info}` on failure
934+
"""
935+
@spec alloydb_projects_locations_clusters_import(
936+
Tesla.Env.client(),
937+
String.t(),
938+
keyword(),
939+
keyword()
940+
) ::
941+
{:ok, GoogleApi.AlloyDB.V1.Model.Operation.t()}
942+
| {:ok, Tesla.Env.t()}
943+
| {:ok, list()}
944+
| {:error, any()}
945+
def alloydb_projects_locations_clusters_import(
946+
connection,
947+
name,
948+
optional_params \\ [],
949+
opts \\ []
950+
) do
951+
optional_params_config = %{
952+
:"$.xgafv" => :query,
953+
:access_token => :query,
954+
:alt => :query,
955+
:callback => :query,
956+
:fields => :query,
957+
:key => :query,
958+
:oauth_token => :query,
959+
:prettyPrint => :query,
960+
:quotaUser => :query,
961+
:uploadType => :query,
962+
:upload_protocol => :query,
963+
:body => :body
964+
}
965+
966+
request =
967+
Request.new()
968+
|> Request.method(:post)
969+
|> Request.url("/v1/{+name}:import", %{
970+
"name" => URI.encode(name, &URI.char_unreserved?/1)
971+
})
972+
|> Request.add_optional_params(optional_params_config, optional_params)
973+
|> Request.library_version(@library_version)
974+
975+
connection
976+
|> Connection.execute(request)
977+
|> Response.decode(opts ++ [struct: %GoogleApi.AlloyDB.V1.Model.Operation{}])
978+
end
979+
908980
@doc """
909981
Lists Clusters in a given project and location.
910982

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 "20241228"
23+
@discovery_revision "20250205"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
end
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
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.CloudSQLBackupRunSource do
19+
@moduledoc """
20+
The source CloudSQL backup resource.
21+
22+
## Attributes
23+
24+
* `backupRunId` (*type:* `String.t`, *default:* `nil`) - Required. The CloudSQL backup run ID.
25+
* `instanceId` (*type:* `String.t`, *default:* `nil`) - Required. The CloudSQL instance ID.
26+
* `project` (*type:* `String.t`, *default:* `nil`) - The project ID of the source CloudSQL instance. This should be the same as the AlloyDB cluster's project.
27+
"""
28+
29+
use GoogleApi.Gax.ModelBase
30+
31+
@type t :: %__MODULE__{
32+
:backupRunId => String.t() | nil,
33+
:instanceId => String.t() | nil,
34+
:project => String.t() | nil
35+
}
36+
37+
field(:backupRunId)
38+
field(:instanceId)
39+
field(:project)
40+
end
41+
42+
defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.CloudSQLBackupRunSource do
43+
def decode(value, options) do
44+
GoogleApi.AlloyDB.V1.Model.CloudSQLBackupRunSource.decode(value, options)
45+
end
46+
end
47+
48+
defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.CloudSQLBackupRunSource do
49+
def encode(value, options) do
50+
GoogleApi.Gax.ModelBase.encode(value, options)
51+
end
52+
end

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ defmodule GoogleApi.AlloyDB.V1.Model.Cluster do
5151
* `uid` (*type:* `String.t`, *default:* `nil`) - Output only. The system-generated UID of the resource. The UID is assigned when the resource is created, and it is retained until it is deleted.
5252
* `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Update time stamp
5353
* `etag` (*type:* `String.t`, *default:* `nil`) - For Resource freshness validation (https://google.aip.dev/154)
54+
* `cloudsqlBackupRunSource` (*type:* `GoogleApi.AlloyDB.V1.Model.CloudSQLBackupRunSource.t`, *default:* `nil`) - Output only. Cluster created from CloudSQL snapshot.
5455
* `networkConfig` (*type:* `GoogleApi.AlloyDB.V1.Model.NetworkConfig.t`, *default:* `nil`) -
5556
* `continuousBackupConfig` (*type:* `GoogleApi.AlloyDB.V1.Model.ContinuousBackupConfig.t`, *default:* `nil`) - Optional. Continuous backup configuration for this cluster.
5657
* `pscConfig` (*type:* `GoogleApi.AlloyDB.V1.Model.PscConfig.t`, *default:* `nil`) - Optional. The configuration for Private Service Connect (PSC) for the cluster.
@@ -90,6 +91,8 @@ defmodule GoogleApi.AlloyDB.V1.Model.Cluster do
9091
:uid => String.t() | nil,
9192
:updateTime => DateTime.t() | nil,
9293
:etag => String.t() | nil,
94+
:cloudsqlBackupRunSource =>
95+
GoogleApi.AlloyDB.V1.Model.CloudSQLBackupRunSource.t() | nil,
9396
:networkConfig => GoogleApi.AlloyDB.V1.Model.NetworkConfig.t() | nil,
9497
:continuousBackupConfig => GoogleApi.AlloyDB.V1.Model.ContinuousBackupConfig.t() | nil,
9598
:pscConfig => GoogleApi.AlloyDB.V1.Model.PscConfig.t() | nil
@@ -125,6 +128,7 @@ defmodule GoogleApi.AlloyDB.V1.Model.Cluster do
125128
field(:uid)
126129
field(:updateTime, as: DateTime)
127130
field(:etag)
131+
field(:cloudsqlBackupRunSource, as: GoogleApi.AlloyDB.V1.Model.CloudSQLBackupRunSource)
128132
field(:networkConfig, as: GoogleApi.AlloyDB.V1.Model.NetworkConfig)
129133
field(:continuousBackupConfig, as: GoogleApi.AlloyDB.V1.Model.ContinuousBackupConfig)
130134
field(:pscConfig, as: GoogleApi.AlloyDB.V1.Model.PscConfig)
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.CsvImportOptions do
19+
@moduledoc """
20+
Options for importing data in CSV format.
21+
22+
## Attributes
23+
24+
* `columns` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The columns to which CSV data is imported. If not specified, all columns of the database table are loaded with CSV data.
25+
* `escapeCharacter` (*type:* `String.t`, *default:* `nil`) - Optional. Specifies the character that should appear before a data character that needs to be escaped. The default is same as quote character. The value of this argument has to be a character in Hex ASCII Code.
26+
* `fieldDelimiter` (*type:* `String.t`, *default:* `nil`) - Optional. Specifies the character that separates columns within each row (line) of the file. The default is comma. The value of this argument has to be a character in Hex ASCII Code.
27+
* `quoteCharacter` (*type:* `String.t`, *default:* `nil`) - Optional. Specifies the quoting character to be used when a data value is quoted. The default is double-quote. The value of this argument has to be a character in Hex ASCII Code.
28+
* `table` (*type:* `String.t`, *default:* `nil`) - Required. The database table to import CSV file into.
29+
"""
30+
31+
use GoogleApi.Gax.ModelBase
32+
33+
@type t :: %__MODULE__{
34+
:columns => list(String.t()) | nil,
35+
:escapeCharacter => String.t() | nil,
36+
:fieldDelimiter => String.t() | nil,
37+
:quoteCharacter => String.t() | nil,
38+
:table => String.t() | nil
39+
}
40+
41+
field(:columns, type: :list)
42+
field(:escapeCharacter)
43+
field(:fieldDelimiter)
44+
field(:quoteCharacter)
45+
field(:table)
46+
end
47+
48+
defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.CsvImportOptions do
49+
def decode(value, options) do
50+
GoogleApi.AlloyDB.V1.Model.CsvImportOptions.decode(value, options)
51+
end
52+
end
53+
54+
defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.CsvImportOptions do
55+
def encode(value, options) do
56+
GoogleApi.Gax.ModelBase.encode(value, options)
57+
end
58+
end
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.ImportClusterRequest do
19+
@moduledoc """
20+
Import cluster request.
21+
22+
## Attributes
23+
24+
* `csvImportOptions` (*type:* `GoogleApi.AlloyDB.V1.Model.CsvImportOptions.t`, *default:* `nil`) - Options for importing data in CSV format.
25+
* `database` (*type:* `String.t`, *default:* `nil`) - Optional. Name of the database to which the import will be done. For import from SQL file, this is required only if the file does not specify a database. Note - Value provided should be the same as expected from `SELECT current_database();` and NOT as a resource reference.
26+
* `gcsUri` (*type:* `String.t`, *default:* `nil`) - Required. The path to the file in Google Cloud Storage where the source file for import will be stored. The URI is in the form `gs://bucketName/fileName`.
27+
* `sqlImportOptions` (*type:* `GoogleApi.AlloyDB.V1.Model.SqlImportOptions.t`, *default:* `nil`) - Options for importing data in SQL format.
28+
* `user` (*type:* `String.t`, *default:* `nil`) - Optional. Database user to be used for importing the data. Note - Value provided should be the same as expected from `SELECT current_user;` and NOT as a resource reference.
29+
"""
30+
31+
use GoogleApi.Gax.ModelBase
32+
33+
@type t :: %__MODULE__{
34+
:csvImportOptions => GoogleApi.AlloyDB.V1.Model.CsvImportOptions.t() | nil,
35+
:database => String.t() | nil,
36+
:gcsUri => String.t() | nil,
37+
:sqlImportOptions => GoogleApi.AlloyDB.V1.Model.SqlImportOptions.t() | nil,
38+
:user => String.t() | nil
39+
}
40+
41+
field(:csvImportOptions, as: GoogleApi.AlloyDB.V1.Model.CsvImportOptions)
42+
field(:database)
43+
field(:gcsUri)
44+
field(:sqlImportOptions, as: GoogleApi.AlloyDB.V1.Model.SqlImportOptions)
45+
field(:user)
46+
end
47+
48+
defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.ImportClusterRequest do
49+
def decode(value, options) do
50+
GoogleApi.AlloyDB.V1.Model.ImportClusterRequest.decode(value, options)
51+
end
52+
end
53+
54+
defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.ImportClusterRequest do
55+
def encode(value, options) do
56+
GoogleApi.Gax.ModelBase.encode(value, options)
57+
end
58+
end
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.ImportClusterResponse do
19+
@moduledoc """
20+
Response of import rpc.
21+
22+
## Attributes
23+
24+
* `bytesDownloaded` (*type:* `String.t`, *default:* `nil`) - Required. Size of the object downloaded from Google Cloud Storage in bytes.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:bytesDownloaded => String.t() | nil
31+
}
32+
33+
field(:bytesDownloaded)
34+
end
35+
36+
defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.ImportClusterResponse do
37+
def decode(value, options) do
38+
GoogleApi.AlloyDB.V1.Model.ImportClusterResponse.decode(value, options)
39+
end
40+
end
41+
42+
defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.ImportClusterResponse do
43+
def encode(value, options) do
44+
GoogleApi.Gax.ModelBase.encode(value, options)
45+
end
46+
end

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,18 @@ defmodule GoogleApi.AlloyDB.V1.Model.PscConfig do
2222
## Attributes
2323
2424
* `pscEnabled` (*type:* `boolean()`, *default:* `nil`) - Optional. Create an instance that allows connections from Private Service Connect endpoints to the instance.
25+
* `serviceOwnedProjectNumber` (*type:* `String.t`, *default:* `nil`) - Output only. The project number that needs to be allowlisted on the network attachment to enable outbound connectivity.
2526
"""
2627

2728
use GoogleApi.Gax.ModelBase
2829

2930
@type t :: %__MODULE__{
30-
:pscEnabled => boolean() | nil
31+
:pscEnabled => boolean() | nil,
32+
:serviceOwnedProjectNumber => String.t() | nil
3133
}
3234

3335
field(:pscEnabled)
36+
field(:serviceOwnedProjectNumber)
3437
end
3538

3639
defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.PscConfig do

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ defmodule GoogleApi.AlloyDB.V1.Model.PscInstanceConfig do
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.
2525
* `pscDnsName` (*type:* `String.t`, *default:* `nil`) - Output only. The DNS name of the instance for PSC connectivity. Name convention: ...alloydb-psc.goog
26+
* `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.
2627
* `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/`
2728
"""
2829

@@ -31,11 +32,13 @@ defmodule GoogleApi.AlloyDB.V1.Model.PscInstanceConfig do
3132
@type t :: %__MODULE__{
3233
:allowedConsumerProjects => list(String.t()) | nil,
3334
:pscDnsName => String.t() | nil,
35+
:pscInterfaceConfigs => list(GoogleApi.AlloyDB.V1.Model.PscInterfaceConfig.t()) | nil,
3436
:serviceAttachmentLink => String.t() | nil
3537
}
3638

3739
field(:allowedConsumerProjects, type: :list)
3840
field(:pscDnsName)
41+
field(:pscInterfaceConfigs, as: GoogleApi.AlloyDB.V1.Model.PscInterfaceConfig, type: :list)
3942
field(:serviceAttachmentLink)
4043
end
4144

0 commit comments

Comments
 (0)