Skip to content

Commit efdd622

Browse files
feat: Automated regeneration of AlloyDB client (googleapis#12606)
Auto-created at 2024-11-21 13:24:39 +0000 using the toys pull request generator.
1 parent b5eb053 commit efdd622

File tree

8 files changed

+265
-3
lines changed

8 files changed

+265
-3
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.13"}]
14+
[{:google_api_alloy_db, "~> 0.14"}]
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
@@ -766,6 +766,78 @@ defmodule GoogleApi.AlloyDB.V1.Api.Projects do
766766
|> Response.decode(opts ++ [struct: %GoogleApi.AlloyDB.V1.Model.Operation{}])
767767
end
768768

769+
@doc """
770+
Exports data from the cluster. Imperative only.
771+
772+
## Parameters
773+
774+
* `connection` (*type:* `GoogleApi.AlloyDB.V1.Connection.t`) - Connection to server
775+
* `name` (*type:* `String.t`) - Required. The resource name of the cluster.
776+
* `optional_params` (*type:* `keyword()`) - Optional parameters
777+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
778+
* `:access_token` (*type:* `String.t`) - OAuth access token.
779+
* `:alt` (*type:* `String.t`) - Data format for response.
780+
* `:callback` (*type:* `String.t`) - JSONP
781+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
782+
* `: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.
783+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
784+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
785+
* `: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.
786+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
787+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
788+
* `:body` (*type:* `GoogleApi.AlloyDB.V1.Model.ExportClusterRequest.t`) -
789+
* `opts` (*type:* `keyword()`) - Call options
790+
791+
## Returns
792+
793+
* `{:ok, %GoogleApi.AlloyDB.V1.Model.Operation{}}` on success
794+
* `{:error, info}` on failure
795+
"""
796+
@spec alloydb_projects_locations_clusters_export(
797+
Tesla.Env.client(),
798+
String.t(),
799+
keyword(),
800+
keyword()
801+
) ::
802+
{:ok, GoogleApi.AlloyDB.V1.Model.Operation.t()}
803+
| {:ok, Tesla.Env.t()}
804+
| {:ok, list()}
805+
| {:error, any()}
806+
def alloydb_projects_locations_clusters_export(
807+
connection,
808+
name,
809+
optional_params \\ [],
810+
opts \\ []
811+
) do
812+
optional_params_config = %{
813+
:"$.xgafv" => :query,
814+
:access_token => :query,
815+
:alt => :query,
816+
:callback => :query,
817+
:fields => :query,
818+
:key => :query,
819+
:oauth_token => :query,
820+
:prettyPrint => :query,
821+
:quotaUser => :query,
822+
:uploadType => :query,
823+
:upload_protocol => :query,
824+
:body => :body
825+
}
826+
827+
request =
828+
Request.new()
829+
|> Request.method(:post)
830+
|> Request.url("/v1/{+name}:export", %{
831+
"name" => URI.encode(name, &URI.char_unreserved?/1)
832+
})
833+
|> Request.add_optional_params(optional_params_config, optional_params)
834+
|> Request.library_version(@library_version)
835+
836+
connection
837+
|> Connection.execute(request)
838+
|> Response.decode(opts ++ [struct: %GoogleApi.AlloyDB.V1.Model.Operation{}])
839+
end
840+
769841
@doc """
770842
Gets details of a single Cluster.
771843

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 "20241023"
23+
@discovery_revision "20241106"
2424

2525
def discovery_revision(), do: @discovery_revision
2626
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.CsvExportOptions do
19+
@moduledoc """
20+
Options for exporting data in CSV format. For now, we only support a query to get the data that needs to be exported.
21+
22+
## Attributes
23+
24+
* `selectQuery` (*type:* `String.t`, *default:* `nil`) - Required. The select_query used to extract the data.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:selectQuery => String.t() | nil
31+
}
32+
33+
field(:selectQuery)
34+
end
35+
36+
defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.CsvExportOptions do
37+
def decode(value, options) do
38+
GoogleApi.AlloyDB.V1.Model.CsvExportOptions.decode(value, options)
39+
end
40+
end
41+
42+
defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.CsvExportOptions do
43+
def encode(value, options) do
44+
GoogleApi.Gax.ModelBase.encode(value, options)
45+
end
46+
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.ExportClusterRequest do
19+
@moduledoc """
20+
Export cluster request.
21+
22+
## Attributes
23+
24+
* `csvExportOptions` (*type:* `GoogleApi.AlloyDB.V1.Model.CsvExportOptions.t`, *default:* `nil`) - Options for exporting data in CSV format. Required field to be set for CSV file type.
25+
* `database` (*type:* `String.t`, *default:* `nil`) - Required. Name of the database where the query will be executed. Note - Value provided should be the same as expected from `SELECT current_database();` and NOT as a resource reference.
26+
* `gcsDestination` (*type:* `GoogleApi.AlloyDB.V1.Model.GcsDestination.t`, *default:* `nil`) - Required. Option to export data to cloud storage.
27+
"""
28+
29+
use GoogleApi.Gax.ModelBase
30+
31+
@type t :: %__MODULE__{
32+
:csvExportOptions => GoogleApi.AlloyDB.V1.Model.CsvExportOptions.t() | nil,
33+
:database => String.t() | nil,
34+
:gcsDestination => GoogleApi.AlloyDB.V1.Model.GcsDestination.t() | nil
35+
}
36+
37+
field(:csvExportOptions, as: GoogleApi.AlloyDB.V1.Model.CsvExportOptions)
38+
field(:database)
39+
field(:gcsDestination, as: GoogleApi.AlloyDB.V1.Model.GcsDestination)
40+
end
41+
42+
defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.ExportClusterRequest do
43+
def decode(value, options) do
44+
GoogleApi.AlloyDB.V1.Model.ExportClusterRequest.decode(value, options)
45+
end
46+
end
47+
48+
defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.ExportClusterRequest do
49+
def encode(value, options) do
50+
GoogleApi.Gax.ModelBase.encode(value, options)
51+
end
52+
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.ExportClusterResponse do
19+
@moduledoc """
20+
Response of export cluster rpc.
21+
22+
## Attributes
23+
24+
* `gcsDestination` (*type:* `GoogleApi.AlloyDB.V1.Model.GcsDestination.t`, *default:* `nil`) - Required. Option to export data to cloud storage.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:gcsDestination => GoogleApi.AlloyDB.V1.Model.GcsDestination.t() | nil
31+
}
32+
33+
field(:gcsDestination, as: GoogleApi.AlloyDB.V1.Model.GcsDestination)
34+
end
35+
36+
defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.ExportClusterResponse do
37+
def decode(value, options) do
38+
GoogleApi.AlloyDB.V1.Model.ExportClusterResponse.decode(value, options)
39+
end
40+
end
41+
42+
defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.ExportClusterResponse do
43+
def encode(value, options) do
44+
GoogleApi.Gax.ModelBase.encode(value, options)
45+
end
46+
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.GcsDestination do
19+
@moduledoc """
20+
Destination for Export. Export will be done to cloud storage.
21+
22+
## Attributes
23+
24+
* `uri` (*type:* `String.t`, *default:* `nil`) - Required. 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.
25+
"""
26+
27+
use GoogleApi.Gax.ModelBase
28+
29+
@type t :: %__MODULE__{
30+
:uri => String.t() | nil
31+
}
32+
33+
field(:uri)
34+
end
35+
36+
defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.GcsDestination do
37+
def decode(value, options) do
38+
GoogleApi.AlloyDB.V1.Model.GcsDestination.decode(value, options)
39+
end
40+
end
41+
42+
defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.GcsDestination do
43+
def encode(value, options) do
44+
GoogleApi.Gax.ModelBase.encode(value, options)
45+
end
46+
end

clients/alloy_db/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
defmodule GoogleApi.AlloyDB.Mixfile do
1919
use Mix.Project
2020

21-
@version "0.13.1"
21+
@version "0.14.0"
2222

2323
def project() do
2424
[

0 commit comments

Comments
 (0)