Class ModelServiceClient (1.3.0)

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: 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)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]";
// Make the request
ModelEvaluation response = await modelServiceClient.GetModelEvaluationAsync(name);

GetModelEvaluationAsync(String, CancellationToken)

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

Gets a ModelEvaluation.

Parameters
NameDescription
nameString

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)
string name = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]";
// Make the request
ModelEvaluation response = await modelServiceClient.GetModelEvaluationAsync(name);

GetModelEvaluationSlice(GetModelEvaluationSliceRequest, CallSettings)

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

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
GetModelEvaluationSliceRequest request = new GetModelEvaluationSliceRequest
{
    ModelEvaluationSliceName = ModelEvaluationSliceName.FromProjectLocationModelEvaluationSlice("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]"),
};
// Make the request
ModelEvaluationSlice response = modelServiceClient.GetModelEvaluationSlice(request);

GetModelEvaluationSlice(ModelEvaluationSliceName, CallSettings)

public virtual ModelEvaluationSlice GetModelEvaluationSlice(ModelEvaluationSliceName name, CallSettings callSettings = null)

Gets a ModelEvaluationSlice.

Parameters
NameDescription
nameModelEvaluationSliceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ModelEvaluationSlice

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ModelEvaluationSliceName name = ModelEvaluationSliceName.FromProjectLocationModelEvaluationSlice("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]");
// Make the request
ModelEvaluationSlice response = modelServiceClient.GetModelEvaluationSlice(name);

GetModelEvaluationSlice(String, CallSettings)

public virtual ModelEvaluationSlice GetModelEvaluationSlice(string name, CallSettings callSettings = null)

Gets a ModelEvaluationSlice.

Parameters
NameDescription
nameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ModelEvaluationSlice

The RPC response.

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

GetModelEvaluationSliceAsync(GetModelEvaluationSliceRequest, CallSettings)

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

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
GetModelEvaluationSliceRequest request = new GetModelEvaluationSliceRequest
{
    ModelEvaluationSliceName = ModelEvaluationSliceName.FromProjectLocationModelEvaluationSlice("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]"),
};
// Make the request
ModelEvaluationSlice response = await modelServiceClient.GetModelEvaluationSliceAsync(request);

GetModelEvaluationSliceAsync(GetModelEvaluationSliceRequest, CancellationToken)

public virtual Task<ModelEvaluationSlice> GetModelEvaluationSliceAsync(GetModelEvaluationSliceRequest request, CancellationToken cancellationToken)

Gets a ModelEvaluationSlice.

Parameters
NameDescription
requestGetModelEvaluationSliceRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ModelEvaluationSlice>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
GetModelEvaluationSliceRequest request = new GetModelEvaluationSliceRequest
{
    ModelEvaluationSliceName = ModelEvaluationSliceName.FromProjectLocationModelEvaluationSlice("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]"),
};
// Make the request
ModelEvaluationSlice response = await modelServiceClient.GetModelEvaluationSliceAsync(request);

GetModelEvaluationSliceAsync(ModelEvaluationSliceName, CallSettings)

public virtual Task<ModelEvaluationSlice> GetModelEvaluationSliceAsync(ModelEvaluationSliceName name, CallSettings callSettings = null)

Gets a ModelEvaluationSlice.

Parameters
NameDescription
nameModelEvaluationSliceName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ModelEvaluationSlice>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelEvaluationSliceName name = ModelEvaluationSliceName.FromProjectLocationModelEvaluationSlice("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]");
// Make the request
ModelEvaluationSlice response = await modelServiceClient.GetModelEvaluationSliceAsync(name);

GetModelEvaluationSliceAsync(ModelEvaluationSliceName, CancellationToken)

public virtual Task<ModelEvaluationSlice> GetModelEvaluationSliceAsync(ModelEvaluationSliceName name, CancellationToken cancellationToken)

Gets a ModelEvaluationSlice.

Parameters
NameDescription
nameModelEvaluationSliceName

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ModelEvaluationSlice>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelEvaluationSliceName name = ModelEvaluationSliceName.FromProjectLocationModelEvaluationSlice("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]");
// Make the request
ModelEvaluationSlice response = await modelServiceClient.GetModelEvaluationSliceAsync(name);

GetModelEvaluationSliceAsync(String, CallSettings)

public virtual Task<ModelEvaluationSlice> GetModelEvaluationSliceAsync(string name, CallSettings callSettings = null)

Gets a ModelEvaluationSlice.

Parameters
NameDescription
nameString

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<ModelEvaluationSlice>

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]/evaluations/[EVALUATION]/slices/[SLICE]";
// Make the request
ModelEvaluationSlice response = await modelServiceClient.GetModelEvaluationSliceAsync(name);

GetModelEvaluationSliceAsync(String, CancellationToken)

public virtual Task<ModelEvaluationSlice> GetModelEvaluationSliceAsync(string name, CancellationToken cancellationToken)

Gets a ModelEvaluationSlice.

Parameters
NameDescription
nameString

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<ModelEvaluationSlice>

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]/evaluations/[EVALUATION]/slices/[SLICE]";
// Make the request
ModelEvaluationSlice response = await modelServiceClient.GetModelEvaluationSliceAsync(name);

ListModelEvaluations(ListModelEvaluationsRequest, CallSettings)

public virtual 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
PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation>

A pageable sequence of ModelEvaluation resources.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ListModelEvaluationsRequest request = new ListModelEvaluationsRequest
{
    ParentAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
    Filter = "",
    ReadMask = new FieldMask(),
};
// Make the request
PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> response = modelServiceClient.ListModelEvaluations(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (ModelEvaluation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListModelEvaluationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ModelEvaluation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelEvaluations(ModelName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluations(ModelName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists ModelEvaluations in a Model.

Parameters
NameDescription
parentModelName

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

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation>

A pageable sequence of ModelEvaluation resources.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ModelName parent = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> response = modelServiceClient.ListModelEvaluations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (ModelEvaluation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListModelEvaluationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ModelEvaluation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelEvaluations(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluations(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists ModelEvaluations in a Model.

Parameters
NameDescription
parentString

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

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation>

A pageable sequence of ModelEvaluation resources.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> response = modelServiceClient.ListModelEvaluations(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (ModelEvaluation item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListModelEvaluationsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ModelEvaluation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluation> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelEvaluationsAsync(ListModelEvaluationsRequest, CallSettings)

public virtual 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
PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation>

A pageable asynchronous sequence of ModelEvaluation resources.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ListModelEvaluationsRequest request = new ListModelEvaluationsRequest
{
    ParentAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
    Filter = "",
    ReadMask = new FieldMask(),
};
// Make the request
PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> response = modelServiceClient.ListModelEvaluationsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ModelEvaluation item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListModelEvaluationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ModelEvaluation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelEvaluationsAsync(ModelName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluationsAsync(ModelName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists ModelEvaluations in a Model.

Parameters
NameDescription
parentModelName

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

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation>

A pageable asynchronous sequence of ModelEvaluation resources.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelName parent = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> response = modelServiceClient.ListModelEvaluationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ModelEvaluation item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListModelEvaluationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ModelEvaluation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelEvaluationsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluationsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists ModelEvaluations in a Model.

Parameters
NameDescription
parentString

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

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation>

A pageable asynchronous sequence of ModelEvaluation resources.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> response = modelServiceClient.ListModelEvaluationsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ModelEvaluation item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListModelEvaluationsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ModelEvaluation item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluation item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelEvaluationSlices(ListModelEvaluationSlicesRequest, CallSettings)

public virtual 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
PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice>

A pageable sequence of ModelEvaluationSlice resources.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ListModelEvaluationSlicesRequest request = new ListModelEvaluationSlicesRequest
{
    ParentAsModelEvaluationName = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"),
    Filter = "",
    ReadMask = new FieldMask(),
};
// Make the request
PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> response = modelServiceClient.ListModelEvaluationSlices(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (ModelEvaluationSlice item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListModelEvaluationSlicesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ModelEvaluationSlice item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluationSlice> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluationSlice item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelEvaluationSlices(ModelEvaluationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlices(ModelEvaluationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists ModelEvaluationSlices in a ModelEvaluation.

Parameters
NameDescription
parentModelEvaluationName

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

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice>

A pageable sequence of ModelEvaluationSlice resources.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ModelEvaluationName parent = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
// Make the request
PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> response = modelServiceClient.ListModelEvaluationSlices(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (ModelEvaluationSlice item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListModelEvaluationSlicesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ModelEvaluationSlice item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluationSlice> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluationSlice item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelEvaluationSlices(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlices(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists ModelEvaluationSlices in a ModelEvaluation.

Parameters
NameDescription
parentString

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

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice>

A pageable sequence of ModelEvaluationSlice resources.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]";
// Make the request
PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> response = modelServiceClient.ListModelEvaluationSlices(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (ModelEvaluationSlice item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListModelEvaluationSlicesResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ModelEvaluationSlice item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluationSlice> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluationSlice item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelEvaluationSlicesAsync(ListModelEvaluationSlicesRequest, CallSettings)

public virtual 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
PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice>

A pageable asynchronous sequence of ModelEvaluationSlice resources.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ListModelEvaluationSlicesRequest request = new ListModelEvaluationSlicesRequest
{
    ParentAsModelEvaluationName = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"),
    Filter = "",
    ReadMask = new FieldMask(),
};
// Make the request
PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> response = modelServiceClient.ListModelEvaluationSlicesAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ModelEvaluationSlice item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListModelEvaluationSlicesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ModelEvaluationSlice item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluationSlice> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluationSlice item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelEvaluationSlicesAsync(ModelEvaluationName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlicesAsync(ModelEvaluationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists ModelEvaluationSlices in a ModelEvaluation.

Parameters
NameDescription
parentModelEvaluationName

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

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice>

A pageable asynchronous sequence of ModelEvaluationSlice resources.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelEvaluationName parent = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
// Make the request
PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> response = modelServiceClient.ListModelEvaluationSlicesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ModelEvaluationSlice item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListModelEvaluationSlicesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ModelEvaluationSlice item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluationSlice> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluationSlice item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelEvaluationSlicesAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlicesAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists ModelEvaluationSlices in a ModelEvaluation.

Parameters
NameDescription
parentString

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

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice>

A pageable asynchronous sequence of ModelEvaluationSlice resources.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]";
// Make the request
PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> response = modelServiceClient.ListModelEvaluationSlicesAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ModelEvaluationSlice item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListModelEvaluationSlicesResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (ModelEvaluationSlice item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluationSlice> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluationSlice item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModels(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListModelsResponse, Model> ListModels(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists Models in a Location.

Parameters
NameDescription
parentLocationName

Required. The resource name of the Location to list the Models from. Format: projects/{project}/locations/{location}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListModelsResponse, Model>

A pageable sequence of Model resources.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedEnumerable<ListModelsResponse, Model> response = modelServiceClient.ListModels(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Model item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListModelsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Model item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Model> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Model item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModels(ListModelsRequest, CallSettings)

public virtual 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
PagedEnumerable<ListModelsResponse, Model>

A pageable sequence of Model resources.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ListModelsRequest request = new ListModelsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    ReadMask = new FieldMask(),
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListModelsResponse, Model> response = modelServiceClient.ListModels(request);

// Iterate over all response items, lazily performing RPCs as required
foreach (Model item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListModelsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Model item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Model> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Model item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModels(String, String, Nullable<Int32>, CallSettings)

public virtual PagedEnumerable<ListModelsResponse, Model> ListModels(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists Models in a Location.

Parameters
NameDescription
parentString

Required. The resource name of the Location to list the Models from. Format: projects/{project}/locations/{location}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerable<ListModelsResponse, Model>

A pageable sequence of Model resources.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedEnumerable<ListModelsResponse, Model> response = modelServiceClient.ListModels(parent);

// Iterate over all response items, lazily performing RPCs as required
foreach (Model item in response)
{
    // Do something with each item
    Console.WriteLine(item);
}

// Or iterate over pages (of server-defined size), performing one RPC per page
foreach (ListModelsResponse page in response.AsRawResponses())
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Model item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
}

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Model> singlePage = response.ReadPage(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Model item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelsAsync(LocationName, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListModelsResponse, Model> ListModelsAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists Models in a Location.

Parameters
NameDescription
parentLocationName

Required. The resource name of the Location to list the Models from. Format: projects/{project}/locations/{location}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListModelsResponse, Model>

A pageable asynchronous sequence of Model resources.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
// Make the request
PagedAsyncEnumerable<ListModelsResponse, Model> response = modelServiceClient.ListModelsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Model item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListModelsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Model item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Model> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Model item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelsAsync(ListModelsRequest, CallSettings)

public virtual 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
PagedAsyncEnumerable<ListModelsResponse, Model>

A pageable asynchronous sequence of Model resources.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ListModelsRequest request = new ListModelsRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Filter = "",
    ReadMask = new FieldMask(),
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListModelsResponse, Model> response = modelServiceClient.ListModelsAsync(request);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Model item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListModelsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Model item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Model> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Model item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

ListModelsAsync(String, String, Nullable<Int32>, CallSettings)

public virtual PagedAsyncEnumerable<ListModelsResponse, Model> ListModelsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)

Lists Models in a Location.

Parameters
NameDescription
parentString

Required. The resource name of the Location to list the Models from. Format: projects/{project}/locations/{location}

pageTokenString

The token returned from the previous request. A value of null or an empty string retrieves the first page.

pageSizeNullable<Int32>

The size of page to request. The response will not be larger than this, but may be smaller. A value of null or 0 uses a server-defined page size.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerable<ListModelsResponse, Model>

A pageable asynchronous sequence of Model resources.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
// Make the request
PagedAsyncEnumerable<ListModelsResponse, Model> response = modelServiceClient.ListModelsAsync(parent);

// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((Model item) =>
{
    // Do something with each item
    Console.WriteLine(item);
});

// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListModelsResponse page) =>
{
    // Do something with each page of items
    Console.WriteLine("A page of results:");
    foreach (Model item in page)
    {
        // Do something with each item
        Console.WriteLine(item);
    }
});

// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<Model> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (Model item in singlePage)
{
    // Do something with each item
    Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;

PollOnceDeleteModel(String, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> PollOnceDeleteModel(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of DeleteModel.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<Empty, DeleteOperationMetadata>

The result of polling the operation.

PollOnceDeleteModelAsync(String, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> PollOnceDeleteModelAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of DeleteModel.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<Empty, DeleteOperationMetadata>>

A task representing the result of polling the operation.

PollOnceExportModel(String, CallSettings)

public virtual Operation<ExportModelResponse, ExportModelOperationMetadata> PollOnceExportModel(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of ExportModel.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<ExportModelResponse, ExportModelOperationMetadata>

The result of polling the operation.

PollOnceExportModelAsync(String, CallSettings)

public virtual Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> PollOnceExportModelAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of ExportModel.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>>

A task representing the result of polling the operation.

PollOnceUploadModel(String, CallSettings)

public virtual Operation<UploadModelResponse, UploadModelOperationMetadata> PollOnceUploadModel(string operationName, CallSettings callSettings = null)

Poll an operation once, using an operationName from a previous invocation of UploadModel.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<UploadModelResponse, UploadModelOperationMetadata>

The result of polling the operation.

PollOnceUploadModelAsync(String, CallSettings)

public virtual Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> PollOnceUploadModelAsync(string operationName, CallSettings callSettings = null)

Asynchronously poll an operation once, using an operationName from a previous invocation of UploadModel.

Parameters
NameDescription
operationNameString

The name of a previously invoked operation. Must not be null or empty.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>>

A task representing the result of polling the operation.

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.

UpdateModel(Model, FieldMask, CallSettings)

public virtual Model UpdateModel(Model model, FieldMask updateMask, CallSettings callSettings = null)

Updates a Model.

Parameters
NameDescription
modelModel

Required. The Model which replaces the resource on the server.

updateMaskFieldMask

Required. The update mask applies to the resource. For the FieldMask definition, see [google.protobuf.FieldMask][google.protobuf.FieldMask].

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)
Model model = new Model();
FieldMask updateMask = new FieldMask();
// Make the request
Model response = modelServiceClient.UpdateModel(model, updateMask);

UpdateModel(UpdateModelRequest, CallSettings)

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

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
UpdateModelRequest request = new UpdateModelRequest
{
    Model = new Model(),
    UpdateMask = new FieldMask(),
};
// Make the request
Model response = modelServiceClient.UpdateModel(request);

UpdateModelAsync(Model, FieldMask, CallSettings)

public virtual Task<Model> UpdateModelAsync(Model model, FieldMask updateMask, CallSettings callSettings = null)

Updates a Model.

Parameters
NameDescription
modelModel

Required. The Model which replaces the resource on the server.

updateMaskFieldMask

Required. The update mask applies to the resource. For the FieldMask definition, see [google.protobuf.FieldMask][google.protobuf.FieldMask].

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)
Model model = new Model();
FieldMask updateMask = new FieldMask();
// Make the request
Model response = await modelServiceClient.UpdateModelAsync(model, updateMask);

UpdateModelAsync(Model, FieldMask, CancellationToken)

public virtual Task<Model> UpdateModelAsync(Model model, FieldMask updateMask, CancellationToken cancellationToken)

Updates a Model.

Parameters
NameDescription
modelModel

Required. The Model which replaces the resource on the server.

updateMaskFieldMask

Required. The update mask applies to the resource. For the FieldMask definition, see [google.protobuf.FieldMask][google.protobuf.FieldMask].

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)
Model model = new Model();
FieldMask updateMask = new FieldMask();
// Make the request
Model response = await modelServiceClient.UpdateModelAsync(model, updateMask);

UpdateModelAsync(UpdateModelRequest, CallSettings)

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

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateModelRequest request = new UpdateModelRequest
{
    Model = new Model(),
    UpdateMask = new FieldMask(),
};
// Make the request
Model response = await modelServiceClient.UpdateModelAsync(request);

UpdateModelAsync(UpdateModelRequest, CancellationToken)

public virtual Task<Model> UpdateModelAsync(UpdateModelRequest request, CancellationToken cancellationToken)

Updates a Model.

Parameters
NameDescription
requestUpdateModelRequest

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)
UpdateModelRequest request = new UpdateModelRequest
{
    Model = new Model(),
    UpdateMask = new FieldMask(),
};
// Make the request
Model response = await modelServiceClient.UpdateModelAsync(request);

UploadModel(LocationName, Model, CallSettings)

public virtual Operation<UploadModelResponse, UploadModelOperationMetadata> UploadModel(LocationName parent, Model model, CallSettings callSettings = null)

Uploads a Model artifact into Vertex AI.

Parameters
NameDescription
parentLocationName

Required. The resource name of the Location into which to upload the Model. Format: projects/{project}/locations/{location}

modelModel

Required. The Model to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<UploadModelResponse, UploadModelOperationMetadata>

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Model model = new Model();
// Make the request
Operation<UploadModelResponse, UploadModelOperationMetadata> response = modelServiceClient.UploadModel(parent, model);

// Poll until the returned long-running operation is complete
Operation<UploadModelResponse, UploadModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
UploadModelResponse 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<UploadModelResponse, UploadModelOperationMetadata> retrievedResponse = modelServiceClient.PollOnceUploadModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UploadModelResponse retrievedResult = retrievedResponse.Result;
}

UploadModel(UploadModelRequest, CallSettings)

public virtual 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
Operation<UploadModelResponse, UploadModelOperationMetadata>

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
UploadModelRequest request = new UploadModelRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Model = new Model(),
};
// Make the request
Operation<UploadModelResponse, UploadModelOperationMetadata> response = modelServiceClient.UploadModel(request);

// Poll until the returned long-running operation is complete
Operation<UploadModelResponse, UploadModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
UploadModelResponse 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<UploadModelResponse, UploadModelOperationMetadata> retrievedResponse = modelServiceClient.PollOnceUploadModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UploadModelResponse retrievedResult = retrievedResponse.Result;
}

UploadModel(String, Model, CallSettings)

public virtual Operation<UploadModelResponse, UploadModelOperationMetadata> UploadModel(string parent, Model model, CallSettings callSettings = null)

Uploads a Model artifact into Vertex AI.

Parameters
NameDescription
parentString

Required. The resource name of the Location into which to upload the Model. Format: projects/{project}/locations/{location}

modelModel

Required. The Model to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Operation<UploadModelResponse, UploadModelOperationMetadata>

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Model model = new Model();
// Make the request
Operation<UploadModelResponse, UploadModelOperationMetadata> response = modelServiceClient.UploadModel(parent, model);

// Poll until the returned long-running operation is complete
Operation<UploadModelResponse, UploadModelOperationMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
UploadModelResponse 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<UploadModelResponse, UploadModelOperationMetadata> retrievedResponse = modelServiceClient.PollOnceUploadModel(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UploadModelResponse retrievedResult = retrievedResponse.Result;
}

UploadModelAsync(LocationName, Model, CallSettings)

public virtual Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> UploadModelAsync(LocationName parent, Model model, CallSettings callSettings = null)

Uploads a Model artifact into Vertex AI.

Parameters
NameDescription
parentLocationName

Required. The resource name of the Location into which to upload the Model. Format: projects/{project}/locations/{location}

modelModel

Required. The Model to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Model model = new Model();
// Make the request
Operation<UploadModelResponse, UploadModelOperationMetadata> response = await modelServiceClient.UploadModelAsync(parent, model);

// Poll until the returned long-running operation is complete
Operation<UploadModelResponse, UploadModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UploadModelResponse 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<UploadModelResponse, UploadModelOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceUploadModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UploadModelResponse retrievedResult = retrievedResponse.Result;
}

UploadModelAsync(LocationName, Model, CancellationToken)

public virtual Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> UploadModelAsync(LocationName parent, Model model, CancellationToken cancellationToken)

Uploads a Model artifact into Vertex AI.

Parameters
NameDescription
parentLocationName

Required. The resource name of the Location into which to upload the Model. Format: projects/{project}/locations/{location}

modelModel

Required. The Model to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
Model model = new Model();
// Make the request
Operation<UploadModelResponse, UploadModelOperationMetadata> response = await modelServiceClient.UploadModelAsync(parent, model);

// Poll until the returned long-running operation is complete
Operation<UploadModelResponse, UploadModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UploadModelResponse 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<UploadModelResponse, UploadModelOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceUploadModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UploadModelResponse retrievedResult = retrievedResponse.Result;
}

UploadModelAsync(UploadModelRequest, CallSettings)

public virtual 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
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
UploadModelRequest request = new UploadModelRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Model = new Model(),
};
// Make the request
Operation<UploadModelResponse, UploadModelOperationMetadata> response = await modelServiceClient.UploadModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<UploadModelResponse, UploadModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UploadModelResponse 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<UploadModelResponse, UploadModelOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceUploadModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UploadModelResponse retrievedResult = retrievedResponse.Result;
}

UploadModelAsync(UploadModelRequest, CancellationToken)

public virtual Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> UploadModelAsync(UploadModelRequest request, CancellationToken cancellationToken)

Uploads a Model artifact into Vertex AI.

Parameters
NameDescription
requestUploadModelRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
UploadModelRequest request = new UploadModelRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Model = new Model(),
};
// Make the request
Operation<UploadModelResponse, UploadModelOperationMetadata> response = await modelServiceClient.UploadModelAsync(request);

// Poll until the returned long-running operation is complete
Operation<UploadModelResponse, UploadModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UploadModelResponse 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<UploadModelResponse, UploadModelOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceUploadModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UploadModelResponse retrievedResult = retrievedResponse.Result;
}

UploadModelAsync(String, Model, CallSettings)

public virtual Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> UploadModelAsync(string parent, Model model, CallSettings callSettings = null)

Uploads a Model artifact into Vertex AI.

Parameters
NameDescription
parentString

Required. The resource name of the Location into which to upload the Model. Format: projects/{project}/locations/{location}

modelModel

Required. The Model to create.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Model model = new Model();
// Make the request
Operation<UploadModelResponse, UploadModelOperationMetadata> response = await modelServiceClient.UploadModelAsync(parent, model);

// Poll until the returned long-running operation is complete
Operation<UploadModelResponse, UploadModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UploadModelResponse 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<UploadModelResponse, UploadModelOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceUploadModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UploadModelResponse retrievedResult = retrievedResponse.Result;
}

UploadModelAsync(String, Model, CancellationToken)

public virtual Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> UploadModelAsync(string parent, Model model, CancellationToken cancellationToken)

Uploads a Model artifact into Vertex AI.

Parameters
NameDescription
parentString

Required. The resource name of the Location into which to upload the Model. Format: projects/{project}/locations/{location}

modelModel

Required. The Model to create.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>>

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
Model model = new Model();
// Make the request
Operation<UploadModelResponse, UploadModelOperationMetadata> response = await modelServiceClient.UploadModelAsync(parent, model);

// Poll until the returned long-running operation is complete
Operation<UploadModelResponse, UploadModelOperationMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
UploadModelResponse 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<UploadModelResponse, UploadModelOperationMetadata> retrievedResponse = await modelServiceClient.PollOnceUploadModelAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
    // If it has completed, then access the result
    UploadModelResponse retrievedResult = retrievedResponse.Result;
}