Skip to content

Commit

Permalink
feat: Automated regeneration of Dataproc client (#11187)
Browse files Browse the repository at this point in the history
Auto-created at 2024-03-22 13:13:50 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Mar 22, 2024
1 parent 322cf0f commit 51888ea
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clients/dataproc/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_dataproc, "~> 0.53"}]
[{:google_api_dataproc, "~> 0.54"}]
end
```

Expand Down
83 changes: 83 additions & 0 deletions clients/dataproc/lib/google_api/dataproc/v1/api/projects.ex
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,89 @@ defmodule GoogleApi.Dataproc.V1.Api.Projects do
|> Response.decode(opts ++ [struct: %GoogleApi.Dataproc.V1.Model.AutoscalingPolicy{}])
end

@doc """
Analyze a Batch for possible recommendations and insights.
## Parameters
* `connection` (*type:* `GoogleApi.Dataproc.V1.Connection.t`) - Connection to server
* `projects_id` (*type:* `String.t`) - Part of `name`. Required. The fully qualified name of the batch to analyze in the format "projects/PROJECT_ID/locations/DATAPROC_REGION/batches/BATCH_ID"
* `locations_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`.
* `batches_id` (*type:* `String.t`) - Part of `name`. See documentation of `projectsId`.
* `optional_params` (*type:* `keyword()`) - Optional parameters
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
* `:access_token` (*type:* `String.t`) - OAuth access token.
* `:alt` (*type:* `String.t`) - Data format for response.
* `:callback` (*type:* `String.t`) - JSONP
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
* `: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.
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
* `: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.
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
* `:body` (*type:* `GoogleApi.Dataproc.V1.Model.AnalyzeBatchRequest.t`) -
* `opts` (*type:* `keyword()`) - Call options
## Returns
* `{:ok, %GoogleApi.Dataproc.V1.Model.Operation{}}` on success
* `{:error, info}` on failure
"""
@spec dataproc_projects_locations_batches_analyze(
Tesla.Env.client(),
String.t(),
String.t(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.Dataproc.V1.Model.Operation.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def dataproc_projects_locations_batches_analyze(
connection,
projects_id,
locations_id,
batches_id,
optional_params \\ [],
opts \\ []
) do
optional_params_config = %{
:"$.xgafv" => :query,
:access_token => :query,
:alt => :query,
:callback => :query,
:fields => :query,
:key => :query,
:oauth_token => :query,
:prettyPrint => :query,
:quotaUser => :query,
:uploadType => :query,
:upload_protocol => :query,
:body => :body
}

request =
Request.new()
|> Request.method(:post)
|> Request.url(
"/v1/projects/{projectsId}/locations/{locationsId}/batches/{batchesId}:analyze",
%{
"projectsId" => URI.encode(projects_id, &URI.char_unreserved?/1),
"locationsId" => URI.encode(locations_id, &URI.char_unreserved?/1),
"batchesId" => URI.encode(batches_id, &URI.char_unreserved?/1)
}
)
|> Request.add_optional_params(optional_params_config, optional_params)
|> Request.library_version(@library_version)

connection
|> Connection.execute(request)
|> Response.decode(opts ++ [struct: %GoogleApi.Dataproc.V1.Model.Operation{}])
end

@doc """
Creates a batch workload that executes asynchronously.
Expand Down
2 changes: 1 addition & 1 deletion clients/dataproc/lib/google_api/dataproc/v1/metadata.ex
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.Dataproc.V1 do
API client metadata for GoogleApi.Dataproc.V1.
"""

@discovery_revision "20240303"
@discovery_revision "20240320"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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.Dataproc.V1.Model.AnalyzeBatchRequest do
@moduledoc """
A request to analyze a batch workload.
## Attributes
* `requestId` (*type:* `String.t`, *default:* `nil`) - Optional. A unique ID used to identify the request. If the service receives two AnalyzeBatchRequest (http://cloud/dataproc/docs/reference/rpc/google.cloud.dataproc.v1#google.cloud.dataproc.v1.AnalyzeBatchRequest)s with the same request_id, the second request is ignored and the Operation that corresponds to the first request created and stored in the backend is returned.Recommendation: Set this value to a UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier).The value must contain only letters (a-z, A-Z), numbers (0-9), underscores (_), and hyphens (-). The maximum length is 40 characters.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:requestId => String.t() | nil
}

field(:requestId)
end

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

defimpl Poison.Encoder, for: GoogleApi.Dataproc.V1.Model.AnalyzeBatchRequest do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
2 changes: 1 addition & 1 deletion clients/dataproc/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.Dataproc.Mixfile do
use Mix.Project

@version "0.53.0"
@version "0.54.0"

def project() do
[
Expand Down

0 comments on commit 51888ea

Please sign in to comment.