Class ModelServiceClient

public abstract class ModelServiceClient

ModelService client wrapper, for convenient use.

Inheritance

Object > ModelServiceClient

Derived Types

Namespace

Google.Cloud.AIPlatform.V1

Assembly

Google.Cloud.AIPlatform.V1.dll

Remarks

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

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the ModelService service, which is a host of "aiplatform.googleapis.com" and a port of 443.

Property Value
TypeDescription
String

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default ModelService scopes.

Property Value
TypeDescription
IReadOnlyList<String>
Remarks

The default ModelService scopes are:

DeleteModelOperationsClient

public virtual OperationsClient DeleteModelOperationsClient { get; }

The long-running operations client for DeleteModel.

Property Value
TypeDescription
OperationsClient

ExportModelOperationsClient

public virtual OperationsClient ExportModelOperationsClient { get; }

The long-running operations client for ExportModel.

Property Value
TypeDescription
OperationsClient

GrpcClient

public virtual ModelService.ModelServiceClient GrpcClient { get; }

The underlying gRPC ModelService client

Property Value
TypeDescription
ModelService.ModelServiceClient

UploadModelOperationsClient

public virtual OperationsClient UploadModelOperationsClient { get; }

The long-running operations client for UploadModel.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static ModelServiceClient Create()

Synchronously creates a ModelServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ModelServiceClientBuilder.

Returns
TypeDescription
ModelServiceClient

The created ModelServiceClient.

CreateAsync(CancellationToken)

public static Task<ModelServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))

Asynchronously creates a ModelServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ModelServiceClientBuilder.

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
Task<ModelServiceClient>

The task representing the created ModelServiceClient.

DeleteModel(DeleteModelRequest, CallSettings)

public virtual 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
Operation<Empty, DeleteOperationMetadata>

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
DeleteModelRequest request = new DeleteModelRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = modelServiceClient.DeleteModel(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = modelServiceClient.PollOnceDeleteModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteModel(ModelName, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteModel(ModelName name, 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
nameModelName

Required. The name of the Model resource to be deleted. Format: projects/{project}/locations/{location}/models/{model}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeleteOperationMetadata>

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = modelServiceClient.DeleteModel(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = modelServiceClient.PollOnceDeleteModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteModel(String, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteModel(string name, 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
nameString

Required. The name of the Model resource to be deleted. Format: projects/{project}/locations/{location}/models/{model}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeleteOperationMetadata>

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = modelServiceClient.DeleteModel(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = modelServiceClient.PollOnceDeleteModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteModelAsync(DeleteModelRequest, CallSettings)

public virtual 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
Task<Operation<Empty, DeleteOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteModelRequest request = new DeleteModelRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await modelServiceClient.DeleteModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceDeleteModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteModelAsync(DeleteModelRequest, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteModelAsync(DeleteModelRequest request, CancellationToken cancellationToken)

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, DeleteOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteModelRequest request = new DeleteModelRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await modelServiceClient.DeleteModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceDeleteModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteModelAsync(ModelName, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteModelAsync(ModelName name, 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
nameModelName

Required. The name of the Model resource to be deleted. Format: projects/{project}/locations/{location}/models/{model}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeleteOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await modelServiceClient.DeleteModelAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceDeleteModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteModelAsync(ModelName, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteModelAsync(ModelName name, CancellationToken cancellationToken)

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
nameModelName

Required. The name of the Model resource to be deleted. Format: projects/{project}/locations/{location}/models/{model}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, DeleteOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await modelServiceClient.DeleteModelAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceDeleteModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteModelAsync(String, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteModelAsync(string name, 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
nameString

Required. The name of the Model resource to be deleted. Format: projects/{project}/locations/{location}/models/{model}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeleteOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await modelServiceClient.DeleteModelAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceDeleteModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

DeleteModelAsync(String, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteModelAsync(string name, CancellationToken cancellationToken)

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
nameString

Required. The name of the Model resource to be deleted. Format: projects/{project}/locations/{location}/models/{model}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<Empty, DeleteOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await modelServiceClient.DeleteModelAsync(name);

// Poll until the returned long-running operation is complete
Operation<Empty, DeleteOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
Empty result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<Empty, DeleteOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceDeleteModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    Empty retrievedResult = retrievedResponse.Result;
}

ExportModel(ExportModelRequest, CallSettings)

public virtual 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
Operation<ExportModelResponse, ExportModelOperationMetadata>

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ExportModelRequest request = new ExportModelRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
    OutputConfig = new ExportModelRequest.Types.OutputConfig(),
};
// Make the request
Operation<ExportModelResponse, ExportModelOperationMetadata> response = modelServiceClient.ExportModel(request);

// Poll until the returned long-running operation is complete
Operation<ExportModelResponse, ExportModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ExportModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ExportModelResponse, ExportModelOperationMetadata> retrievedResponse = modelServiceClient.PollOnceExportModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportModelResponse retrievedResult = retrievedResponse.Result;
}

ExportModel(ModelName, ExportModelRequest.Types.OutputConfig, CallSettings)

public virtual Operation<ExportModelResponse, ExportModelOperationMetadata> ExportModel(ModelName name, ExportModelRequest.Types.OutputConfig outputConfig, 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
nameModelName

Required. The resource name of the Model to export.

outputConfigExportModelRequest.Types.OutputConfig

Required. The desired output location and configuration.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ExportModelResponse, ExportModelOperationMetadata>

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
ExportModelRequest.Types.OutputConfig outputConfig = new ExportModelRequest.Types.OutputConfig();
// Make the request
Operation<ExportModelResponse, ExportModelOperationMetadata> response = modelServiceClient.ExportModel(name, outputConfig);

// Poll until the returned long-running operation is complete
Operation<ExportModelResponse, ExportModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ExportModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ExportModelResponse, ExportModelOperationMetadata> retrievedResponse = modelServiceClient.PollOnceExportModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportModelResponse retrievedResult = retrievedResponse.Result;
}

ExportModel(String, ExportModelRequest.Types.OutputConfig, CallSettings)

public virtual Operation<ExportModelResponse, ExportModelOperationMetadata> ExportModel(string name, ExportModelRequest.Types.OutputConfig outputConfig, 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
nameString

Required. The resource name of the Model to export.

outputConfigExportModelRequest.Types.OutputConfig

Required. The desired output location and configuration.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ExportModelResponse, ExportModelOperationMetadata>

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
ExportModelRequest.Types.OutputConfig outputConfig = new ExportModelRequest.Types.OutputConfig();
// Make the request
Operation<ExportModelResponse, ExportModelOperationMetadata> response = modelServiceClient.ExportModel(name, outputConfig);

// Poll until the returned long-running operation is complete
Operation<ExportModelResponse, ExportModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ExportModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ExportModelResponse, ExportModelOperationMetadata> retrievedResponse = modelServiceClient.PollOnceExportModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportModelResponse retrievedResult = retrievedResponse.Result;
}

ExportModelAsync(ExportModelRequest, CallSettings)

public virtual 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
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ExportModelRequest request = new ExportModelRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
    OutputConfig = new ExportModelRequest.Types.OutputConfig(),
};
// Make the request
Operation<ExportModelResponse, ExportModelOperationMetadata> response = await modelServiceClient.ExportModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<ExportModelResponse, ExportModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ExportModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ExportModelResponse, ExportModelOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceExportModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportModelResponse retrievedResult = retrievedResponse.Result;
}

ExportModelAsync(ExportModelRequest, CancellationToken)

public virtual Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> ExportModelAsync(ExportModelRequest request, CancellationToken cancellationToken)

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.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ExportModelRequest request = new ExportModelRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
    OutputConfig = new ExportModelRequest.Types.OutputConfig(),
};
// Make the request
Operation<ExportModelResponse, ExportModelOperationMetadata> response = await modelServiceClient.ExportModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<ExportModelResponse, ExportModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ExportModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ExportModelResponse, ExportModelOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceExportModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportModelResponse retrievedResult = retrievedResponse.Result;
}

ExportModelAsync(ModelName, ExportModelRequest.Types.OutputConfig, CallSettings)

public virtual Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> ExportModelAsync(ModelName name, ExportModelRequest.Types.OutputConfig outputConfig, 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
nameModelName

Required. The resource name of the Model to export.

outputConfigExportModelRequest.Types.OutputConfig

Required. The desired output location and configuration.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
ExportModelRequest.Types.OutputConfig outputConfig = new ExportModelRequest.Types.OutputConfig();
// Make the request
Operation<ExportModelResponse, ExportModelOperationMetadata> response = await modelServiceClient.ExportModelAsync(name, outputConfig);

// Poll until the returned long-running operation is complete
Operation<ExportModelResponse, ExportModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ExportModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ExportModelResponse, ExportModelOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceExportModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportModelResponse retrievedResult = retrievedResponse.Result;
}

ExportModelAsync(ModelName, ExportModelRequest.Types.OutputConfig, CancellationToken)

public virtual Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> ExportModelAsync(ModelName name, ExportModelRequest.Types.OutputConfig outputConfig, CancellationToken cancellationToken)

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
nameModelName

Required. The resource name of the Model to export.

outputConfigExportModelRequest.Types.OutputConfig

Required. The desired output location and configuration.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
ExportModelRequest.Types.OutputConfig outputConfig = new ExportModelRequest.Types.OutputConfig();
// Make the request
Operation<ExportModelResponse, ExportModelOperationMetadata> response = await modelServiceClient.ExportModelAsync(name, outputConfig);

// Poll until the returned long-running operation is complete
Operation<ExportModelResponse, ExportModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ExportModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ExportModelResponse, ExportModelOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceExportModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportModelResponse retrievedResult = retrievedResponse.Result;
}

ExportModelAsync(String, ExportModelRequest.Types.OutputConfig, CallSettings)

public virtual Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> ExportModelAsync(string name, ExportModelRequest.Types.OutputConfig outputConfig, 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
nameString

Required. The resource name of the Model to export.

outputConfigExportModelRequest.Types.OutputConfig

Required. The desired output location and configuration.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
ExportModelRequest.Types.OutputConfig outputConfig = new ExportModelRequest.Types.OutputConfig();
// Make the request
Operation<ExportModelResponse, ExportModelOperationMetadata> response = await modelServiceClient.ExportModelAsync(name, outputConfig);

// Poll until the returned long-running operation is complete
Operation<ExportModelResponse, ExportModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ExportModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ExportModelResponse, ExportModelOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceExportModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportModelResponse retrievedResult = retrievedResponse.Result;
}

ExportModelAsync(String, ExportModelRequest.Types.OutputConfig, CancellationToken)

public virtual Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> ExportModelAsync(string name, ExportModelRequest.Types.OutputConfig outputConfig, CancellationToken cancellationToken)

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
nameString

Required. The resource name of the Model to export.

outputConfigExportModelRequest.Types.OutputConfig

Required. The desired output location and configuration.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
ExportModelRequest.Types.OutputConfig outputConfig = new ExportModelRequest.Types.OutputConfig();
// Make the request
Operation<ExportModelResponse, ExportModelOperationMetadata> response = await modelServiceClient.ExportModelAsync(name, outputConfig);

// Poll until the returned long-running operation is complete
Operation<ExportModelResponse, ExportModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ExportModelResponse result = completedResponse.Result;

// Or get the name of the operation
string operationName = response.Name;
// This name can be stored, then the long-running operation retrieved later by name
Operation<ExportModelResponse, ExportModelOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceExportModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    ExportModelResponse retrievedResult = retrievedResponse.Result;
}

GetModel(GetModelRequest, CallSettings)

public virtual 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.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
GetModelRequest request = new GetModelRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Model response = modelServiceClient.GetModel(request);

GetModel(ModelName, CallSettings)

public virtual Model GetModel(ModelName name, CallSettings callSettings = null)

Gets a Model.

Parameters
NameDescription
nameModelName

Required. The name of the Model resource. Format: projects/{project}/locations/{location}/models/{model}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Model

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Model response = modelServiceClient.GetModel(name);

GetModel(String, CallSettings)

public virtual Model GetModel(string name, CallSettings callSettings = null)

Gets a Model.

Parameters
NameDescription
nameString

Required. The name of the Model resource. Format: projects/{project}/locations/{location}/models/{model}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Model

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Model response = modelServiceClient.GetModel(name);

GetModelAsync(GetModelRequest, CallSettings)

public virtual 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
Task<Model>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
GetModelRequest request = new GetModelRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Model response = await modelServiceClient.GetModelAsync(request);

GetModelAsync(GetModelRequest, CancellationToken)

public virtual Task<Model> GetModelAsync(GetModelRequest request, CancellationToken cancellationToken)

Gets a Model.

Parameters
NameDescription
requestGetModelRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Model>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
GetModelRequest request = new GetModelRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Model response = await modelServiceClient.GetModelAsync(request);

GetModelAsync(ModelName, CallSettings)

public virtual Task<Model> GetModelAsync(ModelName name, CallSettings callSettings = null)

Gets a Model.

Parameters
NameDescription
nameModelName

Required. The name of the Model resource. Format: projects/{project}/locations/{location}/models/{model}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Model>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Model response = await modelServiceClient.GetModelAsync(name);

GetModelAsync(ModelName, CancellationToken)

public virtual Task<Model> GetModelAsync(ModelName name, CancellationToken cancellationToken)

Gets a Model.

Parameters
NameDescription
nameModelName

Required. The name of the Model resource. Format: projects/{project}/locations/{location}/models/{model}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Model>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelName name = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Model response = await modelServiceClient.GetModelAsync(name);

GetModelAsync(String, CallSettings)

public virtual Task<Model> GetModelAsync(string name, CallSettings callSettings = null)

Gets a Model.

Parameters
NameDescription
nameString

Required. The name of the Model resource. Format: projects/{project}/locations/{location}/models/{model}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Model>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Model response = await modelServiceClient.GetModelAsync(name);

GetModelAsync(String, CancellationToken)

public virtual Task<Model> GetModelAsync(string name, CancellationToken cancellationToken)

Gets a Model.

Parameters
NameDescription
nameString

Required. The name of the Model resource. Format: projects/{project}/locations/{location}/models/{model}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Model>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Model response = await modelServiceClient.GetModelAsync(name);

GetModelEvaluation(GetModelEvaluationRequest, CallSettings)

public virtual 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.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
GetModelEvaluationRequest request = new GetModelEvaluationRequest
{
    ModelEvaluationName = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"),
};
// Make the request
ModelEvaluation response = modelServiceClient.GetModelEvaluation(request);

GetModelEvaluation(ModelEvaluationName, CallSettings)

public virtual ModelEvaluation GetModelEvaluation(ModelEvaluationName name, CallSettings callSettings = null)

Gets a ModelEvaluation.

Parameters
NameDescription
nameModelEvaluationName

Required. The name of the ModelEvaluation resource. Format: projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ModelEvaluation

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ModelEvaluationName name = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
// Make the request
ModelEvaluation response = modelServiceClient.GetModelEvaluation(name);

GetModelEvaluation(String, CallSettings)

public virtual ModelEvaluation GetModelEvaluation(string name, CallSettings callSettings = null)

Gets a ModelEvaluation.

Parameters
NameDescription
nameString

Required. The name of the ModelEvaluation resource. Format: projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ModelEvaluation

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]";
// Make the request
ModelEvaluation response = modelServiceClient.GetModelEvaluation(name);

GetModelEvaluationAsync(GetModelEvaluationRequest, CallSettings)

public virtual 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
Task<ModelEvaluation>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
GetModelEvaluationRequest request = new GetModelEvaluationRequest
{
    ModelEvaluationName = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"),
};
// Make the request
ModelEvaluation response = await modelServiceClient.GetModelEvaluationAsync(request);

GetModelEvaluationAsync(GetModelEvaluationRequest, CancellationToken)

public virtual Task<ModelEvaluation> GetModelEvaluationAsync(GetModelEvaluationRequest request, CancellationToken cancellationToken)

Gets a ModelEvaluation.

Parameters
NameDescription
requestGetModelEvaluationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ModelEvaluation>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
GetModelEvaluationRequest request = new GetModelEvaluationRequest
{
    ModelEvaluationName = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"),
};
// Make the request
ModelEvaluation response = await modelServiceClient.GetModelEvaluationAsync(request);

GetModelEvaluationAsync(ModelEvaluationName, CallSettings)

public virtual Task<ModelEvaluation> GetModelEvaluationAsync(ModelEvaluationName name, CallSettings callSettings = null)

Gets a ModelEvaluation.

Parameters
NameDescription
nameModelEvaluationName

Required. The name of the ModelEvaluation resource. Format: projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ModelEvaluation>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelEvaluationName name = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
// Make the request
ModelEvaluation response = await modelServiceClient.GetModelEvaluationAsync(name);

GetModelEvaluationAsync(ModelEvaluationName, CancellationToken)

public virtual Task<ModelEvaluation> GetModelEvaluationAsync(ModelEvaluationName name, CancellationToken cancellationToken)

Gets a ModelEvaluation.

Parameters
NameDescription
nameModelEvaluationName

Required. The name of the ModelEvaluation resource. Format: projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ModelEvaluation>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelEvaluationName name = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
// Make the request
ModelEvaluation response = await modelServiceClient.GetModelEvaluationAsync(name);

GetModelEvaluationAsync(String, CallSettings)

public virtual Task<ModelEvaluation> GetModelEvaluationAsync(string name, CallSettings callSettings = null)

Gets a ModelEvaluation.

Parameters
NameDescription
nameString

Required. The name of the ModelEvaluation resource. Format: <