Skip to content

Commit

Permalink
feat: Automated regeneration of AIPlatform client
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Sep 17, 2024
1 parent d552ab7 commit b1aef3a
Show file tree
Hide file tree
Showing 13 changed files with 90 additions and 8 deletions.
2 changes: 1 addition & 1 deletion clients/ai_platform/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_ai_platform, "~> 0.15"}]
[{:google_api_ai_platform, "~> 0.16"}]
end
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8003,7 +8003,7 @@ defmodule GoogleApi.AIPlatform.V1.Api.Projects do
* `: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").
* `:featureGroupId` (*type:* `String.t`) - Required. The ID to use for this FeatureGroup, which will become the final component of the FeatureGroup's resource name. This value may be up to 60 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within the project and location.
* `:featureGroupId` (*type:* `String.t`) - Required. The ID to use for this FeatureGroup, which will become the final component of the FeatureGroup's resource name. This value may be up to 128 characters, and valid characters are `[a-z0-9_]`. The first character cannot be a number. The value must be unique within the project and location.
* `:body` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureGroup.t`) -
* `opts` (*type:* `keyword()`) - Call options

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ defmodule GoogleApi.AIPlatform.V1 do
API client metadata for GoogleApi.AIPlatform.V1.
"""

@discovery_revision "20240830"
@discovery_revision "20240907"

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

defmodule GoogleApi.AIPlatform.V1.Model.CloudAiLargeModelsVisionRaiInfo do
@moduledoc """
Next ID: 6
## Attributes
* `blockedEntities` (*type:* `list(String.t)`, *default:* `nil`) - List of blocked entities from the blocklist if it is detected.
* `detectedLabels` (*type:* `list(GoogleApi.AIPlatform.V1.Model.CloudAiLargeModelsVisionRaiInfoDetectedLabels.t)`, *default:* `nil`) - The list of detected labels for different rai categories.
* `modelName` (*type:* `String.t`, *default:* `nil`) - The model name used to indexing into the RaiFilterConfig map. Would either be one of imagegeneration@002-006, imagen-3.0-... api endpoint names, or internal names used for mapping to different filter configs (genselfie, ai_watermark) than its api endpoint.
* `raiCategories` (*type:* `list(String.t)`, *default:* `nil`) - List of rai categories' information to return
Expand All @@ -30,6 +31,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.CloudAiLargeModelsVisionRaiInfo do
use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:blockedEntities => list(String.t()) | nil,
:detectedLabels =>
list(GoogleApi.AIPlatform.V1.Model.CloudAiLargeModelsVisionRaiInfoDetectedLabels.t())
| nil,
Expand All @@ -38,6 +40,8 @@ defmodule GoogleApi.AIPlatform.V1.Model.CloudAiLargeModelsVisionRaiInfo do
:scores => list(number()) | nil
}

field(:blockedEntities, type: :list)

field(:detectedLabels,
as: GoogleApi.AIPlatform.V1.Model.CloudAiLargeModelsVisionRaiInfoDetectedLabels,
type: :list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CountTokensReques
## Attributes
* `contents` (*type:* `list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Content.t)`, *default:* `nil`) - Optional. Input content.
* `generationConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerationConfig.t`, *default:* `nil`) - Optional. Generation config that the model will use to generate the response.
* `instances` (*type:* `list(any())`, *default:* `nil`) - Optional. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model.
* `model` (*type:* `String.t`, *default:* `nil`) - Optional. The name of the publisher model requested to serve the prediction. Format: `projects/{project}/locations/{location}/publishers/*/models/*`
* `systemInstruction` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Content.t`, *default:* `nil`) - Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph.
Expand All @@ -33,6 +34,8 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CountTokensReques
@type t :: %__MODULE__{
:contents =>
list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Content.t()) | nil,
:generationConfig =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerationConfig.t() | nil,
:instances => list(any()) | nil,
:model => String.t() | nil,
:systemInstruction =>
Expand All @@ -41,6 +44,11 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CountTokensReques
}

field(:contents, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Content, type: :list)

field(:generationConfig,
as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerationConfig
)

field(:instances, type: :list)
field(:model)
field(:systemInstruction, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Content)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeployedIndex do
* `index` (*type:* `String.t`, *default:* `nil`) - Required. The name of the Index this is the deployment of. We may refer to this Index as the DeployedIndex's "original" Index.
* `indexSyncTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. The DeployedIndex may depend on various data on its original Index. Additionally when certain changes to the original Index are being done (e.g. when what the Index contains is being changed) the DeployedIndex may be asynchronously updated in the background to reflect these changes. If this timestamp's value is at least the Index.update_time of the original Index, it means that this DeployedIndex and the original Index are in sync. If this timestamp is older, then to see which updates this DeployedIndex already contains (and which it does not), one must list the operations that are running on the original Index. Only the successfully completed Operations with update_time equal or before this sync time are contained in this DeployedIndex.
* `privateEndpoints` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1IndexPrivateEndpoints.t`, *default:* `nil`) - Output only. Provides paths for users to send requests directly to the deployed index services running on Cloud via private services access. This field is populated if network is configured.
* `pscAutomationConfigs` (*type:* `list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PSCAutomationConfig.t)`, *default:* `nil`) - Optional. If set for PSC deployed index, PSC connection will be automatically created after deployment is done and the endpoint information is populated in private_endpoints.psc_automated_endpoints.
* `reservedIpRanges` (*type:* `list(String.t)`, *default:* `nil`) - Optional. A list of reserved ip ranges under the VPC network that can be used for this DeployedIndex. If set, we will deploy the index within the provided ip ranges. Otherwise, the index might be deployed to any ip ranges under the provided VPC network. The value should be the name of the address (https://cloud.google.com/compute/docs/reference/rest/v1/addresses) Example: ['vertex-ai-ip-range']. For more information about subnets and network IP ranges, please see https://cloud.google.com/vpc/docs/subnets#manually_created_subnet_ip_ranges.
"""

Expand All @@ -53,6 +54,9 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeployedIndex do
:indexSyncTime => DateTime.t() | nil,
:privateEndpoints =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1IndexPrivateEndpoints.t() | nil,
:pscAutomationConfigs =>
list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PSCAutomationConfig.t())
| nil,
:reservedIpRanges => list(String.t()) | nil
}

Expand Down Expand Up @@ -81,6 +85,11 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeployedIndex do
as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1IndexPrivateEndpoints
)

field(:pscAutomationConfigs,
as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PSCAutomationConfig,
type: :list
)

field(:reservedIpRanges, type: :list)
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureGroupBigQu
## Attributes
* `bigQuerySource` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BigQuerySource.t`, *default:* `nil`) - Required. Immutable. The BigQuery source URI that points to either a BigQuery Table or View.
* `dense` (*type:* `boolean()`, *default:* `nil`) - Optional. If set, all feature values will be fetched from a single row per unique entityId including nulls. If not set, will collapse all rows for each unique entityId into a singe row with any non-null values if present, if no non-null values are present will sync null. ex: If source has schema (entity_id, feature_timestamp, f0, f1) and values (e1, 2020-01-01T10:00:00.123Z, 10, 15) (e1, 2020-02-01T10:00:00.123Z, 20, null) If dense is set, (e1, 20, null) is synced to online stores. If dense is not set, (e1, 20, 15) is synced to online stores.
* `dense` (*type:* `boolean()`, *default:* `nil`) - Optional. If set, all feature values will be fetched from a single row per unique entityId including nulls. If not set, will collapse all rows for each unique entityId into a singe row with any non-null values if present, if no non-null values are present will sync null. ex: If source has schema `(entity_id, feature_timestamp, f0, f1)` and the following rows: `(e1, 2020-01-01T10:00:00.123Z, 10, 15)` `(e1, 2020-02-01T10:00:00.123Z, 20, null)` If dense is set, `(e1, 20, null)` is synced to online stores. If dense is not set, `(e1, 20, 15)` is synced to online stores.
* `entityIdColumns` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Columns to construct entity_id / row keys. If not provided defaults to `entity_id`.
* `staticDataSource` (*type:* `boolean()`, *default:* `nil`) - Optional. Set if the data source is not a time-series.
* `timeSeries` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureGroupBigQueryTimeSeries.t`, *default:* `nil`) - Optional. If the source is a time-series source, this can be set to control how downstream sources (ex: FeatureView ) will treat time-series sources. If not set, will treat the source as a time-series source with `feature_timestamp` as timestamp column and no scan boundary.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureViewVertex
## Attributes
* `ragCorpusId` (*type:* `String.t`, *default:* `nil`) - Optional. The RAG corpus id corresponding to this FeatureView.
* `uri` (*type:* `String.t`, *default:* `nil`) - Required. The BigQuery view/table URI that will be materialized on each manual sync trigger. The table/view is expected to have the following columns at least: Field name Type Mode corpus_id STRING REQUIRED/NULLABLE file_id STRING REQUIRED/NULLABLE chunk_id STRING REQUIRED/NULLABLE chunk_data_type STRING REQUIRED/NULLABLE chunk_data STRING REQUIRED/NULLABLE embeddings FLOAT REPEATED file_original_uri STRING REQUIRED/NULLABLE
* `uri` (*type:* `String.t`, *default:* `nil`) - Required. The BigQuery view/table URI that will be materialized on each manual sync trigger. The table/view is expected to have the following columns and types at least: - `corpus_id` (STRING, NULLABLE/REQUIRED) - `file_id` (STRING, NULLABLE/REQUIRED) - `chunk_id` (STRING, NULLABLE/REQUIRED) - `chunk_data_type` (STRING, NULLABLE/REQUIRED) - `chunk_data` (STRING, NULLABLE/REQUIRED) - `embeddings` (FLOAT, REPEATED) - `file_original_uri` (STRING, NULLABLE/REQUIRED)
"""

use GoogleApi.Gax.ModelBase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerateContentRe
* `contents` (*type:* `list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Content.t)`, *default:* `nil`) - Required. The content of the current conversation with the model. For single-turn queries, this is a single instance. For multi-turn queries, this is a repeated field that contains conversation history + latest request.
* `generationConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerationConfig.t`, *default:* `nil`) - Optional. Generation config.
* `labels` (*type:* `map()`, *default:* `nil`) - Optional. The labels with user-defined metadata for the request. It is used for billing and reporting only. Label keys and values can be no longer than 63 characters (Unicode codepoints) and can only contain lowercase letters, numeric characters, underscores, and dashes. International characters are allowed. Label values are optional. Label keys must start with a letter.
* `safetySettings` (*type:* `list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SafetySetting.t)`, *default:* `nil`) - Optional. Per request settings for blocking unsafe content. Enforced on GenerateContentResponse.candidates.
* `systemInstruction` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Content.t`, *default:* `nil`) - Optional. The user provided system instructions for the model. Note: only text should be used in parts and content in each part will be in a separate paragraph.
* `toolConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ToolConfig.t`, *default:* `nil`) - Optional. Tool config. This config is shared for all tools provided in the request.
Expand All @@ -36,6 +37,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerateContentRe
list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Content.t()) | nil,
:generationConfig =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerationConfig.t() | nil,
:labels => map() | nil,
:safetySettings =>
list(GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SafetySetting.t()) | nil,
:systemInstruction =>
Expand All @@ -51,6 +53,8 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerateContentRe
as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GenerationConfig
)

field(:labels, type: :map)

field(:safetySettings,
as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SafetySetting,
type: :list
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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.AIPlatform.V1.Model.GoogleCloudAiplatformV1PSCAutomationConfig do
@moduledoc """
PSC config that is used to automatically create forwarding rule via ServiceConnectionMap.
## Attributes
* `network` (*type:* `String.t`, *default:* `nil`) - Required. The full name of the Google Compute Engine [network](https://cloud.google.com/compute/docs/networks-and-firewalls#networks). [Format](https://cloud.google.com/compute/docs/reference/rest/v1/networks/insert): `projects/{project}/global/networks/{network}`. Where {project} is a project number, as in '12345', and {network} is network name.
* `projectId` (*type:* `String.t`, *default:* `nil`) - Required. Project id used to create forwarding rule.
"""

use GoogleApi.Gax.ModelBase

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

field(:network)
field(:projectId)
end

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

defimpl Poison.Encoder,
for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PSCAutomationConfig 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 @@ -38,6 +38,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Schema do
* `nullable` (*type:* `boolean()`, *default:* `nil`) - Optional. Indicates if the value may be null.
* `pattern` (*type:* `String.t`, *default:* `nil`) - Optional. Pattern of the Type.STRING to restrict a string to a regular expression.
* `properties` (*type:* `%{optional(String.t) => GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Schema.t}`, *default:* `nil`) - Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT.
* `propertyOrdering` (*type:* `list(String.t)`, *default:* `nil`) - Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties.
* `required` (*type:* `list(String.t)`, *default:* `nil`) - Optional. Required properties of Type.OBJECT.
* `title` (*type:* `String.t`, *default:* `nil`) - Optional. The title of the Schema.
* `type` (*type:* `String.t`, *default:* `nil`) - Optional. The type of the data.
Expand Down Expand Up @@ -68,6 +69,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Schema do
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Schema.t()
}
| nil,
:propertyOrdering => list(String.t()) | nil,
:required => list(String.t()) | nil,
:title => String.t() | nil,
:type => String.t() | nil
Expand All @@ -90,6 +92,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Schema do
field(:nullable)
field(:pattern)
field(:properties, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Schema, type: :map)
field(:propertyOrdering, type: :list)
field(:required, type: :list)
field(:title)
field(:type)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1SupervisedTuningSpec do
@moduledoc """
Tuning Spec for Supervised Tuning.
Tuning Spec for Supervised Tuning for first party models.
## Attributes
Expand Down
2 changes: 1 addition & 1 deletion clients/ai_platform/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
defmodule GoogleApi.AIPlatform.Mixfile do
use Mix.Project

@version "0.15.0"
@version "0.16.0"

def project() do
[
Expand Down

0 comments on commit b1aef3a

Please sign in to comment.