Skip to content

Commit

Permalink
feat: add ValueType.STRUCT to Feature (#25997)
Browse files Browse the repository at this point in the history
feat: add encryption_spec to FeatureOnlineStore
feat: add struct_value to FeatureValue
feat: add encryption_spec, service_account, disable_container_logging to DeploymentResourcePool
feat: add model_reference to Dataset
feat: add tool_config to GenerateContentRequest
feat: add dataplex_config to MetadataStore
feat: add model_reference to DatasetVersion
feat: add INVALID_SPARSE_DIMENSIONS, INVALID_SPARSE_EMBEDDING, INVALID_EMBEDDING to NearestNeighborSearchOperationMetadata.RecordError
feat: add valid_sparse_record_count, invalid_sparse_record_count to NearestNeighborSearchOperationMetadata.ContentValidationStats
feat: add sparse_embedding to IndexDatapoint
feat: add sparse_vectors_count to IndexStats
feat: add sparse_distance to FindNeighborsResponse.Neighbor
feat: add more fields in FindNeighborsRequest.Query
feat: add UpdateNotebookRuntimeTemplate to NotebookService
feat: add direct_notebook_source to NotebookExecutionJob
feat: add encryption_spec to NotebookRuntimeTemplate
feat: add idle_shutdown_config, encryption_spec, satisfies_pzs, satisfies_pzi to NotebookRuntime
feat: add RaySpec to PersistentResource
fix!: An existing message `Segment` is removed
fix!: An existing message `GroundingAttribution` is removed
fix!: An existing field `grounding_attributions` is removed from message `.google.cloud.aiplatform.v1beta1.GroundingMetadata`
fix!: An existing field `disable_attribution` is removed from message `.google.cloud.aiplatform.v1beta1.GoogleSearchRetrieval`
docs: A comment for field `feature_vector` in message `.google.cloud.aiplatform.v1beta1.IndexDatapoint` is changed
docs: A comment for field `vectors_count` in message `.google.cloud.aiplatform.v1beta1.IndexStats` is changed
docs: A comment for enum value `EMBEDDING_SIZE_MISMATCH` in enum `RecordErrorType` is changed
docs: A comment for field `exec` in message `.google.cloud.aiplatform.v1beta1.Probe` is changed
  • Loading branch information
gcf-owl-bot[bot] authored May 30, 2024
1 parent 0750d34 commit 1987df1
Show file tree
Hide file tree
Showing 78 changed files with 2,657 additions and 109 deletions.
2 changes: 2 additions & 0 deletions google-cloud-ai_platform-v1/.owlbot-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,7 @@
"snippets/dataset_service/restore_dataset_version.rb",
"snippets/dataset_service/search_data_items.rb",
"snippets/dataset_service/update_dataset.rb",
"snippets/dataset_service/update_dataset_version.rb",
"snippets/deployment_resource_pool_service/create_deployment_resource_pool.rb",
"snippets/deployment_resource_pool_service/delete_deployment_resource_pool.rb",
"snippets/deployment_resource_pool_service/get_deployment_resource_pool.rb",
Expand Down Expand Up @@ -732,6 +733,7 @@
"snippets/notebook_service/list_notebook_runtime_templates.rb",
"snippets/notebook_service/list_notebook_runtimes.rb",
"snippets/notebook_service/start_notebook_runtime.rb",
"snippets/notebook_service/update_notebook_runtime_template.rb",
"snippets/notebook_service/upgrade_notebook_runtime.rb",
"snippets/persistent_resource_service/create_persistent_resource.rb",
"snippets/persistent_resource_service/delete_persistent_resource.rb",
Expand Down
10 changes: 10 additions & 0 deletions google-cloud-ai_platform-v1/gapic_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@
"create_dataset_version"
]
},
"UpdateDatasetVersion": {
"methods": [
"update_dataset_version"
]
},
"DeleteDatasetVersion": {
"methods": [
"delete_dataset_version"
Expand Down Expand Up @@ -1221,6 +1226,11 @@
"delete_notebook_runtime_template"
]
},
"UpdateNotebookRuntimeTemplate": {
"methods": [
"update_notebook_runtime_template"
]
},
"AssignNotebookRuntime": {
"methods": [
"assign_notebook_runtime"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,98 @@ def create_dataset_version request, options = nil
raise ::Google::Cloud::Error.from_error(e)
end

##
# Updates a DatasetVersion.
#
# @overload update_dataset_version(request, options = nil)
# Pass arguments to `update_dataset_version` via a request object, either of type
# {::Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest} or an equivalent Hash.
#
# @param request [::Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest, ::Hash]
# A request object representing the call parameters. Required. To specify no
# parameters, or to keep all the default parameter values, pass an empty Hash.
# @param options [::Gapic::CallOptions, ::Hash]
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
#
# @overload update_dataset_version(dataset_version: nil, update_mask: nil)
# Pass arguments to `update_dataset_version` via keyword arguments. Note that at
# least one keyword argument is required. To specify no parameters, or to keep all
# the default parameter values, pass an empty Hash as a request object (see above).
#
# @param dataset_version [::Google::Cloud::AIPlatform::V1::DatasetVersion, ::Hash]
# Required. The DatasetVersion which replaces the resource on the server.
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
# Required. The update mask applies to the resource.
# For the `FieldMask` definition, see
# {::Google::Protobuf::FieldMask google.protobuf.FieldMask}. Updatable fields:
#
# * `display_name`
#
# @yield [response, operation] Access the result along with the RPC operation
# @yieldparam response [::Google::Cloud::AIPlatform::V1::DatasetVersion]
# @yieldparam operation [::GRPC::ActiveCall::Operation]
#
# @return [::Google::Cloud::AIPlatform::V1::DatasetVersion]
#
# @raise [::Google::Cloud::Error] if the RPC is aborted.
#
# @example Basic example
# require "google/cloud/ai_platform/v1"
#
# # Create a client object. The client can be reused for multiple calls.
# client = Google::Cloud::AIPlatform::V1::DatasetService::Client.new
#
# # Create a request. To set request fields, pass in keyword arguments.
# request = Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest.new
#
# # Call the update_dataset_version method.
# result = client.update_dataset_version request
#
# # The returned object is of type Google::Cloud::AIPlatform::V1::DatasetVersion.
# p result
#
def update_dataset_version request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?

request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest

# Converts hash and nil to an options object
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

# Customize the options with defaults
metadata = @config.rpcs.update_dataset_version.metadata.to_h

# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

header_params = {}
if request.dataset_version&.name
header_params["dataset_version.name"] = request.dataset_version.name
end

request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
metadata[:"x-goog-request-params"] ||= request_params_header

options.apply_defaults timeout: @config.rpcs.update_dataset_version.timeout,
metadata: metadata,
retry_policy: @config.rpcs.update_dataset_version.retry_policy

options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy

@dataset_service_stub.call_rpc :update_dataset_version, request, options: options do |response, operation|
yield response, operation if block_given?
return response
end
rescue ::GRPC::BadStatus => e
raise ::Google::Cloud::Error.from_error(e)
end

##
# Deletes a Dataset version.
#
Expand Down Expand Up @@ -2230,6 +2322,11 @@ class Rpcs
#
attr_reader :create_dataset_version
##
# RPC-specific configuration for `update_dataset_version`
# @return [::Gapic::Config::Method]
#
attr_reader :update_dataset_version
##
# RPC-specific configuration for `delete_dataset_version`
# @return [::Gapic::Config::Method]
#
Expand Down Expand Up @@ -2298,6 +2395,8 @@ def initialize parent_rpcs = nil
@export_data = ::Gapic::Config::Method.new export_data_config
create_dataset_version_config = parent_rpcs.create_dataset_version if parent_rpcs.respond_to? :create_dataset_version
@create_dataset_version = ::Gapic::Config::Method.new create_dataset_version_config
update_dataset_version_config = parent_rpcs.update_dataset_version if parent_rpcs.respond_to? :update_dataset_version
@update_dataset_version = ::Gapic::Config::Method.new update_dataset_version_config
delete_dataset_version_config = parent_rpcs.delete_dataset_version if parent_rpcs.respond_to? :delete_dataset_version
@delete_dataset_version = ::Gapic::Config::Method.new delete_dataset_version_config
get_dataset_version_config = parent_rpcs.get_dataset_version if parent_rpcs.respond_to? :get_dataset_version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -939,6 +939,91 @@ def create_dataset_version request, options = nil
raise ::Google::Cloud::Error.from_error(e)
end

##
# Updates a DatasetVersion.
#
# @overload update_dataset_version(request, options = nil)
# Pass arguments to `update_dataset_version` via a request object, either of type
# {::Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest} or an equivalent Hash.
#
# @param request [::Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest, ::Hash]
# A request object representing the call parameters. Required. To specify no
# parameters, or to keep all the default parameter values, pass an empty Hash.
# @param options [::Gapic::CallOptions, ::Hash]
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
#
# @overload update_dataset_version(dataset_version: nil, update_mask: nil)
# Pass arguments to `update_dataset_version` via keyword arguments. Note that at
# least one keyword argument is required. To specify no parameters, or to keep all
# the default parameter values, pass an empty Hash as a request object (see above).
#
# @param dataset_version [::Google::Cloud::AIPlatform::V1::DatasetVersion, ::Hash]
# Required. The DatasetVersion which replaces the resource on the server.
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
# Required. The update mask applies to the resource.
# For the `FieldMask` definition, see
# {::Google::Protobuf::FieldMask google.protobuf.FieldMask}. Updatable fields:
#
# * `display_name`
# @yield [result, operation] Access the result along with the TransportOperation object
# @yieldparam result [::Google::Cloud::AIPlatform::V1::DatasetVersion]
# @yieldparam operation [::Gapic::Rest::TransportOperation]
#
# @return [::Google::Cloud::AIPlatform::V1::DatasetVersion]
#
# @raise [::Google::Cloud::Error] if the REST call is aborted.
#
# @example Basic example
# require "google/cloud/ai_platform/v1"
#
# # Create a client object. The client can be reused for multiple calls.
# client = Google::Cloud::AIPlatform::V1::DatasetService::Rest::Client.new
#
# # Create a request. To set request fields, pass in keyword arguments.
# request = Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest.new
#
# # Call the update_dataset_version method.
# result = client.update_dataset_version request
#
# # The returned object is of type Google::Cloud::AIPlatform::V1::DatasetVersion.
# p result
#
def update_dataset_version request, options = nil
raise ::ArgumentError, "request must be provided" if request.nil?

request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateDatasetVersionRequest

# Converts hash and nil to an options object
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h

# Customize the options with defaults
call_metadata = @config.rpcs.update_dataset_version.metadata.to_h

# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
lib_name: @config.lib_name, lib_version: @config.lib_version,
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
transports_version_send: [:rest]

call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id

options.apply_defaults timeout: @config.rpcs.update_dataset_version.timeout,
metadata: call_metadata,
retry_policy: @config.rpcs.update_dataset_version.retry_policy

options.apply_defaults timeout: @config.timeout,
metadata: @config.metadata,
retry_policy: @config.retry_policy

@dataset_service_stub.update_dataset_version request, options do |result, operation|
yield result, operation if block_given?
return result
end
rescue ::Gapic::Rest::Error => e
raise ::Google::Cloud::Error.from_error(e)
end

##
# Deletes a Dataset version.
#
Expand Down Expand Up @@ -2086,6 +2171,11 @@ class Rpcs
#
attr_reader :create_dataset_version
##
# RPC-specific configuration for `update_dataset_version`
# @return [::Gapic::Config::Method]
#
attr_reader :update_dataset_version
##
# RPC-specific configuration for `delete_dataset_version`
# @return [::Gapic::Config::Method]
#
Expand Down Expand Up @@ -2154,6 +2244,8 @@ def initialize parent_rpcs = nil
@export_data = ::Gapic::Config::Method.new export_data_config
create_dataset_version_config = parent_rpcs.create_dataset_version if parent_rpcs.respond_to? :create_dataset_version
@create_dataset_version = ::Gapic::Config::Method.new create_dataset_version_config
update_dataset_version_config = parent_rpcs.update_dataset_version if parent_rpcs.respond_to? :update_dataset_version
@update_dataset_version = ::Gapic::Config::Method.new update_dataset_version_config
delete_dataset_version_config = parent_rpcs.delete_dataset_version if parent_rpcs.respond_to? :delete_dataset_version
@delete_dataset_version = ::Gapic::Config::Method.new delete_dataset_version_config
get_dataset_version_config = parent_rpcs.get_dataset_version if parent_rpcs.respond_to? :get_dataset_version
Expand Down
Loading

0 comments on commit 1987df1

Please sign in to comment.