diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/client.rb index 361cd85437d0..703f9c63631e 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/client.rb @@ -1429,7 +1429,7 @@ def export_model request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. # - # @overload copy_model(model_id: nil, parent_model: nil, parent: nil, source_model: nil, encryption_spec: nil) + # @overload copy_model(model_id: nil, parent_model: nil, parent: nil, source_model: nil, encryption_spec: nil, custom_service_account: nil) # Pass arguments to `copy_model` 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). @@ -1458,6 +1458,17 @@ def export_model request, options = nil # @param encryption_spec [::Google::Cloud::AIPlatform::V1::EncryptionSpec, ::Hash] # Customer-managed encryption key options. If this is set, # then the Model copy will be encrypted with the provided encryption key. + # @param custom_service_account [::String] + # Optional. The user-provided custom service account to use to do the copy + # model. If empty, [Vertex AI Service + # Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) + # will be used to access resources needed to upload the model. This account + # must belong to the destination project where the model is copied to, + # i.e., the project specified in the `parent` field of this request and + # have the Vertex AI Service Agent role in the source project. + # + # Requires the user copying the Model to have the + # `iam.serviceAccounts.actAs` permission on this service account. # # @yield [response, operation] Access the result along with the RPC operation # @yieldparam response [::Gapic::Operation] diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb index 74b009922230..aa5530dde60b 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/ai_platform/v1/model_service/rest/client.rb @@ -1347,7 +1347,7 @@ def export_model request, options = nil # @param options [::Gapic::CallOptions, ::Hash] # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. # - # @overload copy_model(model_id: nil, parent_model: nil, parent: nil, source_model: nil, encryption_spec: nil) + # @overload copy_model(model_id: nil, parent_model: nil, parent: nil, source_model: nil, encryption_spec: nil, custom_service_account: nil) # Pass arguments to `copy_model` 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). @@ -1376,6 +1376,17 @@ def export_model request, options = nil # @param encryption_spec [::Google::Cloud::AIPlatform::V1::EncryptionSpec, ::Hash] # Customer-managed encryption key options. If this is set, # then the Model copy will be encrypted with the provided encryption key. + # @param custom_service_account [::String] + # Optional. The user-provided custom service account to use to do the copy + # model. If empty, [Vertex AI Service + # Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) + # will be used to access resources needed to upload the model. This account + # must belong to the destination project where the model is copied to, + # i.e., the project specified in the `parent` field of this request and + # have the Vertex AI Service Agent role in the source project. + # + # Requires the user copying the Model to have the + # `iam.serviceAccounts.actAs` permission on this service account. # @yield [result, operation] Access the result along with the TransportOperation object # @yieldparam result [::Gapic::Operation] # @yieldparam operation [::Gapic::Rest::TransportOperation] diff --git a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_service_pb.rb b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_service_pb.rb index da5c0459e71d..18c8c2300c23 100644 --- a/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_service_pb.rb +++ b/google-cloud-ai_platform-v1/lib/google/cloud/aiplatform/v1/model_service_pb.rb @@ -21,7 +21,7 @@ require 'google/protobuf/field_mask_pb' -descriptor_data = "\n.google/cloud/aiplatform/v1/model_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a\x35google/cloud/aiplatform/v1/evaluated_annotation.proto\x1a,google/cloud/aiplatform/v1/explanation.proto\x1a#google/cloud/aiplatform/v1/io.proto\x1a&google/cloud/aiplatform/v1/model.proto\x1a\x31google/cloud/aiplatform/v1/model_evaluation.proto\x1a\x37google/cloud/aiplatform/v1/model_evaluation_slice.proto\x1a*google/cloud/aiplatform/v1/operation.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xd6\x01\n\x12UploadModelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x19\n\x0cparent_model\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08model_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x35\n\x05model\x18\x02 \x01(\x0b\x32!.google.cloud.aiplatform.v1.ModelB\x03\xe0\x41\x02\x12\x1c\n\x0fservice_account\x18\x06 \x01(\tB\x03\xe0\x41\x01\"n\n\x1cUploadModelOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\"i\n\x13UploadModelResponse\x12\x33\n\x05model\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"H\n\x0fGetModelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\"\xc6\x01\n\x11ListModelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12-\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x10\n\x08order_by\x18\x06 \x01(\t\"`\n\x12ListModelsResponse\x12\x31\n\x06models\x18\x01 \x03(\x0b\x32!.google.cloud.aiplatform.v1.Model\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc9\x01\n\x18ListModelVersionsRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12-\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x10\n\x08order_by\x18\x06 \x01(\t\"g\n\x19ListModelVersionsResponse\x12\x31\n\x06models\x18\x01 \x03(\x0b\x32!.google.cloud.aiplatform.v1.Model\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8c\x01\n\"ListModelVersionCheckpointsRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"L\n\x16ModelVersionCheckpoint\x12\x15\n\rcheckpoint_id\x18\x01 \x01(\t\x12\r\n\x05\x65poch\x18\x02 \x01(\x03\x12\x0c\n\x04step\x18\x03 \x01(\x03\"\x87\x01\n#ListModelVersionCheckpointsResponse\x12G\n\x0b\x63heckpoints\x18\x01 \x03(\x0b\x32\x32.google.cloud.aiplatform.v1.ModelVersionCheckpoint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x81\x01\n\x12UpdateModelRequest\x12\x35\n\x05model\x18\x01 \x01(\x0b\x32!.google.cloud.aiplatform.v1.ModelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x91\x01\n\x1fUpdateExplanationDatasetRequest\x12\x36\n\x05model\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x36\n\x08\x65xamples\x18\x02 \x01(\x0b\x32$.google.cloud.aiplatform.v1.Examples\"{\n)UpdateExplanationDatasetOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\"K\n\x12\x44\x65leteModelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\"R\n\x19\x44\x65leteModelVersionRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\"q\n\x1aMergeVersionAliasesRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1c\n\x0fversion_aliases\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\xee\x02\n\x12\x45xportModelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12W\n\routput_config\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfigB\x03\xe0\x41\x02\x1a\xc7\x01\n\x0cOutputConfig\x12\x18\n\x10\x65xport_format_id\x18\x01 \x01(\t\x12H\n\x14\x61rtifact_destination\x18\x03 \x01(\x0b\x32*.google.cloud.aiplatform.v1.GcsDestination\x12S\n\x11image_destination\x18\x04 \x01(\x0b\x32\x38.google.cloud.aiplatform.v1.ContainerRegistryDestination\"\x9c\x02\n\x1c\x45xportModelOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\x12]\n\x0boutput_info\x18\x02 \x01(\x0b\x32\x43.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfoB\x03\xe0\x41\x03\x1aM\n\nOutputInfo\x12 \n\x13\x61rtifact_output_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10image_output_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\"\n UpdateExplanationDatasetResponse\"\x15\n\x13\x45xportModelResponse\"\xc0\x02\n\x10\x43opyModelRequest\x12\x17\n\x08model_id\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x12?\n\x0cparent_model\x18\x05 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x61iplatform.googleapis.com/ModelH\x00\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12=\n\x0csource_model\x18\x02 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x43\n\x0f\x65ncryption_spec\x18\x03 \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpecB\x13\n\x11\x64\x65stination_model\"l\n\x1a\x43opyModelOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\"g\n\x11\x43opyModelResponse\x12\x33\n\x05model\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xa3\x01\n\x1cImportModelEvaluationRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12J\n\x10model_evaluation\x18\x02 \x01(\x0b\x32+.google.cloud.aiplatform.v1.ModelEvaluationB\x03\xe0\x41\x02\"\xc4\x01\n\'BatchImportModelEvaluationSlicesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)aiplatform.googleapis.com/ModelEvaluation\x12V\n\x17model_evaluation_slices\x18\x02 \x03(\x0b\x32\x30.google.cloud.aiplatform.v1.ModelEvaluationSliceB\x03\xe0\x41\x02\"Y\n(BatchImportModelEvaluationSlicesResponse\x12-\n imported_model_evaluation_slices\x18\x01 \x03(\tB\x03\xe0\x41\x03\"\xc5\x01\n&BatchImportEvaluatedAnnotationsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.aiplatform.googleapis.com/ModelEvaluationSlice\x12S\n\x15\x65valuated_annotations\x18\x02 \x03(\x0b\x32/.google.cloud.aiplatform.v1.EvaluatedAnnotationB\x03\xe0\x41\x02\"\\\n\'BatchImportEvaluatedAnnotationsResponse\x12\x31\n$imported_evaluated_annotations_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\"\\\n\x19GetModelEvaluationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)aiplatform.googleapis.com/ModelEvaluation\"\xbc\x01\n\x1bListModelEvaluationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12-\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x7f\n\x1cListModelEvaluationsResponse\x12\x46\n\x11model_evaluations\x18\x01 \x03(\x0b\x32+.google.cloud.aiplatform.v1.ModelEvaluation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"f\n\x1eGetModelEvaluationSliceRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.aiplatform.googleapis.com/ModelEvaluationSlice\"\xcb\x01\n ListModelEvaluationSlicesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)aiplatform.googleapis.com/ModelEvaluation\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12-\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x8f\x01\n!ListModelEvaluationSlicesResponse\x12Q\n\x17model_evaluation_slices\x18\x01 \x03(\x0b\x32\x30.google.cloud.aiplatform.v1.ModelEvaluationSlice\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x89\"\n\x0cModelService\x12\xe0\x01\n\x0bUploadModel\x12..google.cloud.aiplatform.v1.UploadModelRequest\x1a\x1d.google.longrunning.Operation\"\x81\x01\xca\x41\x33\n\x13UploadModelResponse\x12\x1cUploadModelOperationMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x36\"1/v1/{parent=projects/*/locations/*}/models:upload:\x01*\x12\x95\x01\n\x08GetModel\x12+.google.cloud.aiplatform.v1.GetModelRequest\x1a!.google.cloud.aiplatform.v1.Model\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/models/*}\x12\xa8\x01\n\nListModels\x12-.google.cloud.aiplatform.v1.ListModelsRequest\x1a..google.cloud.aiplatform.v1.ListModelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/models\x12\xc8\x01\n\x11ListModelVersions\x12\x34.google.cloud.aiplatform.v1.ListModelVersionsRequest\x1a\x35.google.cloud.aiplatform.v1.ListModelVersionsResponse\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/models/*}:listVersions\x12\xe9\x01\n\x1bListModelVersionCheckpoints\x12>.google.cloud.aiplatform.v1.ListModelVersionCheckpointsRequest\x1a?.google.cloud.aiplatform.v1.ListModelVersionCheckpointsResponse\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/models/*}:listCheckpoints\x12\xb5\x01\n\x0bUpdateModel\x12..google.cloud.aiplatform.v1.UpdateModelRequest\x1a!.google.cloud.aiplatform.v1.Model\"S\xda\x41\x11model,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{model.name=projects/*/locations/*/models/*}:\x05model\x12\xa0\x02\n\x18UpdateExplanationDataset\x12;.google.cloud.aiplatform.v1.UpdateExplanationDatasetRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41M\n UpdateExplanationDatasetResponse\x12)UpdateExplanationDatasetOperationMetadata\xda\x41\x05model\x82\xd3\xe4\x93\x02I\"D/v1/{model=projects/*/locations/*/models/*}:updateExplanationDataset:\x01*\x12\xca\x01\n\x0b\x44\x65leteModel\x12..google.cloud.aiplatform.v1.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17\x44\x65leteOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/models/*}\x12\xe6\x01\n\x12\x44\x65leteModelVersion\x12\x35.google.cloud.aiplatform.v1.DeleteModelVersionRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17\x44\x65leteOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/models/*}:deleteVersion\x12\xd2\x01\n\x13MergeVersionAliases\x12\x36.google.cloud.aiplatform.v1.MergeVersionAliasesRequest\x1a!.google.cloud.aiplatform.v1.Model\"`\xda\x41\x14name,version_aliases\x82\xd3\xe4\x93\x02\x43\">/v1/{name=projects/*/locations/*/models/*}:mergeVersionAliases:\x01*\x12\xe6\x01\n\x0b\x45xportModel\x12..google.cloud.aiplatform.v1.ExportModelRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x33\n\x13\x45xportModelResponse\x12\x1c\x45xportModelOperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/models/*}:export:\x01*\x12\xdd\x01\n\tCopyModel\x12,.google.cloud.aiplatform.v1.CopyModelRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41/\n\x11\x43opyModelResponse\x12\x1a\x43opyModelOperationMetadata\xda\x41\x13parent,source_model\x82\xd3\xe4\x93\x02\x34\"//v1/{parent=projects/*/locations/*}/models:copy:\x01*\x12\xe4\x01\n\x15ImportModelEvaluation\x12\x38.google.cloud.aiplatform.v1.ImportModelEvaluationRequest\x1a+.google.cloud.aiplatform.v1.ModelEvaluation\"d\xda\x41\x17parent,model_evaluation\x82\xd3\xe4\x93\x02\x44\"?/v1/{parent=projects/*/locations/*/models/*}/evaluations:import:\x01*\x12\xa8\x02\n BatchImportModelEvaluationSlices\x12\x43.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest\x1a\x44.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse\"y\xda\x41\x1eparent,model_evaluation_slices\x82\xd3\xe4\x93\x02R\"M/v1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices:batchImport:\x01*\x12\xa5\x02\n\x1f\x42\x61tchImportEvaluatedAnnotations\x12\x42.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest\x1a\x43.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse\"y\xda\x41\x1cparent,evaluated_annotations\x82\xd3\xe4\x93\x02T\"O/v1/{parent=projects/*/locations/*/models/*/evaluations/*/slices/*}:batchImport:\x01*\x12\xc1\x01\n\x12GetModelEvaluation\x12\x35.google.cloud.aiplatform.v1.GetModelEvaluationRequest\x1a+.google.cloud.aiplatform.v1.ModelEvaluation\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/models/*/evaluations/*}\x12\xd4\x01\n\x14ListModelEvaluations\x12\x37.google.cloud.aiplatform.v1.ListModelEvaluationsRequest\x1a\x38.google.cloud.aiplatform.v1.ListModelEvaluationsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/models/*}/evaluations\x12\xd9\x01\n\x17GetModelEvaluationSlice\x12:.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest\x1a\x30.google.cloud.aiplatform.v1.ModelEvaluationSlice\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/models/*/evaluations/*/slices/*}\x12\xec\x01\n\x19ListModelEvaluationSlices\x12<.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest\x1a=.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xcf\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x11ModelServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" +descriptor_data = "\n.google/cloud/aiplatform/v1/model_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x30google/cloud/aiplatform/v1/encryption_spec.proto\x1a\x35google/cloud/aiplatform/v1/evaluated_annotation.proto\x1a,google/cloud/aiplatform/v1/explanation.proto\x1a#google/cloud/aiplatform/v1/io.proto\x1a&google/cloud/aiplatform/v1/model.proto\x1a\x31google/cloud/aiplatform/v1/model_evaluation.proto\x1a\x37google/cloud/aiplatform/v1/model_evaluation_slice.proto\x1a*google/cloud/aiplatform/v1/operation.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\"\xd6\x01\n\x12UploadModelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x19\n\x0cparent_model\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x15\n\x08model_id\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x35\n\x05model\x18\x02 \x01(\x0b\x32!.google.cloud.aiplatform.v1.ModelB\x03\xe0\x41\x02\x12\x1c\n\x0fservice_account\x18\x06 \x01(\tB\x03\xe0\x41\x01\"n\n\x1cUploadModelOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\"i\n\x13UploadModelResponse\x12\x33\n\x05model\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"H\n\x0fGetModelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\"\xc6\x01\n\x11ListModelsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12-\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x10\n\x08order_by\x18\x06 \x01(\t\"`\n\x12ListModelsResponse\x12\x31\n\x06models\x18\x01 \x03(\x0b\x32!.google.cloud.aiplatform.v1.Model\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc9\x01\n\x18ListModelVersionsRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12-\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x10\n\x08order_by\x18\x06 \x01(\t\"g\n\x19ListModelVersionsResponse\x12\x31\n\x06models\x18\x01 \x03(\x0b\x32!.google.cloud.aiplatform.v1.Model\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x8c\x01\n\"ListModelVersionCheckpointsRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x16\n\tpage_size\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x17\n\npage_token\x18\x03 \x01(\tB\x03\xe0\x41\x01\"L\n\x16ModelVersionCheckpoint\x12\x15\n\rcheckpoint_id\x18\x01 \x01(\t\x12\r\n\x05\x65poch\x18\x02 \x01(\x03\x12\x0c\n\x04step\x18\x03 \x01(\x03\"\x87\x01\n#ListModelVersionCheckpointsResponse\x12G\n\x0b\x63heckpoints\x18\x01 \x03(\x0b\x32\x32.google.cloud.aiplatform.v1.ModelVersionCheckpoint\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\x81\x01\n\x12UpdateModelRequest\x12\x35\n\x05model\x18\x01 \x01(\x0b\x32!.google.cloud.aiplatform.v1.ModelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\"\x91\x01\n\x1fUpdateExplanationDatasetRequest\x12\x36\n\x05model\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x36\n\x08\x65xamples\x18\x02 \x01(\x0b\x32$.google.cloud.aiplatform.v1.Examples\"{\n)UpdateExplanationDatasetOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\"K\n\x12\x44\x65leteModelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\"R\n\x19\x44\x65leteModelVersionRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\"q\n\x1aMergeVersionAliasesRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1c\n\x0fversion_aliases\x18\x02 \x03(\tB\x03\xe0\x41\x02\"\xee\x02\n\x12\x45xportModelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12W\n\routput_config\x18\x02 \x01(\x0b\x32;.google.cloud.aiplatform.v1.ExportModelRequest.OutputConfigB\x03\xe0\x41\x02\x1a\xc7\x01\n\x0cOutputConfig\x12\x18\n\x10\x65xport_format_id\x18\x01 \x01(\t\x12H\n\x14\x61rtifact_destination\x18\x03 \x01(\x0b\x32*.google.cloud.aiplatform.v1.GcsDestination\x12S\n\x11image_destination\x18\x04 \x01(\x0b\x32\x38.google.cloud.aiplatform.v1.ContainerRegistryDestination\"\x9c\x02\n\x1c\x45xportModelOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\x12]\n\x0boutput_info\x18\x02 \x01(\x0b\x32\x43.google.cloud.aiplatform.v1.ExportModelOperationMetadata.OutputInfoB\x03\xe0\x41\x03\x1aM\n\nOutputInfo\x12 \n\x13\x61rtifact_output_uri\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x10image_output_uri\x18\x03 \x01(\tB\x03\xe0\x41\x03\"\"\n UpdateExplanationDatasetResponse\"\x15\n\x13\x45xportModelResponse\"\xe5\x02\n\x10\x43opyModelRequest\x12\x17\n\x08model_id\x18\x04 \x01(\tB\x03\xe0\x41\x01H\x00\x12?\n\x0cparent_model\x18\x05 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x61iplatform.googleapis.com/ModelH\x00\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12=\n\x0csource_model\x18\x02 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x43\n\x0f\x65ncryption_spec\x18\x03 \x01(\x0b\x32*.google.cloud.aiplatform.v1.EncryptionSpec\x12#\n\x16\x63ustom_service_account\x18\x07 \x01(\tB\x03\xe0\x41\x01\x42\x13\n\x11\x64\x65stination_model\"l\n\x1a\x43opyModelOperationMetadata\x12N\n\x10generic_metadata\x18\x01 \x01(\x0b\x32\x34.google.cloud.aiplatform.v1.GenericOperationMetadata\"g\n\x11\x43opyModelResponse\x12\x33\n\x05model\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\"\xa3\x01\n\x1cImportModelEvaluationRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12J\n\x10model_evaluation\x18\x02 \x01(\x0b\x32+.google.cloud.aiplatform.v1.ModelEvaluationB\x03\xe0\x41\x02\"\xc4\x01\n\'BatchImportModelEvaluationSlicesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)aiplatform.googleapis.com/ModelEvaluation\x12V\n\x17model_evaluation_slices\x18\x02 \x03(\x0b\x32\x30.google.cloud.aiplatform.v1.ModelEvaluationSliceB\x03\xe0\x41\x02\"Y\n(BatchImportModelEvaluationSlicesResponse\x12-\n imported_model_evaluation_slices\x18\x01 \x03(\tB\x03\xe0\x41\x03\"\xc5\x01\n&BatchImportEvaluatedAnnotationsRequest\x12\x46\n\x06parent\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.aiplatform.googleapis.com/ModelEvaluationSlice\x12S\n\x15\x65valuated_annotations\x18\x02 \x03(\x0b\x32/.google.cloud.aiplatform.v1.EvaluatedAnnotationB\x03\xe0\x41\x02\"\\\n\'BatchImportEvaluatedAnnotationsResponse\x12\x31\n$imported_evaluated_annotations_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\"\\\n\x19GetModelEvaluationRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)aiplatform.googleapis.com/ModelEvaluation\"\xbc\x01\n\x1bListModelEvaluationsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12-\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x7f\n\x1cListModelEvaluationsResponse\x12\x46\n\x11model_evaluations\x18\x01 \x03(\x0b\x32+.google.cloud.aiplatform.v1.ModelEvaluation\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"f\n\x1eGetModelEvaluationSliceRequest\x12\x44\n\x04name\x18\x01 \x01(\tB6\xe0\x41\x02\xfa\x41\x30\n.aiplatform.googleapis.com/ModelEvaluationSlice\"\xcb\x01\n ListModelEvaluationSlicesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)aiplatform.googleapis.com/ModelEvaluation\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\x12-\n\tread_mask\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x8f\x01\n!ListModelEvaluationSlicesResponse\x12Q\n\x17model_evaluation_slices\x18\x01 \x03(\x0b\x32\x30.google.cloud.aiplatform.v1.ModelEvaluationSlice\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t2\x89\"\n\x0cModelService\x12\xe0\x01\n\x0bUploadModel\x12..google.cloud.aiplatform.v1.UploadModelRequest\x1a\x1d.google.longrunning.Operation\"\x81\x01\xca\x41\x33\n\x13UploadModelResponse\x12\x1cUploadModelOperationMetadata\xda\x41\x0cparent,model\x82\xd3\xe4\x93\x02\x36\"1/v1/{parent=projects/*/locations/*}/models:upload:\x01*\x12\x95\x01\n\x08GetModel\x12+.google.cloud.aiplatform.v1.GetModelRequest\x1a!.google.cloud.aiplatform.v1.Model\"9\xda\x41\x04name\x82\xd3\xe4\x93\x02,\x12*/v1/{name=projects/*/locations/*/models/*}\x12\xa8\x01\n\nListModels\x12-.google.cloud.aiplatform.v1.ListModelsRequest\x1a..google.cloud.aiplatform.v1.ListModelsResponse\";\xda\x41\x06parent\x82\xd3\xe4\x93\x02,\x12*/v1/{parent=projects/*/locations/*}/models\x12\xc8\x01\n\x11ListModelVersions\x12\x34.google.cloud.aiplatform.v1.ListModelVersionsRequest\x1a\x35.google.cloud.aiplatform.v1.ListModelVersionsResponse\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\x12\x37/v1/{name=projects/*/locations/*/models/*}:listVersions\x12\xe9\x01\n\x1bListModelVersionCheckpoints\x12>.google.cloud.aiplatform.v1.ListModelVersionCheckpointsRequest\x1a?.google.cloud.aiplatform.v1.ListModelVersionCheckpointsResponse\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1/{name=projects/*/locations/*/models/*}:listCheckpoints\x12\xb5\x01\n\x0bUpdateModel\x12..google.cloud.aiplatform.v1.UpdateModelRequest\x1a!.google.cloud.aiplatform.v1.Model\"S\xda\x41\x11model,update_mask\x82\xd3\xe4\x93\x02\x39\x32\x30/v1/{model.name=projects/*/locations/*/models/*}:\x05model\x12\xa0\x02\n\x18UpdateExplanationDataset\x12;.google.cloud.aiplatform.v1.UpdateExplanationDatasetRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41M\n UpdateExplanationDatasetResponse\x12)UpdateExplanationDatasetOperationMetadata\xda\x41\x05model\x82\xd3\xe4\x93\x02I\"D/v1/{model=projects/*/locations/*/models/*}:updateExplanationDataset:\x01*\x12\xca\x01\n\x0b\x44\x65leteModel\x12..google.cloud.aiplatform.v1.DeleteModelRequest\x1a\x1d.google.longrunning.Operation\"l\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17\x44\x65leteOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02,**/v1/{name=projects/*/locations/*/models/*}\x12\xe6\x01\n\x12\x44\x65leteModelVersion\x12\x35.google.cloud.aiplatform.v1.DeleteModelVersionRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17\x44\x65leteOperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:*8/v1/{name=projects/*/locations/*/models/*}:deleteVersion\x12\xd2\x01\n\x13MergeVersionAliases\x12\x36.google.cloud.aiplatform.v1.MergeVersionAliasesRequest\x1a!.google.cloud.aiplatform.v1.Model\"`\xda\x41\x14name,version_aliases\x82\xd3\xe4\x93\x02\x43\">/v1/{name=projects/*/locations/*/models/*}:mergeVersionAliases:\x01*\x12\xe6\x01\n\x0b\x45xportModel\x12..google.cloud.aiplatform.v1.ExportModelRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x33\n\x13\x45xportModelResponse\x12\x1c\x45xportModelOperationMetadata\xda\x41\x12name,output_config\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/locations/*/models/*}:export:\x01*\x12\xdd\x01\n\tCopyModel\x12,.google.cloud.aiplatform.v1.CopyModelRequest\x1a\x1d.google.longrunning.Operation\"\x82\x01\xca\x41/\n\x11\x43opyModelResponse\x12\x1a\x43opyModelOperationMetadata\xda\x41\x13parent,source_model\x82\xd3\xe4\x93\x02\x34\"//v1/{parent=projects/*/locations/*}/models:copy:\x01*\x12\xe4\x01\n\x15ImportModelEvaluation\x12\x38.google.cloud.aiplatform.v1.ImportModelEvaluationRequest\x1a+.google.cloud.aiplatform.v1.ModelEvaluation\"d\xda\x41\x17parent,model_evaluation\x82\xd3\xe4\x93\x02\x44\"?/v1/{parent=projects/*/locations/*/models/*}/evaluations:import:\x01*\x12\xa8\x02\n BatchImportModelEvaluationSlices\x12\x43.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesRequest\x1a\x44.google.cloud.aiplatform.v1.BatchImportModelEvaluationSlicesResponse\"y\xda\x41\x1eparent,model_evaluation_slices\x82\xd3\xe4\x93\x02R\"M/v1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices:batchImport:\x01*\x12\xa5\x02\n\x1f\x42\x61tchImportEvaluatedAnnotations\x12\x42.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsRequest\x1a\x43.google.cloud.aiplatform.v1.BatchImportEvaluatedAnnotationsResponse\"y\xda\x41\x1cparent,evaluated_annotations\x82\xd3\xe4\x93\x02T\"O/v1/{parent=projects/*/locations/*/models/*/evaluations/*/slices/*}:batchImport:\x01*\x12\xc1\x01\n\x12GetModelEvaluation\x12\x35.google.cloud.aiplatform.v1.GetModelEvaluationRequest\x1a+.google.cloud.aiplatform.v1.ModelEvaluation\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/models/*/evaluations/*}\x12\xd4\x01\n\x14ListModelEvaluations\x12\x37.google.cloud.aiplatform.v1.ListModelEvaluationsRequest\x1a\x38.google.cloud.aiplatform.v1.ListModelEvaluationsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/models/*}/evaluations\x12\xd9\x01\n\x17GetModelEvaluationSlice\x12:.google.cloud.aiplatform.v1.GetModelEvaluationSliceRequest\x1a\x30.google.cloud.aiplatform.v1.ModelEvaluationSlice\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/models/*/evaluations/*/slices/*}\x12\xec\x01\n\x19ListModelEvaluationSlices\x12<.google.cloud.aiplatform.v1.ListModelEvaluationSlicesRequest\x1a=.google.cloud.aiplatform.v1.ListModelEvaluationSlicesResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/models/*/evaluations/*}/slices\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xcf\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x11ModelServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3" pool = ::Google::Protobuf::DescriptorPool.generated_pool pool.add_serialized_file(descriptor_data) diff --git a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model_service.rb b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model_service.rb index 8d0079cff480..75c0345dd483 100644 --- a/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model_service.rb +++ b/google-cloud-ai_platform-v1/proto_docs/google/cloud/aiplatform/v1/model_service.rb @@ -528,6 +528,18 @@ class ExportModelResponse # @return [::Google::Cloud::AIPlatform::V1::EncryptionSpec] # Customer-managed encryption key options. If this is set, # then the Model copy will be encrypted with the provided encryption key. + # @!attribute [rw] custom_service_account + # @return [::String] + # Optional. The user-provided custom service account to use to do the copy + # model. If empty, [Vertex AI Service + # Agent](https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) + # will be used to access resources needed to upload the model. This account + # must belong to the destination project where the model is copied to, + # i.e., the project specified in the `parent` field of this request and + # have the Vertex AI Service Agent role in the source project. + # + # Requires the user copying the Model to have the + # `iam.serviceAccounts.actAs` permission on this service account. class CopyModelRequest include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_service_rest_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_service_rest_test.rb index f52fa5e471c0..bd9cc8bc6ddd 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_service_rest_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_service_rest_test.rb @@ -704,6 +704,7 @@ def test_copy_model parent = "hello world" source_model = "hello world" encryption_spec = {} + custom_service_account = "hello world" copy_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| assert options.metadata.key? :"x-goog-api-client" @@ -719,27 +720,27 @@ def test_copy_model end # Use hash object - client.copy_model({ model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec }) do |_result, response| + client.copy_model({ model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec, custom_service_account: custom_service_account }) do |_result, response| assert_equal http_response, response.underlying_op end # Use named arguments - client.copy_model model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec do |_result, response| + client.copy_model model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec, custom_service_account: custom_service_account do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object - client.copy_model ::Google::Cloud::AIPlatform::V1::CopyModelRequest.new(model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec) do |_result, response| + client.copy_model ::Google::Cloud::AIPlatform::V1::CopyModelRequest.new(model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec, custom_service_account: custom_service_account) do |_result, response| assert_equal http_response, response.underlying_op end # Use hash object with options - client.copy_model({ model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec }, call_options) do |_result, response| + client.copy_model({ model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec, custom_service_account: custom_service_account }, call_options) do |_result, response| assert_equal http_response, response.underlying_op end # Use protobuf object with options - client.copy_model(::Google::Cloud::AIPlatform::V1::CopyModelRequest.new(model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec), call_options) do |_result, response| + client.copy_model(::Google::Cloud::AIPlatform::V1::CopyModelRequest.new(model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec, custom_service_account: custom_service_account), call_options) do |_result, response| assert_equal http_response, response.underlying_op end diff --git a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_service_test.rb b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_service_test.rb index 308aa152568e..5ed3dcfda6dd 100644 --- a/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_service_test.rb +++ b/google-cloud-ai_platform-v1/test/google/cloud/ai_platform/v1/model_service_test.rb @@ -793,6 +793,7 @@ def test_copy_model parent = "hello world" source_model = "hello world" encryption_spec = {} + custom_service_account = "hello world" copy_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| assert_equal :copy_model, name @@ -802,6 +803,7 @@ def test_copy_model assert_equal "hello world", request["parent"] assert_equal "hello world", request["source_model"] assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::AIPlatform::V1::EncryptionSpec), request["encryption_spec"] + assert_equal "hello world", request["custom_service_account"] refute_nil options end @@ -812,35 +814,35 @@ def test_copy_model end # Use hash object - client.copy_model({ model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec }) do |response, operation| + client.copy_model({ model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec, custom_service_account: custom_service_account }) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use named arguments - client.copy_model model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec do |response, operation| + client.copy_model model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec, custom_service_account: custom_service_account do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object - client.copy_model ::Google::Cloud::AIPlatform::V1::CopyModelRequest.new(model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec) do |response, operation| + client.copy_model ::Google::Cloud::AIPlatform::V1::CopyModelRequest.new(model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec, custom_service_account: custom_service_account) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use hash object with options - client.copy_model({ model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec }, grpc_options) do |response, operation| + client.copy_model({ model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec, custom_service_account: custom_service_account }, grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation end # Use protobuf object with options - client.copy_model(::Google::Cloud::AIPlatform::V1::CopyModelRequest.new(model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec), grpc_options) do |response, operation| + client.copy_model(::Google::Cloud::AIPlatform::V1::CopyModelRequest.new(model_id: model_id, parent: parent, source_model: source_model, encryption_spec: encryption_spec, custom_service_account: custom_service_account), grpc_options) do |response, operation| assert_kind_of Gapic::Operation, response assert_equal grpc_response, response.grpc_op assert_equal grpc_operation, operation