Skip to content

Commit

Permalink
feat: Automated regeneration of AIPlatform client (#11217)
Browse files Browse the repository at this point in the history
Auto-created at 2024-03-28 13:13:40 +0000 using the toys pull request generator.
  • Loading branch information
yoshi-code-bot authored Mar 28, 2024
1 parent 22c71d5 commit 735eff4
Show file tree
Hide file tree
Showing 20 changed files with 473 additions and 6 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.4"}]
[{:google_api_ai_platform, "~> 0.5"}]
end
```

Expand Down
78 changes: 78 additions & 0 deletions clients/ai_platform/lib/google_api/ai_platform/v1/api/projects.ex
Original file line number Diff line number Diff line change
Expand Up @@ -36870,4 +36870,82 @@ defmodule GoogleApi.AIPlatform.V1.Api.Projects do
opts ++ [struct: %GoogleApi.AIPlatform.V1.Model.GoogleLongrunningOperation{}]
)
end

@doc """
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.

## Parameters

* `connection` (*type:* `GoogleApi.AIPlatform.V1.Connection.t`) - Connection to server
* `name` (*type:* `String.t`) - The name of the operation's parent resource.
* `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").
* `:filter` (*type:* `String.t`) - The standard list filter.
* `:pageSize` (*type:* `integer()`) - The standard list page size.
* `:pageToken` (*type:* `String.t`) - The standard list page token.
* `opts` (*type:* `keyword()`) - Call options

## Returns

* `{:ok, %GoogleApi.AIPlatform.V1.Model.GoogleLongrunningListOperationsResponse{}}` on success
* `{:error, info}` on failure
"""
@spec aiplatform_projects_locations_tuning_jobs_operations_list(
Tesla.Env.client(),
String.t(),
keyword(),
keyword()
) ::
{:ok, GoogleApi.AIPlatform.V1.Model.GoogleLongrunningListOperationsResponse.t()}
| {:ok, Tesla.Env.t()}
| {:ok, list()}
| {:error, any()}
def aiplatform_projects_locations_tuning_jobs_operations_list(
connection,
name,
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,
:filter => :query,
:pageSize => :query,
:pageToken => :query
}

request =
Request.new()
|> Request.method(:get)
|> Request.url("/v1/{+name}/operations", %{
"name" => URI.encode(name, &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.AIPlatform.V1.Model.GoogleLongrunningListOperationsResponse{}]
)
end
end
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 "20240320"
@discovery_revision "20240322"

def discovery_revision(), do: @discovery_revision
end
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServicePart do
* `functionCall` (*type:* `GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServiceFunctionCall.t`, *default:* `nil`) - Function call data.
* `functionResponse` (*type:* `GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServiceFunctionResponse.t`, *default:* `nil`) - Function response data.
* `inlineData` (*type:* `GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServicePartBlob.t`, *default:* `nil`) - Inline bytes data
* `lmRootMetadata` (*type:* `GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServicePartLMRootMetadata.t`, *default:* `nil`) - Metadata provides extra info for building the LM Root request. Note: High enough tag number for internal only fields.
* `text` (*type:* `String.t`, *default:* `nil`) - Text input.
* `videoMetadata` (*type:* `GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServicePartVideoMetadata.t`, *default:* `nil`) - Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
"""
Expand All @@ -42,6 +43,8 @@ defmodule GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServicePart do
:functionResponse =>
GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServiceFunctionResponse.t() | nil,
:inlineData => GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServicePartBlob.t() | nil,
:lmRootMetadata =>
GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServicePartLMRootMetadata.t() | nil,
:text => String.t() | nil,
:videoMetadata =>
GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServicePartVideoMetadata.t() | nil
Expand All @@ -59,6 +62,11 @@ defmodule GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServicePart do
)

field(:inlineData, as: GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServicePartBlob)

field(:lmRootMetadata,
as: GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServicePartLMRootMetadata
)

field(:text)

field(:videoMetadata,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# 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.CloudAiNlLlmProtoServicePartLMRootMetadata do
@moduledoc """
Metadata provides extra info for building the LM Root request.
## Attributes
* `chunkId` (*type:* `String.t`, *default:* `nil`) - Chunk id that will be used when mapping the part to the LM Root's chunk.
"""

use GoogleApi.Gax.ModelBase

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

field(:chunkId)
end

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

defimpl Poison.Encoder,
for: GoogleApi.AIPlatform.V1.Model.CloudAiNlLlmProtoServicePartLMRootMetadata 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 @@ -17,11 +17,11 @@

defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1Blob do
@moduledoc """
Raw media bytes. Text should not be sent as raw bytes, use the 'text' field.
Content blob. It's preferred to send as text directly rather than raw bytes.
## Attributes
* `data` (*type:* `String.t`, *default:* `nil`) - Required. Raw bytes for media formats.
* `data` (*type:* `String.t`, *default:* `nil`) - Required. Raw bytes.
* `mimeType` (*type:* `String.t`, *default:* `nil`) - Required. The IANA standard MIME type of the source data.
"""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeployedModel do
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when the DeployedModel was created.
* `dedicatedResources` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DedicatedResources.t`, *default:* `nil`) - A description of resources that are dedicated to the DeployedModel, and that need a higher degree of manual configuration.
* `disableContainerLogging` (*type:* `boolean()`, *default:* `nil`) - For custom-trained Models and AutoML Tabular Models, the container of the DeployedModel instances will send `stderr` and `stdout` streams to Cloud Logging by default. Please note that the logs incur cost, which are subject to [Cloud Logging pricing](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true.
* `disableExplanations` (*type:* `boolean()`, *default:* `nil`) - If true, deploy the model without explainable feature, regardless the existence of Model.explanation_spec or explanation_spec.
* `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.
Expand All @@ -45,6 +46,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeployedModel do
:dedicatedResources =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DedicatedResources.t() | nil,
:disableContainerLogging => boolean() | nil,
:disableExplanations => boolean() | nil,
:displayName => String.t() | nil,
:enableAccessLogging => boolean() | nil,
:explanationSpec =>
Expand All @@ -69,6 +71,7 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1DeployedModel do
)

field(:disableContainerLogging)
field(:disableExplanations)
field(:displayName)
field(:enableAccessLogging)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureOnlineStor
* `bigtable` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureOnlineStoreBigtable.t`, *default:* `nil`) - Contains settings for the Cloud Bigtable instance that will be created to serve featureValues for all FeatureViews under this FeatureOnlineStore.
* `createTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this FeatureOnlineStore was created.
* `dedicatedServingEndpoint` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint.t`, *default:* `nil`) - Optional. The dedicated serving endpoint for this FeatureOnlineStore, which is different from common Vertex service endpoint.
* `etag` (*type:* `String.t`, *default:* `nil`) - Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
* `labels` (*type:* `map()`, *default:* `nil`) - Optional. The labels with user-defined metadata to organize your FeatureOnlineStore. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information on and examples of labels. No more than 64 user labels can be associated with one FeatureOnlineStore(System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable.
* `name` (*type:* `String.t`, *default:* `nil`) - Identifier. Name of the FeatureOnlineStore. Format: `projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`
* `optimized` (*type:* `GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureOnlineStoreOptimized.t`, *default:* `nil`) - Contains settings for the Optimized store that will be created to serve featureValues for all FeatureViews under this FeatureOnlineStore. When choose Optimized storage type, need to set PrivateServiceConnectConfig.enable_private_service_connect to use private endpoint. Otherwise will use public endpoint by default.
* `state` (*type:* `String.t`, *default:* `nil`) - Output only. State of the featureOnlineStore.
* `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - Output only. Timestamp when this FeatureOnlineStore was last updated.
"""
Expand All @@ -37,9 +39,15 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureOnlineStor
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureOnlineStoreBigtable.t()
| nil,
:createTime => DateTime.t() | nil,
:dedicatedServingEndpoint =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint.t()
| nil,
:etag => String.t() | nil,
:labels => map() | nil,
:name => String.t() | nil,
:optimized =>
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureOnlineStoreOptimized.t()
| nil,
:state => String.t() | nil,
:updateTime => DateTime.t() | nil
}
Expand All @@ -49,9 +57,20 @@ defmodule GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureOnlineStor
)

field(:createTime, as: DateTime)

field(:dedicatedServingEndpoint,
as:
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint
)

field(:etag)
field(:labels, type: :map)
field(:name)

field(:optimized,
as: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureOnlineStoreOptimized
)

field(:state)
field(:updateTime, as: DateTime)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# 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.GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint do
@moduledoc """
The dedicated serving endpoint for this FeatureOnlineStore. Only need to set when you choose Optimized storage type. Public endpoint is provisioned by default.
## Attributes
* `publicEndpointDomainName` (*type:* `String.t`, *default:* `nil`) - Output only. This field will be populated with the domain name to use for this FeatureOnlineStore
"""

use GoogleApi.Gax.ModelBase

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

field(:publicEndpointDomainName)
end

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

defimpl Poison.Encoder,
for:
GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureOnlineStoreDedicatedServingEndpoint 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.GoogleCloudAiplatformV1FeatureOnlineStoreOptimized do
@moduledoc """
Optimized storage type
## Attributes
"""

use GoogleApi.Gax.ModelBase

@type t :: %__MODULE__{}
end

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

defimpl Poison.Encoder,
for: GoogleApi.AIPlatform.V1.Model.GoogleCloudAiplatformV1FeatureOnlineStoreOptimized do
def encode(value, options) do
GoogleApi.Gax.ModelBase.encode(value, options)
end
end
Loading

0 comments on commit 735eff4

Please sign in to comment.