Cloud AI Platform v1 API - Class ModelServiceClientImpl (2.22.0)

public sealed class ModelServiceClientImpl : ModelServiceClient

Reference documentation and code samples for the Cloud AI Platform v1 API class ModelServiceClientImpl.

ModelService client wrapper implementation, for convenient use.

Inheritance

object > ModelServiceClient > ModelServiceClientImpl

Namespace

Google.Cloud.AIPlatform.V1

Assembly

Google.Cloud.AIPlatform.V1.dll

Remarks

A service for managing Vertex AI's machine learning Models.

Constructors

ModelServiceClientImpl(ModelServiceClient, ModelServiceSettings, ILogger)

public ModelServiceClientImpl(ModelService.ModelServiceClient grpcClient, ModelServiceSettings settings, ILogger logger)

Constructs a client wrapper for the ModelService service, with the specified gRPC client and settings.

Parameters
NameDescription
grpcClientModelServiceModelServiceClient

The underlying gRPC client.

settingsModelServiceSettings

The base ModelServiceSettings used within this client.

loggerILogger

Optional ILogger to use within this client.

Properties

CopyModelOperationsClient

public override OperationsClient CopyModelOperationsClient { get; }

The long-running operations client for CopyModel.

Property Value
TypeDescription
OperationsClient
Overrides

DeleteModelOperationsClient

public override OperationsClient DeleteModelOperationsClient { get; }

The long-running operations client for DeleteModel.

Property Value
TypeDescription
OperationsClient
Overrides

DeleteModelVersionOperationsClient

public override OperationsClient DeleteModelVersionOperationsClient { get; }

The long-running operations client for DeleteModelVersion.

Property Value
TypeDescription
OperationsClient
Overrides

ExportModelOperationsClient

public override OperationsClient ExportModelOperationsClient { get; }

The long-running operations client for ExportModel.

Property Value
TypeDescription
OperationsClient
Overrides

GrpcClient

public override ModelService.ModelServiceClient GrpcClient { get; }

The underlying gRPC ModelService client

Property Value
TypeDescription
ModelServiceModelServiceClient
Overrides

IAMPolicyClient

public override IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient
Overrides

LocationsClient

public override LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient
Overrides

UpdateExplanationDatasetOperationsClient

public override OperationsClient UpdateExplanationDatasetOperationsClient { get; }

The long-running operations client for UpdateExplanationDataset.

Property Value
TypeDescription
OperationsClient
Overrides

UploadModelOperationsClient

public override OperationsClient UploadModelOperationsClient { get; }

The long-running operations client for UploadModel.

Property Value
TypeDescription
OperationsClient
Overrides

Methods

BatchImportEvaluatedAnnotations(BatchImportEvaluatedAnnotationsRequest, CallSettings)

public override BatchImportEvaluatedAnnotationsResponse BatchImportEvaluatedAnnotations(BatchImportEvaluatedAnnotationsRequest request, CallSettings callSettings = null)

Imports a list of externally generated EvaluatedAnnotations.

Parameters
NameDescription
requestBatchImportEvaluatedAnnotationsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BatchImportEvaluatedAnnotationsResponse

The RPC response.

Overrides

BatchImportEvaluatedAnnotationsAsync(BatchImportEvaluatedAnnotationsRequest, CallSettings)

public override Task<BatchImportEvaluatedAnnotationsResponse> BatchImportEvaluatedAnnotationsAsync(BatchImportEvaluatedAnnotationsRequest request, CallSettings callSettings = null)

Imports a list of externally generated EvaluatedAnnotations.

Parameters
NameDescription
requestBatchImportEvaluatedAnnotationsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskBatchImportEvaluatedAnnotationsResponse

A Task containing the RPC response.

Overrides

BatchImportModelEvaluationSlices(BatchImportModelEvaluationSlicesRequest, CallSettings)

public override BatchImportModelEvaluationSlicesResponse BatchImportModelEvaluationSlices(BatchImportModelEvaluationSlicesRequest request, CallSettings callSettings = null)

Imports a list of externally generated ModelEvaluationSlice.

Parameters
NameDescription
requestBatchImportModelEvaluationSlicesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BatchImportModelEvaluationSlicesResponse

The RPC response.

Overrides

BatchImportModelEvaluationSlicesAsync(BatchImportModelEvaluationSlicesRequest, CallSettings)

public override Task<BatchImportModelEvaluationSlicesResponse> BatchImportModelEvaluationSlicesAsync(BatchImportModelEvaluationSlicesRequest request, CallSettings callSettings = null)

Imports a list of externally generated ModelEvaluationSlice.

Parameters
NameDescription
requestBatchImportModelEvaluationSlicesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskBatchImportModelEvaluationSlicesResponse

A Task containing the RPC response.

Overrides

CopyModel(CopyModelRequest, CallSettings)

public override Operation<CopyModelResponse, CopyModelOperationMetadata> CopyModel(CopyModelRequest request, CallSettings callSettings = null)

Copies an already existing Vertex AI Model into the specified Location. The source Model must exist in the same Project. When copying custom Models, the users themselves are responsible for [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be region-agnostic, as well as making sure that any resources (e.g. files) it depends on remain accessible.

Parameters
NameDescription
requestCopyModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCopyModelResponseCopyModelOperationMetadata

The RPC response.

Overrides

CopyModelAsync(CopyModelRequest, CallSettings)

public override Task<Operation<CopyModelResponse, CopyModelOperationMetadata>> CopyModelAsync(CopyModelRequest request, CallSettings callSettings = null)

Copies an already existing Vertex AI Model into the specified Location. The source Model must exist in the same Project. When copying custom Models, the users themselves are responsible for [Model.metadata][google.cloud.aiplatform.v1.Model.metadata] content to be region-agnostic, as well as making sure that any resources (e.g. files) it depends on remain accessible.

Parameters
NameDescription
requestCopyModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCopyModelResponseCopyModelOperationMetadata

A Task containing the RPC response.

Overrides

DeleteModel(DeleteModelRequest, CallSettings)

public override Operation<Empty, DeleteOperationMetadata> DeleteModel(DeleteModelRequest request, CallSettings callSettings = null)

Deletes a Model.

A model cannot be deleted if any [Endpoint][google.cloud.aiplatform.v1.Endpoint] resource has a [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] based on the model in its [deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] field.

Parameters
NameDescription
requestDeleteModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyDeleteOperationMetadata

The RPC response.

Overrides

DeleteModelAsync(DeleteModelRequest, CallSettings)

public override Task<Operation<Empty, DeleteOperationMetadata>> DeleteModelAsync(DeleteModelRequest request, CallSettings callSettings = null)

Deletes a Model.

A model cannot be deleted if any [Endpoint][google.cloud.aiplatform.v1.Endpoint] resource has a [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] based on the model in its [deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] field.

Parameters
NameDescription
requestDeleteModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Overrides

DeleteModelVersion(DeleteModelVersionRequest, CallSettings)

public override Operation<Empty, DeleteOperationMetadata> DeleteModelVersion(DeleteModelVersionRequest request, CallSettings callSettings = null)

Deletes a Model version.

Model version can only be deleted if there are no [DeployedModels][google.cloud.aiplatform.v1.DeployedModel] created from it. Deleting the only version in the Model is not allowed. Use [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for deleting the Model instead.

Parameters
NameDescription
requestDeleteModelVersionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyDeleteOperationMetadata

The RPC response.

Overrides

DeleteModelVersionAsync(DeleteModelVersionRequest, CallSettings)

public override Task<Operation<Empty, DeleteOperationMetadata>> DeleteModelVersionAsync(DeleteModelVersionRequest request, CallSettings callSettings = null)

Deletes a Model version.

Model version can only be deleted if there are no [DeployedModels][google.cloud.aiplatform.v1.DeployedModel] created from it. Deleting the only version in the Model is not allowed. Use [DeleteModel][google.cloud.aiplatform.v1.ModelService.DeleteModel] for deleting the Model instead.

Parameters
NameDescription
requestDeleteModelVersionRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Overrides

ExportModel(ExportModelRequest, CallSettings)

public override Operation<ExportModelResponse, ExportModelOperationMetadata> ExportModel(ExportModelRequest request, CallSettings callSettings = null)

Exports a trained, exportable Model to a location specified by the user. A Model is considered to be exportable if it has at least one [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats].

Parameters
NameDescription
requestExportModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationExportModelResponseExportModelOperationMetadata

The RPC response.

Overrides

ExportModelAsync(ExportModelRequest, CallSettings)

public override Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> ExportModelAsync(ExportModelRequest request, CallSettings callSettings = null)

Exports a trained, exportable Model to a location specified by the user. A Model is considered to be exportable if it has at least one [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats].

Parameters
NameDescription
requestExportModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationExportModelResponseExportModelOperationMetadata

A Task containing the RPC response.

Overrides

GetModel(GetModelRequest, CallSettings)

public override Model GetModel(GetModelRequest request, CallSettings callSettings = null)

Gets a Model.

Parameters
NameDescription
requestGetModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Model

The RPC response.

Overrides

GetModelAsync(GetModelRequest, CallSettings)

public override Task<Model> GetModelAsync(GetModelRequest request, CallSettings callSettings = null)

Gets a Model.

Parameters
NameDescription
requestGetModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModel

A Task containing the RPC response.

Overrides

GetModelEvaluation(GetModelEvaluationRequest, CallSettings)

public override ModelEvaluation GetModelEvaluation(GetModelEvaluationRequest request, CallSettings callSettings = null)

Gets a ModelEvaluation.

Parameters
NameDescription
requestGetModelEvaluationRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ModelEvaluation

The RPC response.

Overrides

GetModelEvaluationAsync(GetModelEvaluationRequest, CallSettings)

public override Task<ModelEvaluation> GetModelEvaluationAsync(GetModelEvaluationRequest request, CallSettings callSettings = null)

Gets a ModelEvaluation.

Parameters
NameDescription
requestGetModelEvaluationRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModelEvaluation

A Task containing the RPC response.

Overrides

GetModelEvaluationSlice(GetModelEvaluationSliceRequest, CallSettings)

public override ModelEvaluationSlice GetModelEvaluationSlice(GetModelEvaluationSliceRequest request, CallSettings callSettings = null)

Gets a ModelEvaluationSlice.

Parameters
NameDescription
requestGetModelEvaluationSliceRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ModelEvaluationSlice

The RPC response.

Overrides

GetModelEvaluationSliceAsync(GetModelEvaluationSliceRequest, CallSettings)

public override Task<ModelEvaluationSlice> GetModelEvaluationSliceAsync(GetModelEvaluationSliceRequest request, CallSettings callSettings = null)

Gets a ModelEvaluationSlice.

Parameters
NameDescription
requestGetModelEvaluationSliceRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModelEvaluationSlice

A Task containing the RPC response.

Overrides

ImportModelEvaluation(ImportModelEvaluationRequest, CallSettings)

public override ModelEvaluation ImportModelEvaluation(ImportModelEvaluationRequest request, CallSettings callSettings = null)

Imports an externally generated ModelEvaluation.

Parameters
NameDescription
requestImportModelEvaluationRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ModelEvaluation

The RPC response.

Overrides

ImportModelEvaluationAsync(ImportModelEvaluationRequest, CallSettings)

public override Task<ModelEvaluation> ImportModelEvaluationAsync(ImportModelEvaluationRequest request, CallSettings callSettings = null)

Imports an externally generated ModelEvaluation.

Parameters
NameDescription
requestImportModelEvaluationRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModelEvaluation

A Task containing the RPC response.

Overrides

ListModelEvaluationSlices(ListModelEvaluationSlicesRequest, CallSettings)

public override PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlices(ListModelEvaluationSlicesRequest request, CallSettings callSettings = null)

Lists ModelEvaluationSlices in a ModelEvaluation.

Parameters
NameDescription
requestListModelEvaluationSlicesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice

A pageable sequence of ModelEvaluationSlice resources.

Overrides

ListModelEvaluationSlicesAsync(ListModelEvaluationSlicesRequest, CallSettings)

public override PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlicesAsync(ListModelEvaluationSlicesRequest request, CallSettings callSettings = null)

Lists ModelEvaluationSlices in a ModelEvaluation.

Parameters
NameDescription
requestListModelEvaluationSlicesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice

A pageable asynchronous sequence of ModelEvaluationSlice resources.

Overrides

ListModelEvaluations(ListModelEvaluationsRequest, CallSettings)

public override PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluations(ListModelEvaluationsRequest request, CallSettings callSettings = null)

Lists ModelEvaluations in a Model.

Parameters
NameDescription
requestListModelEvaluationsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListModelEvaluationsResponseModelEvaluation

A pageable sequence of ModelEvaluation resources.

Overrides

ListModelEvaluationsAsync(ListModelEvaluationsRequest, CallSettings)

public override PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluationsAsync(ListModelEvaluationsRequest request, CallSettings callSettings = null)

Lists ModelEvaluations in a Model.

Parameters
NameDescription
requestListModelEvaluationsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListModelEvaluationsResponseModelEvaluation

A pageable asynchronous sequence of ModelEvaluation resources.

Overrides

ListModelVersions(ListModelVersionsRequest, CallSettings)

public override PagedEnumerable<ListModelVersionsResponse, Model> ListModelVersions(ListModelVersionsRequest request, CallSettings callSettings = null)

Lists versions of the specified model.

Parameters
NameDescription
requestListModelVersionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListModelVersionsResponseModel

A pageable sequence of Model resources.

Overrides

ListModelVersionsAsync(ListModelVersionsRequest, CallSettings)

public override PagedAsyncEnumerable<ListModelVersionsResponse, Model> ListModelVersionsAsync(ListModelVersionsRequest request, CallSettings callSettings = null)

Lists versions of the specified model.

Parameters
NameDescription
requestListModelVersionsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListModelVersionsResponseModel

A pageable asynchronous sequence of Model resources.

Overrides

ListModels(ListModelsRequest, CallSettings)

public override PagedEnumerable<ListModelsResponse, Model> ListModels(ListModelsRequest request, CallSettings callSettings = null)

Lists Models in a Location.

Parameters
NameDescription
requestListModelsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListModelsResponseModel

A pageable sequence of Model resources.

Overrides

ListModelsAsync(ListModelsRequest, CallSettings)

public override PagedAsyncEnumerable<ListModelsResponse, Model> ListModelsAsync(ListModelsRequest request, CallSettings callSettings = null)

Lists Models in a Location.

Parameters
NameDescription
requestListModelsRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListModelsResponseModel

A pageable asynchronous sequence of Model resources.

Overrides

MergeVersionAliases(MergeVersionAliasesRequest, CallSettings)

public override Model MergeVersionAliases(MergeVersionAliasesRequest request, CallSettings callSettings = null)

Merges a set of aliases for a Model version.

Parameters
NameDescription
requestMergeVersionAliasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Model

The RPC response.

Overrides

MergeVersionAliasesAsync(MergeVersionAliasesRequest, CallSettings)

public override Task<Model> MergeVersionAliasesAsync(MergeVersionAliasesRequest request, CallSettings callSettings = null)

Merges a set of aliases for a Model version.

Parameters
NameDescription
requestMergeVersionAliasesRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModel

A Task containing the RPC response.

Overrides

UpdateExplanationDataset(UpdateExplanationDatasetRequest, CallSettings)

public override Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata> UpdateExplanationDataset(UpdateExplanationDatasetRequest request, CallSettings callSettings = null)

Incrementally update the dataset used for an examples model.

Parameters
NameDescription
requestUpdateExplanationDatasetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationUpdateExplanationDatasetResponseUpdateExplanationDatasetOperationMetadata

The RPC response.

Overrides

UpdateExplanationDatasetAsync(UpdateExplanationDatasetRequest, CallSettings)

public override Task<Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata>> UpdateExplanationDatasetAsync(UpdateExplanationDatasetRequest request, CallSettings callSettings = null)

Incrementally update the dataset used for an examples model.

Parameters
NameDescription
requestUpdateExplanationDatasetRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationUpdateExplanationDatasetResponseUpdateExplanationDatasetOperationMetadata

A Task containing the RPC response.

Overrides

UpdateModel(UpdateModelRequest, CallSettings)

public override Model UpdateModel(UpdateModelRequest request, CallSettings callSettings = null)

Updates a Model.

Parameters
NameDescription
requestUpdateModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Model

The RPC response.

Overrides

UpdateModelAsync(UpdateModelRequest, CallSettings)

public override Task<Model> UpdateModelAsync(UpdateModelRequest request, CallSettings callSettings = null)

Updates a Model.

Parameters
NameDescription
requestUpdateModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModel

A Task containing the RPC response.

Overrides

UploadModel(UploadModelRequest, CallSettings)

public override Operation<UploadModelResponse, UploadModelOperationMetadata> UploadModel(UploadModelRequest request, CallSettings callSettings = null)

Uploads a Model artifact into Vertex AI.

Parameters
NameDescription
requestUploadModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationUploadModelResponseUploadModelOperationMetadata

The RPC response.

Overrides

UploadModelAsync(UploadModelRequest, CallSettings)

public override Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> UploadModelAsync(UploadModelRequest request, CallSettings callSettings = null)

Uploads a Model artifact into Vertex AI.

Parameters
NameDescription
requestUploadModelRequest

The request object containing all of the parameters for the API call.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationUploadModelResponseUploadModelOperationMetadata

A Task containing the RPC response.

Overrides