Skip to content

Commit df47cd1

Browse files
feat: Automated regeneration of AIPlatform client (#12730)
Auto-created at 2024-12-16 13:19:05 +0000 using the toys pull request generator.
1 parent 13d5adf commit df47cd1

14 files changed

+367
-9
lines changed

clients/ai_platform/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_ai_platform, "~> 0.25"}]
14+
[{:google_api_ai_platform, "~> 0.26"}]
1515
end
1616
```
1717

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ defmodule GoogleApi.AIPlatform.V1.Api.Datasets do
292292
## Parameters
293293
294294
* `connection` (*type:* `GoogleApi.AIPlatform.V1.Connection.t`) - Connection to server
295-
* `name` (*type:* `String.t`) - Output only. Identifier. The resource name of the Dataset.
295+
* `name` (*type:* `String.t`) - Output only. Identifier. The resource name of the Dataset. Format: `projects/{project}/locations/{location}/datasets/{dataset}`
296296
* `optional_params` (*type:* `keyword()`) - Optional parameters
297297
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
298298
* `:access_token` (*type:* `String.t`) - OAuth access token.

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

Lines changed: 73 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5369,6 +5369,78 @@ defmodule GoogleApi.AIPlatform.V1.Api.Projects do
53695369
)
53705370
end
53715371

5372+
@doc """
5373+
Streams queries using a reasoning engine.
5374+
5375+
## Parameters
5376+
5377+
* `connection` (*type:* `GoogleApi.AIPlatform.V1.Connection.t`) - Connection to server
5378+
* `name` (*type:* `String.t`) - Required. The name of the ReasoningEngine resource to use. Format: `projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`
5379+
* `optional_params` (*type:* `keyword()`) - Optional parameters
5380+
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
5381+
* `:access_token` (*type:* `String.t`) - OAuth access token.
5382+
* `:alt` (*type:* `String.t`) - Data format for response.
5383+
* `:callback` (*type:* `String.t`) - JSONP
5384+
* `:fields` (*type:* `String.t`) - Selector specifying which fields to include in a partial response.
5385+
* `: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.
5386+
* `:oauth_token` (*type:* `String.t`) - OAuth 2.0 token for the current user.
5387+
* `:prettyPrint` (*type:* `boolean()`) - Returns response with indentations and line breaks.
5388+
* `: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.
5389+
* `:uploadType` (*type:* `String.t`) - Legacy upload protocol for media (e.g. "media", "multipart").
5390+
* `:upload_protocol` (*type:* `String.t`) - Upload protocol for media (e.g. "raw", "multipart").
5391+
* `:body` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1StreamQueryReasoningEngineRequest.t`) -
5392+
* `opts` (*type:* `keyword()`) - Call options
5393+
5394+
## Returns
5395+
5396+
* `{:ok, %GoogleApi.AIPlatform.V1.Model.GoogleApiHttpBody{}}` on success
5397+
* `{:error, info}` on failure
5398+
"""
5399+
@spec aiplatform_projects_locations_reasoning_engines_stream_query(
5400+
Tesla.Env.client(),
5401+
String.t(),
5402+
keyword(),
5403+
keyword()
5404+
) ::
5405+
{:ok, GoogleApi.AIPlatform.V1.Model.GoogleApiHttpBody.t()}
5406+
| {:ok, Tesla.Env.t()}
5407+
| {:ok, list()}
5408+
| {:error, any()}
5409+
def aiplatform_projects_locations_reasoning_engines_stream_query(
5410+
connection,
5411+
name,
5412+
optional_params \\ [],
5413+
opts \\ []
5414+
) do
5415+
optional_params_config = %{
5416+
:"$.xgafv" => :query,
5417+
:access_token => :query,
5418+
:alt => :query,
5419+
:callback => :query,
5420+
:fields => :query,
5421+
:key => :query,
5422+
:oauth_token => :query,
5423+
:prettyPrint => :query,
5424+
:quotaUser => :query,
5425+
:uploadType => :query,
5426+
:upload_protocol => :query,
5427+
:body => :body
5428+
}
5429+
5430+
request =
5431+
Request.new()
5432+
|> Request.method(:post)
5433+
|> Request.url("/v1/{+name}:streamQuery", %{
5434+
"name" => URI.encode(name, &URI.char_unreserved?/1)
5435+
})
5436+
|> Request.add_optional_params(optional_params_config, optional_params)
5437+
|> Request.library_version(@library_version)
5438+
5439+
connection
5440+
|> Connection.execute(request)
5441+
|> Response.decode(opts ++ [struct: %GoogleApi.AIPlatform.V1.Model.GoogleApiHttpBody{}])
5442+
end
5443+
53725444
@doc """
53735445
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`.
53745446

@@ -38158,7 +38230,7 @@ defmodule GoogleApi.AIPlatform.V1.Api.Projects do
3815838230
## Parameters
3815938231

3816038232
* `connection` (*type:* `GoogleApi.AIPlatform.V1.Connection.t`) - Connection to server
38161-
* `name` (*type:* `String.t`) - Output only. Identifier. The resource name of the Dataset.
38233+
* `name` (*type:* `String.t`) - Output only. Identifier. The resource name of the Dataset. Format: `projects/{project}/locations/{location}/datasets/{dataset}`
3816238234
* `optional_params` (*type:* `keyword()`) - Optional parameters
3816338235
* `:"$.xgafv"` (*type:* `String.t`) - V1 error format.
3816438236
* `:access_token` (*type:* `String.t`) - OAuth access token.

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 "20241203"
23+
@discovery_revision "20241210"
2424

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

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Dataset do
3232
* `metadataArtifact` (*type:* `String.t`, *default:* `nil`) - Output only. The resource name of the Artifact that was created in MetadataStore when creating the Dataset. The Artifact resource name pattern is `projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}`.
3333
* `metadataSchemaUri` (*type:* `String.t`, *default:* `nil`) - Required. Points to a YAML file stored on Google Cloud Storage describing additional information about the Dataset. The schema is defined as an OpenAPI 3.0.2 Schema Object. The schema files that can be used here are found in gs://google-cloud-aiplatform/schema/dataset/metadata/.
3434
* `modelReference` (*type:* `String.t`, *default:* `nil`) - Optional. Reference to the public base model last used by the dataset. Only set for prompt datasets.
35-
* `name` (*type:* `String.t`, *default:* `nil`) - Output only. Identifier. The resource name of the Dataset.
35+
* `name` (*type:* `String.t`, *default:* `nil`) - Output only. Identifier. The resource name of the Dataset. Format: `projects/{project}/locations/{location}/datasets/{dataset}`
3636
* `satisfiesPzi` (*type:* `boolean()`, *default:* `nil`) - Output only. Reserved for future use.
3737
* `satisfiesPzs` (*type:* `boolean()`, *default:* `nil`) - Output only. Reserved for future use.
3838
* `savedQueries` (*type:* `list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SavedQuery.t)`, *default:* `nil`) - All SavedQueries belong to the Dataset will be returned in List/Get Dataset response. The annotation_specs field will not be populated except for UI cases which will only use annotation_spec_count. In CreateDataset request, a SavedQuery is created together if this field is set, up to one SavedQuery can be set in CreateDatasetRequest. The SavedQuery should not contain any AnnotationSpec.

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerationConfig
2626
* `frequencyPenalty` (*type:* `number()`, *default:* `nil`) - Optional. Frequency penalties.
2727
* `logprobs` (*type:* `integer()`, *default:* `nil`) - Optional. Logit probabilities.
2828
* `maxOutputTokens` (*type:* `integer()`, *default:* `nil`) - Optional. The maximum number of output tokens to generate per message.
29+
* `mediaResolution` (*type:* `String.t`, *default:* `nil`) - Optional. If specified, the media resolution specified will be used.
2930
* `presencePenalty` (*type:* `number()`, *default:* `nil`) - Optional. Positive penalties.
3031
* `responseLogprobs` (*type:* `boolean()`, *default:* `nil`) - Optional. If true, export the logprobs results in response.
3132
* `responseMimeType` (*type:* `String.t`, *default:* `nil`) - Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.
@@ -36,7 +37,6 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerationConfig
3637
* `speechConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SpeechConfig.t`, *default:* `nil`) - Optional. The speech generation config.
3738
* `stopSequences` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Stop sequences.
3839
* `temperature` (*type:* `number()`, *default:* `nil`) - Optional. Controls the randomness of predictions.
39-
* `tokenResolution` (*type:* `String.t`, *default:* `nil`) - Optional. If specified, the token resolution specified will be used.
4040
* `topK` (*type:* `number()`, *default:* `nil`) - Optional. If specified, top-k sampling will be used.
4141
* `topP` (*type:* `number()`, *default:* `nil`) - Optional. If specified, nucleus sampling will be used.
4242
"""
@@ -49,6 +49,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerationConfig
4949
:frequencyPenalty => number() | nil,
5050
:logprobs => integer() | nil,
5151
:maxOutputTokens => integer() | nil,
52+
:mediaResolution => String.t() | nil,
5253
:presencePenalty => number() | nil,
5354
:responseLogprobs => boolean() | nil,
5455
:responseMimeType => String.t() | nil,
@@ -63,7 +64,6 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerationConfig
6364
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SpeechConfig.t() | nil,
6465
:stopSequences => list(String.t()) | nil,
6566
:temperature => number() | nil,
66-
:tokenResolution => String.t() | nil,
6767
:topK => number() | nil,
6868
:topP => number() | nil
6969
}
@@ -73,6 +73,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerationConfig
7373
field(:frequencyPenalty)
7474
field(:logprobs)
7575
field(:maxOutputTokens)
76+
field(:mediaResolution)
7677
field(:presencePenalty)
7778
field(:responseLogprobs)
7879
field(:responseMimeType)
@@ -87,7 +88,6 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerationConfig
8788
field(:speechConfig, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SpeechConfig)
8889
field(:stopSequences, type: :list)
8990
field(:temperature)
90-
field(:tokenResolution)
9191
field(:topK)
9292
field(:topP)
9393
end

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModelContainerSpe
2929
* `healthProbe` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Probe.t`, *default:* `nil`) - Immutable. Specification for Kubernetes readiness probe.
3030
* `healthRoute` (*type:* `String.t`, *default:* `nil`) - Immutable. HTTP path on the container to send health checks to. Vertex AI intermittently sends GET requests to this path on the container's IP address and port to check that the container is healthy. Read more about [health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). For example, if you set this field to `/bar`, then Vertex AI intermittently sends a GET request to the `/bar` path on the port of your container specified by the first value of this `ModelContainerSpec`'s ports field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/ DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)
3131
* `imageUri` (*type:* `String.t`, *default:* `nil`) - Required. Immutable. URI of the Docker image to be used as the custom container for serving predictions. This URI must identify an image in Artifact Registry or Container Registry. Learn more about the [container publishing requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon ModelService.UploadModel, stored internally, and this original path is afterwards not used. To learn about the requirements for the Docker image itself, see [Custom container requirements](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI's [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field.
32+
* `livenessProbe` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Probe.t`, *default:* `nil`) - Immutable. Specification for Kubernetes liveness probe.
3233
* `ports` (*type:* `list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Port.t)`, *default:* `nil`) - Immutable. List of ports to expose from the container. Vertex AI sends any prediction requests that it receives to the first port on this list. Vertex AI also sends [liveness and health checks](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```json [ { "containerPort": 8080 } ] ``` Vertex AI does not use ports other than the first one listed. This field corresponds to the `ports` field of the Kubernetes Containers [v1 core API](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core).
3334
* `predictRoute` (*type:* `String.t`, *default:* `nil`) - Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.predict to this path on the container's IP address and port. Vertex AI then returns the container's response in the API response. For example, if you set this field to `/foo`, then when Vertex AI receives a prediction request, it forwards the request body in a POST request to the `/foo` path on the port of your container specified by the first value of this `ModelContainerSpec`'s ports field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /v1/endpoints/ENDPOINT/deployedModels/DEPLOYED_MODEL:predict The placeholders in this value are replaced as follows: * ENDPOINT: The last segment (following `endpoints/`)of the Endpoint.name][] field of the Endpoint where this Model has been deployed. (Vertex AI makes this value available to your container code as the [`AIP_ENDPOINT_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).)
3435
* `sharedMemorySizeMb` (*type:* `String.t`, *default:* `nil`) - Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes.
@@ -46,6 +47,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModelContainerSpe
4647
:healthProbe => GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Probe.t() | nil,
4748
:healthRoute => String.t() | nil,
4849
:imageUri => String.t() | nil,
50+
:livenessProbe => GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Probe.t() | nil,
4951
:ports => list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Port.t()) | nil,
5052
:predictRoute => String.t() | nil,
5153
:sharedMemorySizeMb => String.t() | nil,
@@ -60,6 +62,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ModelContainerSpe
6062
field(:healthProbe, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Probe)
6163
field(:healthRoute)
6264
field(:imageUri)
65+
field(:livenessProbe, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Probe)
6366
field(:ports, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Port, type: :list)
6467
field(:predictRoute)
6568
field(:sharedMemorySizeMb)

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,31 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Probe do
2222
## Attributes
2323
2424
* `exec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ProbeExecAction.t`, *default:* `nil`) - ExecAction probes the health of a container by executing a command.
25+
* `grpc` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ProbeGrpcAction.t`, *default:* `nil`) - GrpcAction probes the health of a container by sending a gRPC request.
26+
* `httpGet` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ProbeHttpGetAction.t`, *default:* `nil`) - HttpGetAction probes the health of a container by sending an HTTP GET request.
2527
* `periodSeconds` (*type:* `integer()`, *default:* `nil`) - How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. Must be less than timeout_seconds. Maps to Kubernetes probe argument 'periodSeconds'.
28+
* `tcpSocket` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ProbeTcpSocketAction.t`, *default:* `nil`) - TcpSocketAction probes the health of a container by opening a TCP socket connection.
2629
* `timeoutSeconds` (*type:* `integer()`, *default:* `nil`) - Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. Must be greater or equal to period_seconds. Maps to Kubernetes probe argument 'timeoutSeconds'.
2730
"""
2831

2932
use GoogleApi.Gax.ModelBase
3033

3134
@type t :: %__MODULE__{
3235
:exec => GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ProbeExecAction.t() | nil,
36+
:grpc => GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ProbeGrpcAction.t() | nil,
37+
:httpGet =>
38+
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ProbeHttpGetAction.t() | nil,
3339
:periodSeconds => integer() | nil,
40+
:tcpSocket =>
41+
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ProbeTcpSocketAction.t() | nil,
3442
:timeoutSeconds => integer() | nil
3543
}
3644

3745
field(:exec, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ProbeExecAction)
46+
field(:grpc, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ProbeGrpcAction)
47+
field(:httpGet, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ProbeHttpGetAction)
3848
field(:periodSeconds)
49+
field(:tcpSocket, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ProbeTcpSocketAction)
3950
field(:timeoutSeconds)
4051
end
4152

0 commit comments

Comments
 (0)