Skip to content

Commit

Permalink
feat: Automated regeneration of AIPlatform client (#12552)
Browse files Browse the repository at this point in the history
Auto-created at 2024-11-17 13:11:18 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Nov 18, 2024
1 parent 79bf2f1 commit 9f17f5c
Show file tree
Hide file tree
Showing 29 changed files with 1,662 additions and 18 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.22"}]
[{:google_api_ai_platform, "~> 0.23"}]
end
```

Expand Down
825 changes: 820 additions & 5 deletions clients/ai_platform/lib/google_api/ai_platform/v1/api/projects.ex

Large diffs are not rendered by default.

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 "20241026"
@discovery_revision "20241112"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BatchMigrateResou
* `dataset` (*type:* `String.t`, *default:* `nil`) - Migrated dataset resource name.
* `error` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleRpcStatus.t`, *default:* `nil`) - The error result of the migration request in case of failure.
* `model` (*type:* `String.t`, *default:* `nil`) - Migrated model resource name.
* `request` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MigrateResourceRequest.t`, *default:* `nil`) - It's the same as the value in MigrateResourceRequest.migrate_resource_requests.
* `request` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MigrateResourceRequest.t`, *default:* `nil`) - It's the same as the value in BatchMigrateResourcesRequest.migrate_resource_requests.
"""

use GoogleApi.Gax.ModelBase
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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.GoogleCloudAiplatformV1CometInput do
@moduledoc """
Input for Comet metric.
## Attributes
* `instance` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometInstance.t`, *default:* `nil`) - Required. Comet instance.
* `metricSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometSpec.t`, *default:* `nil`) - Required. Spec for comet metric.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:instance =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometInstance.t() | nil,
:metricSpec => GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometSpec.t() | nil
}

field(:instance, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometInstance)
field(:metricSpec, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometSpec)
end

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

defimpl Poison.Encoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometInput do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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.GoogleCloudAiplatformV1CometInstance do
@moduledoc """
Spec for Comet instance - The fields used for evaluation are dependent on the comet version.
## Attributes
* `prediction` (*type:* `String.t`, *default:* `nil`) - Required. Output of the evaluated model.
* `reference` (*type:* `String.t`, *default:* `nil`) - Optional. Ground truth used to compare against the prediction.
* `source` (*type:* `String.t`, *default:* `nil`) - Optional. Source text in original language.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:prediction => String.t() | nil,
:reference => String.t() | nil,
:source => String.t() | nil
}

field(:prediction)
field(:reference)
field(:source)
end

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

defimpl Poison.Encoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometInstance do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
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.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometResult do
@moduledoc """
Spec for Comet result - calculates the comet score for the given instance using the version specified in the spec.
## Attributes
* `score` (*type:* `number()`, *default:* `nil`) - Output only. Comet score. Range depends on version.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:score => number() | nil
}

field(:score)
end

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

defimpl Poison.Encoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometResult do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# 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.GoogleCloudAiplatformV1CometSpec do
@moduledoc """
Spec for Comet metric.
## Attributes
* `sourceLanguage` (*type:* `String.t`, *default:* `nil`) - Optional. Source language in BCP-47 format.
* `targetLanguage` (*type:* `String.t`, *default:* `nil`) - Optional. Target language in BCP-47 format. Covers both prediction and reference.
* `version` (*type:* `String.t`, *default:* `nil`) - Required. Which version to use for evaluation.
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{
:sourceLanguage => String.t() | nil,
:targetLanguage => String.t() | nil,
:version => String.t() | nil
}

field(:sourceLanguage)
field(:targetLanguage)
field(:version)
end

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

defimpl Poison.Encoder, for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometSpec 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 @@ -29,6 +29,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeployedModel do
* `displayName` (*type:* `String.t`, *default:* `nil`) - The display name of the DeployedModel. If not provided upon creation, the Model's display_name is used.
* `enableAccessLogging` (*type:* `boolean()`, *default:* `nil`) - If true, online prediction access logs are sent to Cloud Logging. These logs are like standard server access logs, containing information like timestamp and latency for each prediction request. Note that logs may incur a cost, especially if your project receives prediction requests at a high queries per second rate (QPS). Estimate your costs before enabling this option.
* `explanationSpec` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExplanationSpec.t`, *default:* `nil`) - Explanation configuration for this DeployedModel. When deploying a Model using EndpointService.DeployModel, this value overrides the value of Model.explanation_spec. All fields of explanation_spec are optional in the request. If a field of explanation_spec is not populated, the value of the same field of Model.explanation_spec is inherited. If the corresponding Model.explanation_spec is not populated, all fields of the explanation_spec will be used for the explanation configuration.
* `fasterDeploymentConfig` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FasterDeploymentConfig.t`, *default:* `nil`) - Configuration for faster model deployment.
* `id` (*type:* `String.t`, *default:* `nil`) - Immutable. The ID of the DeployedModel. If not provided upon deployment, Vertex AI will generate a value for this ID. This value should be 1-10 characters, and valid characters are `/[0-9]/`.
* `model` (*type:* `String.t`, *default:* `nil`) - Required. The resource name of the Model that this is the deployment of. Note that the Model may be in a different location than the DeployedModel's Endpoint. The resource name may contain version id or version alias to specify the version. Example: `projects/{project}/locations/{location}/models/{model}@2` or `projects/{project}/locations/{location}/models/{model}@golden` if no version is specified, the default version will be deployed.
* `modelVersionId` (*type:* `String.t`, *default:* `nil`) - Output only. The version ID of the model that is deployed.
Expand All @@ -52,6 +53,8 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeployedModel do
:enableAccessLogging => boolean() | nil,
:explanationSpec =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExplanationSpec.t() | nil,
:fasterDeploymentConfig =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FasterDeploymentConfig.t() | nil,
:id => String.t() | nil,
:model => String.t() | nil,
:modelVersionId => String.t() | nil,
Expand Down Expand Up @@ -79,6 +82,10 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeployedModel do

field(:explanationSpec, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExplanationSpec)

field(:fasterDeploymentConfig,
as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FasterDeploymentConfig
)

field(:id)
field(:model)
field(:modelVersionId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluateInstances
* `bleuInput` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BleuInput.t`, *default:* `nil`) - Instances and metric spec for bleu metric.
* `coherenceInput` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CoherenceInput.t`, *default:* `nil`) - Input for coherence metric.
* `cometInput` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometInput.t`, *default:* `nil`) - Translation metrics. Input for Comet metric.
* `exactMatchInput` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExactMatchInput.t`, *default:* `nil`) - Auto metric instances. Instances and metric spec for exact match metric.
* `fluencyInput` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FluencyInput.t`, *default:* `nil`) - LLM-based metric instance. General text generation metrics, applicable to other categories. Input for fluency metric.
* `fulfillmentInput` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FulfillmentInput.t`, *default:* `nil`) - Input for fulfillment metric.
* `groundednessInput` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GroundednessInput.t`, *default:* `nil`) - Input for groundedness metric.
* `metricxInput` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MetricxInput.t`, *default:* `nil`) - Input for Metricx metric.
* `pairwiseMetricInput` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PairwiseMetricInput.t`, *default:* `nil`) - Input for pairwise metric.
* `pairwiseQuestionAnsweringQualityInput` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PairwiseQuestionAnsweringQualityInput.t`, *default:* `nil`) - Input for pairwise question answering quality metric.
* `pairwiseSummarizationQualityInput` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PairwiseSummarizationQualityInput.t`, *default:* `nil`) - Input for pairwise summarization quality metric.
Expand All @@ -52,6 +54,8 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluateInstances
:bleuInput => GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BleuInput.t() | nil,
:coherenceInput =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CoherenceInput.t() | nil,
:cometInput =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometInput.t() | nil,
:exactMatchInput =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExactMatchInput.t() | nil,
:fluencyInput =>
Expand All @@ -60,6 +64,8 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluateInstances
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FulfillmentInput.t() | nil,
:groundednessInput =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GroundednessInput.t() | nil,
:metricxInput =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MetricxInput.t() | nil,
:pairwiseMetricInput =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PairwiseMetricInput.t() | nil,
:pairwiseQuestionAnsweringQualityInput =>
Expand Down Expand Up @@ -109,6 +115,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluateInstances

field(:bleuInput, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1BleuInput)
field(:coherenceInput, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CoherenceInput)
field(:cometInput, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1CometInput)

field(:exactMatchInput, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1ExactMatchInput)

Expand All @@ -122,6 +129,8 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1EvaluateInstances
as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1GroundednessInput
)

field(:metricxInput, as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1MetricxInput)

field(:pairwiseMetricInput,
as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1PairwiseMetricInput
)
Expand Down
Loading

0 comments on commit 9f17f5c

Please sign in to comment.