Skip to content

Commit a5f4e48

Browse files
feat: Automated regeneration of AIPlatform client (googleapis#13007)
Auto-created at 2025-02-20 13:18:30 +0000 using the toys pull request generator.
1 parent d6cbd9a commit a5f4e48

11 files changed

+322
-11
lines changed

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

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,80 @@ defmodule GoogleApi.AIPlatform.V1.Api.Projects do
310310
)
311311
end
312312

313+
@doc """
314+
Evaluates a dataset based on a set of given metrics.
315+
316+
## Parameters
317+
318+
* `connection` (*type:* `GoogleApi.AIPlatform.V1.Connection.t`) - Connection to server
319+
* `location` (*type:* `String.t`) - Required. The resource name of the Location to evaluate the dataset. Format: `projects/{project}/locations/{location}`
320+
* `optional_params` (*type:* `keyword()`) - Optional parameters
321+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
322+
* `:access_token` (*type:* `String.t`) - OAuth access token.
323+
* `:alt` (*type:* `String.t`) - Data format for response.
324+
* `:callback` (*type:* `String.t`) - JSONP
325+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
326+
* `: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.
327+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
328+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
329+
* `: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.
330+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
331+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
332+
* `:body` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluateDatasetRequest.t`) -
333+
* `opts` (*type:* `keyword()`) - Call options
334+
335+
## Returns
336+
337+
* `{:ok, %GoogleApi.AIPlatform.V1.Model.GoogleLongrunningOperation{}}` on success
338+
* `{:error, info}` on failure
339+
"""
340+
@spec aiplatform_projects_locations_evaluate_dataset(
341+
Tesla.Env.client(),
342+
String.t(),
343+
keyword(),
344+
keyword()
345+
) ::
346+
{:ok, GoogleApi.AIPlatform.V1.Model.GoogleLongrunningOperation.t()}
347+
| {:ok, Tesla.Env.t()}
348+
| {:ok, list()}
349+
| {:error, any()}
350+
def aiplatform_projects_locations_evaluate_dataset(
351+
connection,
352+
location,
353+
optional_params \\ [],
354+
opts \\ []
355+
) do
356+
optional_params_config = %{
357+
:"$.xgafv" => :query,
358+
:access_token => :query,
359+
:alt => :query,
360+
:callback => :query,
361+
:fields => :query,
362+
:key => :query,
363+
:oauth_token => :query,
364+
:prettyPrint => :query,
365+
:quotaUser => :query,
366+
:uploadType => :query,
367+
:upload_protocol => :query,
368+
:body => :body
369+
}
370+
371+
request =
372+
Request.new()
373+
|> Request.method(:post)
374+
|> Request.url("/v1/{+location}:evaluateDataset", %{
375+
"location" => URI.encode(location, &URI.char_unreserved?/1)
376+
})
377+
|> Request.add_optional_params(optional_params_config, optional_params)
378+
|> Request.library_version(@library_version)
379+
380+
connection
381+
|> Connection.execute(request)
382+
|> Response.decode(
383+
opts ++ [struct: %GoogleApi.AIPlatform.V1.Model.GoogleLongrunningOperation{}]
384+
)
385+
end
386+
313387
@doc """
314388
Evaluates instances based on a given metric.
315389

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

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

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

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

clients/ai_platform/lib/google_api/ai_platform/v1/model/google_cloud_aiplatform_v1_automatic_resources.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1AutomaticResource
2121
2222
## Attributes
2323
24-
* `maxReplicaCount` (*type:* `integer()`, *default:* `nil`) - Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, a no upper bound for scaling under heavy traffic will be assume, though Vertex AI may be unable to scale beyond certain replica number.
25-
* `minReplicaCount` (*type:* `integer()`, *default:* `nil`) - Immutable. The minimum number of replicas this DeployedModel will be always deployed on. If traffic against it increases, it may dynamically be deployed onto more replicas up to max_replica_count, and as traffic decreases, some of these extra replicas may be freed. If the requested value is too large, the deployment will error.
24+
* `maxReplicaCount` (*type:* `integer()`, *default:* `nil`) - Immutable. The maximum number of replicas that may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale to that many replicas is guaranteed (barring service outages). If traffic increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, a no upper bound for scaling under heavy traffic will be assume, though Vertex AI may be unable to scale beyond certain replica number.
25+
* `minReplicaCount` (*type:* `integer()`, *default:* `nil`) - Immutable. The minimum number of replicas that will be always deployed on. If traffic against it increases, it may dynamically be deployed onto more replicas up to max_replica_count, and as traffic decreases, some of these extra replicas may be freed. If the requested value is too large, the deployment will error.
2626
"""
2727

2828
use GoogleApi.Gax.ModelBase

clients/ai_platform/lib/google_api/ai_platform/v1/model/google_cloud_aiplatform_v1_cached_content.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CachedContent do
2525
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Creation time of the cache entry.
2626
* `displayName` (*type:* `String.t`, *default:* `nil`) - Optional. Immutable. The user-generated meaningful display name of the cached content.
2727
* `expireTime` (*type:* `DateTime.t`, *default:* `nil`) - Timestamp of when this resource is considered expired. This is *always* provided on output, regardless of what was sent on input.
28-
* `model` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the publisher model to use for cached content. Format: projects/{project}/locations/{location}/publishers/{publisher}/models/{model}
28+
* `model` (*type:* `String.t`, *default:* `nil`) - Immutable. The name of the `Model` to use for cached content. Currently, only the published Gemini base models are supported, in form of projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL}
2929
* `name` (*type:* `String.t`, *default:* `nil`) - Immutable. Identifier. The server-generated resource name of the cached content Format: projects/{project}/locations/{location}/cachedContents/{cached_content}
3030
* `systemInstruction` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Content.t`, *default:* `nil`) - Optional. Input only. Immutable. Developer set system instruction. Currently, text only
3131
* `toolConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ToolConfig.t`, *default:* `nil`) - Optional. Input only. Immutable. Tool config. This config is shared for all tools

clients/ai_platform/lib/google_api/ai_platform/v1/model/google_cloud_aiplatform_v1_dedicated_resources.ex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717

1818
defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DedicatedResources do
1919
@moduledoc """
20-
A description of resources that are dedicated to a DeployedModel, and that need a higher degree of manual configuration.
20+
A description of resources that are dedicated to a DeployedModel or DeployedIndex, and that need a higher degree of manual configuration.
2121
2222
## Attributes
2323
2424
* `autoscalingMetricSpecs` (*type:* `list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1AutoscalingMetricSpec.t)`, *default:* `nil`) - Immutable. The metric specifications that overrides a resource utilization metric (CPU utilization, accelerator's duty cycle, and so on) target value (default to 60 if not set). At most one entry is allowed per metric. If machine_spec.accelerator_count is above 0, the autoscaling will be based on both CPU utilization and accelerator's duty cycle metrics and scale up when either metrics exceeds its target value while scale down if both metrics are under their target value. The default target value is 60 for both metrics. If machine_spec.accelerator_count is 0, the autoscaling will be based on CPU utilization metric only with default target value 60 if not explicitly set. For example, in the case of Online Prediction, if you want to override target CPU utilization to 80, you should set autoscaling_metric_specs.metric_name to `aiplatform.googleapis.com/prediction/online/cpu/utilization` and autoscaling_metric_specs.target to `80`.
25-
* `machineSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MachineSpec.t`, *default:* `nil`) - Required. Immutable. The specification of a single machine used by the prediction.
26-
* `maxReplicaCount` (*type:* `integer()`, *default:* `nil`) - Immutable. The maximum number of replicas this DeployedModel may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale the model to that many replicas is guaranteed (barring service outages). If traffic against the DeployedModel increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type).
27-
* `minReplicaCount` (*type:* `integer()`, *default:* `nil`) - Required. Immutable. The minimum number of machine replicas this DeployedModel will be always deployed on. This value must be greater than or equal to 1. If traffic against the DeployedModel increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed.
28-
* `requiredReplicaCount` (*type:* `integer()`, *default:* `nil`) - Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial model deployment/mutation is desired. If set, the model deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count.
25+
* `machineSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MachineSpec.t`, *default:* `nil`) - Required. Immutable. The specification of a single machine being used.
26+
* `maxReplicaCount` (*type:* `integer()`, *default:* `nil`) - Immutable. The maximum number of replicas that may be deployed on when the traffic against it increases. If the requested value is too large, the deployment will error, but if deployment succeeds then the ability to scale to that many replicas is guaranteed (barring service outages). If traffic increases beyond what its replicas at maximum may handle, a portion of the traffic will be dropped. If this value is not provided, will use min_replica_count as the default value. The value of this field impacts the charge against Vertex CPU and GPU quotas. Specifically, you will be charged for (max_replica_count * number of cores in the selected machine type) and (max_replica_count * number of GPUs per replica in the selected machine type).
27+
* `minReplicaCount` (*type:* `integer()`, *default:* `nil`) - Required. Immutable. The minimum number of machine replicas that will be always deployed on. This value must be greater than or equal to 1. If traffic increases, it may dynamically be deployed onto more replicas, and as traffic decreases, some of these extra replicas may be freed.
28+
* `requiredReplicaCount` (*type:* `integer()`, *default:* `nil`) - Optional. Number of required available replicas for the deployment to succeed. This field is only needed when partial deployment/mutation is desired. If set, the deploy/mutate operation will succeed once available_replica_count reaches required_replica_count, and the rest of the replicas will be retried. If not set, the default required_replica_count will be min_replica_count.
2929
* `spot` (*type:* `boolean()`, *default:* `nil`) - Optional. If true, schedule the deployment workload on [spot VMs](https://cloud.google.com/kubernetes-engine/docs/concepts/spot-vms).
3030
"""
3131

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluateDatasetRequest do
19+
@moduledoc """
20+
Request message for EvaluationService.EvaluateDataset.
21+
22+
## Attributes
23+
24+
* `autoraterConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1AutoraterConfig.t`, *default:* `nil`) - Optional. Autorater config used for evaluation.
25+
* `dataset` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluationDataset.t`, *default:* `nil`) - Required. The dataset used for evaluation.
26+
* `metrics` (*type:* `list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Metric.t)`, *default:* `nil`) - Required. The metrics used for evaluation.
27+
* `outputConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1OutputConfig.t`, *default:* `nil`) - Required. Config for evaluation output.
28+
"""
29+
30+
use GoogleApi.Gax.ModelBase
31+
32+
@type t :: %__MODULE__{
33+
:autoraterConfig =>
34+
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1AutoraterConfig.t() | nil,
35+
:dataset =>
36+
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluationDataset.t() | nil,
37+
:metrics => list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Metric.t()) | nil,
38+
:outputConfig =>
39+
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1OutputConfig.t() | nil
40+
}
41+
42+
field(:autoraterConfig, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1AutoraterConfig)
43+
44+
field(:dataset, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluationDataset)
45+
field(:metrics, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Metric, type: :list)
46+
field(:outputConfig, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1OutputConfig)
47+
end
48+
49+
defimpl Poison.Decoder,
50+
for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluateDatasetRequest do
51+
def decode(value, options) do
52+
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluateDatasetRequest.decode(
53+
value,
54+
options
55+
)
56+
end
57+
end
58+
59+
defimpl Poison.Encoder,
60+
for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluateDatasetRequest do
61+
def encode(value, options) do
62+
GoogleApi.Gax.ModelBase.encode(value, options)
63+
end
64+
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.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluationDataset do
19+
@moduledoc """
20+
The dataset used for evaluation.
21+
22+
## Attributes
23+
24+
* `bigquerySource` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BigQuerySource.t`, *default:* `nil`) - BigQuery source holds the dataset.
25+
* `gcsSource` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GcsSource.t`, *default:* `nil`) - Cloud storage source holds the dataset.
26+
"""
27+
28+
use GoogleApi.Gax.ModelBase
29+
30+
@type t :: %__MODULE__{
31+
:bigquerySource =>
32+
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BigQuerySource.t() | nil,
33+
:gcsSource => GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GcsSource.t() | nil
34+
}
35+
36+
field(:bigquerySource, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BigQuerySource)
37+
field(:gcsSource, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GcsSource)
38+
end
39+
40+
defimpl Poison.Decoder,
41+
for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluationDataset do
42+
def decode(value, options) do
43+
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluationDataset.decode(value, options)
44+
end
45+
end
46+
47+
defimpl Poison.Encoder,
48+
for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluationDataset do
49+
def encode(value, options) do
50+
GoogleApi.Gax.ModelBase.encode(value, options)
51+
end
52+
end

0 commit comments

Comments
 (0)