Skip to content

Commit

Permalink
feat: Automated regeneration of AlloyDB client
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Dec 13, 2024
1 parent 25e6ff1 commit 7215fec
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 11 deletions.
2 changes: 1 addition & 1 deletion clients/alloy_db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Install this package from [Hex](https://hex.pm) by adding

```elixir
def deps do
[{:google_api_alloy_db, "~> 0.14"}]
[{:google_api_alloy_db, "~> 0.15"}]
end
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2482,7 +2482,7 @@ defmodule GoogleApi.AlloyDB.V1.Api.Projects do
end

@doc """
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
## Parameters
Expand Down
2 changes: 1 addition & 1 deletion clients/alloy_db/lib/google_api/alloy_db/v1/metadata.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.AlloyDB.V1 do
API client metadata for GoogleApi.AlloyDB.V1.
"""

@discovery_revision "20241106"
@discovery_revision "20241204"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,28 @@

defmodule GoogleApi.AlloyDB.V1.Model.CsvExportOptions do
@moduledoc """
Options for exporting data in CSV format. For now, we only support a query to get the data that needs to be exported.
Options for exporting data in CSV format.
## Attributes
* `selectQuery` (*type:* `String.t`, *default:* `nil`) - Required. The select_query used to extract the data.
* `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 the same as quote character. The value of this argument has to be a character in Hex ASCII Code.
* `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.
* `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.
* `selectQuery` (*type:* `String.t`, *default:* `nil`) - Required. The SELECT query used to extract the data.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:escapeCharacter => String.t() | nil,
:fieldDelimiter => String.t() | nil,
:quoteCharacter => String.t() | nil,
:selectQuery => String.t() | nil
}

field(:escapeCharacter)
field(:fieldDelimiter)
field(:quoteCharacter)
field(:selectQuery)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,24 @@ defmodule GoogleApi.AlloyDB.V1.Model.ExportClusterRequest do
## Attributes
* `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.
* `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.
* `database` (*type:* `String.t`, *default:* `nil`) - Required. Name of the database where the export command will be executed. Note - Value provided should be the same as expected from `SELECT current_database();` and NOT as a resource reference.
* `gcsDestination` (*type:* `GoogleApi.AlloyDB.V1.Model.GcsDestination.t`, *default:* `nil`) - Required. Option to export data to cloud storage.
* `sqlExportOptions` (*type:* `GoogleApi.AlloyDB.V1.Model.SqlExportOptions.t`, *default:* `nil`) - Options for exporting data in SQL format. Required field to be set for SQL file type.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:csvExportOptions => GoogleApi.AlloyDB.V1.Model.CsvExportOptions.t() | nil,
:database => String.t() | nil,
:gcsDestination => GoogleApi.AlloyDB.V1.Model.GcsDestination.t() | nil
:gcsDestination => GoogleApi.AlloyDB.V1.Model.GcsDestination.t() | nil,
:sqlExportOptions => GoogleApi.AlloyDB.V1.Model.SqlExportOptions.t() | nil
}

field(:csvExportOptions, as: GoogleApi.AlloyDB.V1.Model.CsvExportOptions)
field(:database)
field(:gcsDestination, as: GoogleApi.AlloyDB.V1.Model.GcsDestination)
field(:sqlExportOptions, as: GoogleApi.AlloyDB.V1.Model.SqlExportOptions)
end

defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.ExportClusterRequest do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ defmodule GoogleApi.AlloyDB.V1.Model.GcsDestination do
## Attributes
* `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.
* `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`.
"""

use GoogleApi.Gax.ModelBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule GoogleApi.AlloyDB.V1.Model.OperationMetadata do
* `apiVersion` (*type:* `String.t`, *default:* `nil`) - Output only. API version used to start the operation.
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the operation was created.
* `endTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The time the operation finished running.
* `requestedCancellation` (*type:* `boolean()`, *default:* `nil`) - Output only. Identifies whether the user has requested cancellation of the operation. Operations that have successfully been cancelled have Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
* `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`.
* `statusMessage` (*type:* `String.t`, *default:* `nil`) - Output only. Human-readable status of the operation, if any.
* `target` (*type:* `String.t`, *default:* `nil`) - Output only. Server-defined resource path for the target of the operation.
* `verb` (*type:* `String.t`, *default:* `nil`) - Output only. Name of the verb executed by the operation.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.AlloyDB.V1.Model.SqlExportOptions do
@moduledoc """
Options for exporting data in SQL format.
## Attributes
* `cleanTargetObjects` (*type:* `boolean()`, *default:* `nil`) - Optional. If true, output commands to DROP all the dumped database objects prior to outputting the commands for creating them.
* `ifExistTargetObjects` (*type:* `boolean()`, *default:* `nil`) - Optional. If true, use DROP ... IF EXISTS commands to check for the object's existence before dropping it in clean_target_objects mode.
* `schemaOnly` (*type:* `boolean()`, *default:* `nil`) - Optional. If true, only export the schema.
* `tables` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Tables to export from.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:cleanTargetObjects => boolean() | nil,
:ifExistTargetObjects => boolean() | nil,
:schemaOnly => boolean() | nil,
:tables => list(String.t()) | nil
}

field(:cleanTargetObjects)
field(:ifExistTargetObjects)
field(:schemaOnly)
field(:tables, type: :list)
end

defimpl Poison.Decoder, for: GoogleApi.AlloyDB.V1.Model.SqlExportOptions do
def decode(value, options) do
GoogleApi.AlloyDB.V1.Model.SqlExportOptions.decode(value, options)
end
end

defimpl Poison.Encoder, for: GoogleApi.AlloyDB.V1.Model.SqlExportOptions do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,22 @@ defmodule GoogleApi.AlloyDB.V1.Model.StorageDatabasecenterPartnerapiV1mainMachin
* `cpuCount` (*type:* `integer()`, *default:* `nil`) - The number of CPUs. TODO(b/342344482, b/342346271) add proto validations again after bug fix.
* `memorySizeInBytes` (*type:* `String.t`, *default:* `nil`) - Memory size in bytes. TODO(b/342344482, b/342346271) add proto validations again after bug fix.
* `shardCount` (*type:* `integer()`, *default:* `nil`) - Optional. Number of shards (if applicable).
* `vcpuCount` (*type:* `float()`, *default:* `nil`) - Optional. The number of vCPUs. TODO(b/342344482, b/342346271) add proto validations again after bug fix.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:cpuCount => integer() | nil,
:memorySizeInBytes => String.t() | nil,
:shardCount => integer() | nil
:shardCount => integer() | nil,
:vcpuCount => float() | nil
}

field(:cpuCount)
field(:memorySizeInBytes)
field(:shardCount)
field(:vcpuCount)
end

defimpl Poison.Decoder,
Expand Down
2 changes: 1 addition & 1 deletion clients/alloy_db/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.AlloyDB.Mixfile do
use Mix.Project

@version "0.14.0"
@version "0.15.0"

def project() do
[
Expand Down

0 comments on commit 7215fec

Please sign in to comment.