Cloud AI Platform v1 API - Class ModelServiceClient (2.20.0)

public abstract class ModelServiceClient

Reference documentation and code samples for the Cloud AI Platform v1 API 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

CopyModelOperationsClient

public virtual OperationsClient CopyModelOperationsClient { get; }

The long-running operations client for CopyModel.

Property Value
TypeDescription
OperationsClient

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
IReadOnlyListstring
Remarks

The default ModelService scopes are:

DeleteModelOperationsClient

public virtual OperationsClient DeleteModelOperationsClient { get; }

The long-running operations client for DeleteModel.

Property Value
TypeDescription
OperationsClient

DeleteModelVersionOperationsClient

public virtual OperationsClient DeleteModelVersionOperationsClient { get; }

The long-running operations client for DeleteModelVersion.

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
ModelServiceModelServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
TypeDescription
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateExplanationDatasetOperationsClient

public virtual OperationsClient UpdateExplanationDatasetOperationsClient { get; }

The long-running operations client for UpdateExplanationDataset.

Property Value
TypeDescription
OperationsClient

UploadModelOperationsClient

public virtual OperationsClient UploadModelOperationsClient { get; }

The long-running operations client for UploadModel.

Property Value
TypeDescription
OperationsClient

Methods

BatchImportEvaluatedAnnotations(BatchImportEvaluatedAnnotationsRequest, CallSettings)

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

Imports a list of externally generated EvaluatedAnnotations.

Parameters
NameDescription
requestBatchImportEvaluatedAnnotationsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BatchImportEvaluatedAnnotationsResponse

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
BatchImportEvaluatedAnnotationsRequest request = new BatchImportEvaluatedAnnotationsRequest
{
    ParentAsModelEvaluationSliceName = ModelEvaluationSliceName.FromProjectLocationModelEvaluationSlice("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]"),
    EvaluatedAnnotations =
    {
        new EvaluatedAnnotation(),
    },
};
// Make the request
BatchImportEvaluatedAnnotationsResponse response = modelServiceClient.BatchImportEvaluatedAnnotations(request);

BatchImportEvaluatedAnnotations(ModelEvaluationSliceName, IEnumerable<EvaluatedAnnotation>, CallSettings)

public virtual BatchImportEvaluatedAnnotationsResponse BatchImportEvaluatedAnnotations(ModelEvaluationSliceName parent, IEnumerable<EvaluatedAnnotation> evaluatedAnnotations, CallSettings callSettings = null)

Imports a list of externally generated EvaluatedAnnotations.

Parameters
NameDescription
parentModelEvaluationSliceName

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

evaluatedAnnotationsIEnumerableEvaluatedAnnotation

Required. Evaluated annotations resource to be imported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BatchImportEvaluatedAnnotationsResponse

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ModelEvaluationSliceName parent = ModelEvaluationSliceName.FromProjectLocationModelEvaluationSlice("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]");
IEnumerable<EvaluatedAnnotation> evaluatedAnnotations = new EvaluatedAnnotation[]
{
    new EvaluatedAnnotation(),
};
// Make the request
BatchImportEvaluatedAnnotationsResponse response = modelServiceClient.BatchImportEvaluatedAnnotations(parent, evaluatedAnnotations);

BatchImportEvaluatedAnnotations(string, IEnumerable<EvaluatedAnnotation>, CallSettings)

public virtual BatchImportEvaluatedAnnotationsResponse BatchImportEvaluatedAnnotations(string parent, IEnumerable<EvaluatedAnnotation> evaluatedAnnotations, CallSettings callSettings = null)

Imports a list of externally generated EvaluatedAnnotations.

Parameters
NameDescription
parentstring

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

evaluatedAnnotationsIEnumerableEvaluatedAnnotation

Required. Evaluated annotations resource to be imported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BatchImportEvaluatedAnnotationsResponse

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]/slices/[SLICE]";
IEnumerable<EvaluatedAnnotation> evaluatedAnnotations = new EvaluatedAnnotation[]
{
    new EvaluatedAnnotation(),
};
// Make the request
BatchImportEvaluatedAnnotationsResponse response = modelServiceClient.BatchImportEvaluatedAnnotations(parent, evaluatedAnnotations);

BatchImportEvaluatedAnnotationsAsync(BatchImportEvaluatedAnnotationsRequest, CallSettings)

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

Imports a list of externally generated EvaluatedAnnotations.

Parameters
NameDescription
requestBatchImportEvaluatedAnnotationsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskBatchImportEvaluatedAnnotationsResponse

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
BatchImportEvaluatedAnnotationsRequest request = new BatchImportEvaluatedAnnotationsRequest
{
    ParentAsModelEvaluationSliceName = ModelEvaluationSliceName.FromProjectLocationModelEvaluationSlice("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]"),
    EvaluatedAnnotations =
    {
        new EvaluatedAnnotation(),
    },
};
// Make the request
BatchImportEvaluatedAnnotationsResponse response = await modelServiceClient.BatchImportEvaluatedAnnotationsAsync(request);

BatchImportEvaluatedAnnotationsAsync(BatchImportEvaluatedAnnotationsRequest, CancellationToken)

public virtual Task<BatchImportEvaluatedAnnotationsResponse> BatchImportEvaluatedAnnotationsAsync(BatchImportEvaluatedAnnotationsRequest request, CancellationToken cancellationToken)

Imports a list of externally generated EvaluatedAnnotations.

Parameters
NameDescription
requestBatchImportEvaluatedAnnotationsRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskBatchImportEvaluatedAnnotationsResponse

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
BatchImportEvaluatedAnnotationsRequest request = new BatchImportEvaluatedAnnotationsRequest
{
    ParentAsModelEvaluationSliceName = ModelEvaluationSliceName.FromProjectLocationModelEvaluationSlice("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]"),
    EvaluatedAnnotations =
    {
        new EvaluatedAnnotation(),
    },
};
// Make the request
BatchImportEvaluatedAnnotationsResponse response = await modelServiceClient.BatchImportEvaluatedAnnotationsAsync(request);

BatchImportEvaluatedAnnotationsAsync(ModelEvaluationSliceName, IEnumerable<EvaluatedAnnotation>, CallSettings)

public virtual Task<BatchImportEvaluatedAnnotationsResponse> BatchImportEvaluatedAnnotationsAsync(ModelEvaluationSliceName parent, IEnumerable<EvaluatedAnnotation> evaluatedAnnotations, CallSettings callSettings = null)

Imports a list of externally generated EvaluatedAnnotations.

Parameters
NameDescription
parentModelEvaluationSliceName

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

evaluatedAnnotationsIEnumerableEvaluatedAnnotation

Required. Evaluated annotations resource to be imported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskBatchImportEvaluatedAnnotationsResponse

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelEvaluationSliceName parent = ModelEvaluationSliceName.FromProjectLocationModelEvaluationSlice("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]");
IEnumerable<EvaluatedAnnotation> evaluatedAnnotations = new EvaluatedAnnotation[]
{
    new EvaluatedAnnotation(),
};
// Make the request
BatchImportEvaluatedAnnotationsResponse response = await modelServiceClient.BatchImportEvaluatedAnnotationsAsync(parent, evaluatedAnnotations);

BatchImportEvaluatedAnnotationsAsync(ModelEvaluationSliceName, IEnumerable<EvaluatedAnnotation>, CancellationToken)

public virtual Task<BatchImportEvaluatedAnnotationsResponse> BatchImportEvaluatedAnnotationsAsync(ModelEvaluationSliceName parent, IEnumerable<EvaluatedAnnotation> evaluatedAnnotations, CancellationToken cancellationToken)

Imports a list of externally generated EvaluatedAnnotations.

Parameters
NameDescription
parentModelEvaluationSliceName

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

evaluatedAnnotationsIEnumerableEvaluatedAnnotation

Required. Evaluated annotations resource to be imported.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskBatchImportEvaluatedAnnotationsResponse

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelEvaluationSliceName parent = ModelEvaluationSliceName.FromProjectLocationModelEvaluationSlice("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]", "[SLICE]");
IEnumerable<EvaluatedAnnotation> evaluatedAnnotations = new EvaluatedAnnotation[]
{
    new EvaluatedAnnotation(),
};
// Make the request
BatchImportEvaluatedAnnotationsResponse response = await modelServiceClient.BatchImportEvaluatedAnnotationsAsync(parent, evaluatedAnnotations);

BatchImportEvaluatedAnnotationsAsync(string, IEnumerable<EvaluatedAnnotation>, CallSettings)

public virtual Task<BatchImportEvaluatedAnnotationsResponse> BatchImportEvaluatedAnnotationsAsync(string parent, IEnumerable<EvaluatedAnnotation> evaluatedAnnotations, CallSettings callSettings = null)

Imports a list of externally generated EvaluatedAnnotations.

Parameters
NameDescription
parentstring

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

evaluatedAnnotationsIEnumerableEvaluatedAnnotation

Required. Evaluated annotations resource to be imported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskBatchImportEvaluatedAnnotationsResponse

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]/slices/[SLICE]";
IEnumerable<EvaluatedAnnotation> evaluatedAnnotations = new EvaluatedAnnotation[]
{
    new EvaluatedAnnotation(),
};
// Make the request
BatchImportEvaluatedAnnotationsResponse response = await modelServiceClient.BatchImportEvaluatedAnnotationsAsync(parent, evaluatedAnnotations);

BatchImportEvaluatedAnnotationsAsync(string, IEnumerable<EvaluatedAnnotation>, CancellationToken)

public virtual Task<BatchImportEvaluatedAnnotationsResponse> BatchImportEvaluatedAnnotationsAsync(string parent, IEnumerable<EvaluatedAnnotation> evaluatedAnnotations, CancellationToken cancellationToken)

Imports a list of externally generated EvaluatedAnnotations.

Parameters
NameDescription
parentstring

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

evaluatedAnnotationsIEnumerableEvaluatedAnnotation

Required. Evaluated annotations resource to be imported.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskBatchImportEvaluatedAnnotationsResponse

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]/slices/[SLICE]";
IEnumerable<EvaluatedAnnotation> evaluatedAnnotations = new EvaluatedAnnotation[]
{
    new EvaluatedAnnotation(),
};
// Make the request
BatchImportEvaluatedAnnotationsResponse response = await modelServiceClient.BatchImportEvaluatedAnnotationsAsync(parent, evaluatedAnnotations);

BatchImportModelEvaluationSlices(BatchImportModelEvaluationSlicesRequest, CallSettings)

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

Imports a list of externally generated ModelEvaluationSlice.

Parameters
NameDescription
requestBatchImportModelEvaluationSlicesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BatchImportModelEvaluationSlicesResponse

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
BatchImportModelEvaluationSlicesRequest request = new BatchImportModelEvaluationSlicesRequest
{
    ParentAsModelEvaluationName = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"),
    ModelEvaluationSlices =
    {
        new ModelEvaluationSlice(),
    },
};
// Make the request
BatchImportModelEvaluationSlicesResponse response = modelServiceClient.BatchImportModelEvaluationSlices(request);

BatchImportModelEvaluationSlices(ModelEvaluationName, IEnumerable<ModelEvaluationSlice>, CallSettings)

public virtual BatchImportModelEvaluationSlicesResponse BatchImportModelEvaluationSlices(ModelEvaluationName parent, IEnumerable<ModelEvaluationSlice> modelEvaluationSlices, CallSettings callSettings = null)

Imports a list of externally generated ModelEvaluationSlice.

Parameters
NameDescription
parentModelEvaluationName

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

modelEvaluationSlicesIEnumerableModelEvaluationSlice

Required. Model evaluation slice resource to be imported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BatchImportModelEvaluationSlicesResponse

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ModelEvaluationName parent = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
IEnumerable<ModelEvaluationSlice> modelEvaluationSlices = new ModelEvaluationSlice[]
{
    new ModelEvaluationSlice(),
};
// Make the request
BatchImportModelEvaluationSlicesResponse response = modelServiceClient.BatchImportModelEvaluationSlices(parent, modelEvaluationSlices);

BatchImportModelEvaluationSlices(string, IEnumerable<ModelEvaluationSlice>, CallSettings)

public virtual BatchImportModelEvaluationSlicesResponse BatchImportModelEvaluationSlices(string parent, IEnumerable<ModelEvaluationSlice> modelEvaluationSlices, CallSettings callSettings = null)

Imports a list of externally generated ModelEvaluationSlice.

Parameters
NameDescription
parentstring

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

modelEvaluationSlicesIEnumerableModelEvaluationSlice

Required. Model evaluation slice resource to be imported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
BatchImportModelEvaluationSlicesResponse

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]";
IEnumerable<ModelEvaluationSlice> modelEvaluationSlices = new ModelEvaluationSlice[]
{
    new ModelEvaluationSlice(),
};
// Make the request
BatchImportModelEvaluationSlicesResponse response = modelServiceClient.BatchImportModelEvaluationSlices(parent, modelEvaluationSlices);

BatchImportModelEvaluationSlicesAsync(BatchImportModelEvaluationSlicesRequest, CallSettings)

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

Imports a list of externally generated ModelEvaluationSlice.

Parameters
NameDescription
requestBatchImportModelEvaluationSlicesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskBatchImportModelEvaluationSlicesResponse

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
BatchImportModelEvaluationSlicesRequest request = new BatchImportModelEvaluationSlicesRequest
{
    ParentAsModelEvaluationName = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"),
    ModelEvaluationSlices =
    {
        new ModelEvaluationSlice(),
    },
};
// Make the request
BatchImportModelEvaluationSlicesResponse response = await modelServiceClient.BatchImportModelEvaluationSlicesAsync(request);

BatchImportModelEvaluationSlicesAsync(BatchImportModelEvaluationSlicesRequest, CancellationToken)

public virtual Task<BatchImportModelEvaluationSlicesResponse> BatchImportModelEvaluationSlicesAsync(BatchImportModelEvaluationSlicesRequest request, CancellationToken cancellationToken)

Imports a list of externally generated ModelEvaluationSlice.

Parameters
NameDescription
requestBatchImportModelEvaluationSlicesRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskBatchImportModelEvaluationSlicesResponse

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
BatchImportModelEvaluationSlicesRequest request = new BatchImportModelEvaluationSlicesRequest
{
    ParentAsModelEvaluationName = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]"),
    ModelEvaluationSlices =
    {
        new ModelEvaluationSlice(),
    },
};
// Make the request
BatchImportModelEvaluationSlicesResponse response = await modelServiceClient.BatchImportModelEvaluationSlicesAsync(request);

BatchImportModelEvaluationSlicesAsync(ModelEvaluationName, IEnumerable<ModelEvaluationSlice>, CallSettings)

public virtual Task<BatchImportModelEvaluationSlicesResponse> BatchImportModelEvaluationSlicesAsync(ModelEvaluationName parent, IEnumerable<ModelEvaluationSlice> modelEvaluationSlices, CallSettings callSettings = null)

Imports a list of externally generated ModelEvaluationSlice.

Parameters
NameDescription
parentModelEvaluationName

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

modelEvaluationSlicesIEnumerableModelEvaluationSlice

Required. Model evaluation slice resource to be imported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskBatchImportModelEvaluationSlicesResponse

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelEvaluationName parent = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
IEnumerable<ModelEvaluationSlice> modelEvaluationSlices = new ModelEvaluationSlice[]
{
    new ModelEvaluationSlice(),
};
// Make the request
BatchImportModelEvaluationSlicesResponse response = await modelServiceClient.BatchImportModelEvaluationSlicesAsync(parent, modelEvaluationSlices);

BatchImportModelEvaluationSlicesAsync(ModelEvaluationName, IEnumerable<ModelEvaluationSlice>, CancellationToken)

public virtual Task<BatchImportModelEvaluationSlicesResponse> BatchImportModelEvaluationSlicesAsync(ModelEvaluationName parent, IEnumerable<ModelEvaluationSlice> modelEvaluationSlices, CancellationToken cancellationToken)

Imports a list of externally generated ModelEvaluationSlice.

Parameters
NameDescription
parentModelEvaluationName

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

modelEvaluationSlicesIEnumerableModelEvaluationSlice

Required. Model evaluation slice resource to be imported.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskBatchImportModelEvaluationSlicesResponse

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelEvaluationName parent = ModelEvaluationName.FromProjectLocationModelEvaluation("[PROJECT]", "[LOCATION]", "[MODEL]", "[EVALUATION]");
IEnumerable<ModelEvaluationSlice> modelEvaluationSlices = new ModelEvaluationSlice[]
{
    new ModelEvaluationSlice(),
};
// Make the request
BatchImportModelEvaluationSlicesResponse response = await modelServiceClient.BatchImportModelEvaluationSlicesAsync(parent, modelEvaluationSlices);

BatchImportModelEvaluationSlicesAsync(string, IEnumerable<ModelEvaluationSlice>, CallSettings)

public virtual Task<BatchImportModelEvaluationSlicesResponse> BatchImportModelEvaluationSlicesAsync(string parent, IEnumerable<ModelEvaluationSlice> modelEvaluationSlices, CallSettings callSettings = null)

Imports a list of externally generated ModelEvaluationSlice.

Parameters
NameDescription
parentstring

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

modelEvaluationSlicesIEnumerableModelEvaluationSlice

Required. Model evaluation slice resource to be imported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskBatchImportModelEvaluationSlicesResponse

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]";
IEnumerable<ModelEvaluationSlice> modelEvaluationSlices = new ModelEvaluationSlice[]
{
    new ModelEvaluationSlice(),
};
// Make the request
BatchImportModelEvaluationSlicesResponse response = await modelServiceClient.BatchImportModelEvaluationSlicesAsync(parent, modelEvaluationSlices);

BatchImportModelEvaluationSlicesAsync(string, IEnumerable<ModelEvaluationSlice>, CancellationToken)

public virtual Task<BatchImportModelEvaluationSlicesResponse> BatchImportModelEvaluationSlicesAsync(string parent, IEnumerable<ModelEvaluationSlice> modelEvaluationSlices, CancellationToken cancellationToken)

Imports a list of externally generated ModelEvaluationSlice.

Parameters
NameDescription
parentstring

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

modelEvaluationSlicesIEnumerableModelEvaluationSlice

Required. Model evaluation slice resource to be imported.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskBatchImportModelEvaluationSlicesResponse

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]";
IEnumerable<ModelEvaluationSlice> modelEvaluationSlices = new ModelEvaluationSlice[]
{
    new ModelEvaluationSlice(),
};
// Make the request
BatchImportModelEvaluationSlicesResponse response = await modelServiceClient.BatchImportModelEvaluationSlicesAsync(parent, modelEvaluationSlices);

CopyModel(LocationName, ModelName, CallSettings)

public virtual Operation<CopyModelResponse, CopyModelOperationMetadata> CopyModel(LocationName parent, ModelName sourceModel, CallSettings callSettings = null)

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

Parameters
NameDescription
parentLocationName

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

sourceModelModelName

Required. The resource name of the Model to copy. That Model must be in the same Project. Format: projects/{project}/locations/{location}/models/{model}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCopyModelResponseCopyModelOperationMetadata

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ModelName sourceModel = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<CopyModelResponse, CopyModelOperationMetadata> response = modelServiceClient.CopyModel(parent, sourceModel);

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

CopyModel(CopyModelRequest, CallSettings)

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

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

Parameters
NameDescription
requestCopyModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCopyModelResponseCopyModelOperationMetadata

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
CopyModelRequest request = new CopyModelRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SourceModelAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
    EncryptionSpec = new EncryptionSpec(),
    ModelId = "",
};
// Make the request
Operation<CopyModelResponse, CopyModelOperationMetadata> response = modelServiceClient.CopyModel(request);

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

CopyModel(string, string, CallSettings)

public virtual Operation<CopyModelResponse, CopyModelOperationMetadata> CopyModel(string parent, string sourceModel, CallSettings callSettings = null)

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

Parameters
NameDescription
parentstring

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

sourceModelstring

Required. The resource name of the Model to copy. That Model must be in the same Project. Format: projects/{project}/locations/{location}/models/{model}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationCopyModelResponseCopyModelOperationMetadata

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string sourceModel = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<CopyModelResponse, CopyModelOperationMetadata> response = modelServiceClient.CopyModel(parent, sourceModel);

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

CopyModelAsync(LocationName, ModelName, CallSettings)

public virtual Task<Operation<CopyModelResponse, CopyModelOperationMetadata>> CopyModelAsync(LocationName parent, ModelName sourceModel, CallSettings callSettings = null)

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

Parameters
NameDescription
parentLocationName

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

sourceModelModelName

Required. The resource name of the Model to copy. That Model must be in the same Project. Format: projects/{project}/locations/{location}/models/{model}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCopyModelResponseCopyModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ModelName sourceModel = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<CopyModelResponse, CopyModelOperationMetadata> response = await modelServiceClient.CopyModelAsync(parent, sourceModel);

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

CopyModelAsync(LocationName, ModelName, CancellationToken)

public virtual Task<Operation<CopyModelResponse, CopyModelOperationMetadata>> CopyModelAsync(LocationName parent, ModelName sourceModel, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentLocationName

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

sourceModelModelName

Required. The resource name of the Model to copy. That Model must be in the same Project. Format: projects/{project}/locations/{location}/models/{model}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCopyModelResponseCopyModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
LocationName parent = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]");
ModelName sourceModel = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<CopyModelResponse, CopyModelOperationMetadata> response = await modelServiceClient.CopyModelAsync(parent, sourceModel);

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

CopyModelAsync(CopyModelRequest, CallSettings)

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

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

Parameters
NameDescription
requestCopyModelRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCopyModelResponseCopyModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
CopyModelRequest request = new CopyModelRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SourceModelAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
    EncryptionSpec = new EncryptionSpec(),
    ModelId = "",
};
// Make the request
Operation<CopyModelResponse, CopyModelOperationMetadata> response = await modelServiceClient.CopyModelAsync(request);

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

CopyModelAsync(CopyModelRequest, CancellationToken)

public virtual Task<Operation<CopyModelResponse, CopyModelOperationMetadata>> CopyModelAsync(CopyModelRequest request, CancellationToken cancellationToken)

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

Parameters
NameDescription
requestCopyModelRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCopyModelResponseCopyModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
CopyModelRequest request = new CopyModelRequest
{
    ParentAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    SourceModelAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
    EncryptionSpec = new EncryptionSpec(),
    ModelId = "",
};
// Make the request
Operation<CopyModelResponse, CopyModelOperationMetadata> response = await modelServiceClient.CopyModelAsync(request);

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

CopyModelAsync(string, string, CallSettings)

public virtual Task<Operation<CopyModelResponse, CopyModelOperationMetadata>> CopyModelAsync(string parent, string sourceModel, CallSettings callSettings = null)

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

Parameters
NameDescription
parentstring

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

sourceModelstring

Required. The resource name of the Model to copy. That Model must be in the same Project. Format: projects/{project}/locations/{location}/models/{model}

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationCopyModelResponseCopyModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string sourceModel = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<CopyModelResponse, CopyModelOperationMetadata> response = await modelServiceClient.CopyModelAsync(parent, sourceModel);

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

CopyModelAsync(string, string, CancellationToken)

public virtual Task<Operation<CopyModelResponse, CopyModelOperationMetadata>> CopyModelAsync(string parent, string sourceModel, CancellationToken cancellationToken)

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

Parameters
NameDescription
parentstring

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

sourceModelstring

Required. The resource name of the Model to copy. That Model must be in the same Project. Format: projects/{project}/locations/{location}/models/{model}

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationCopyModelResponseCopyModelOperationMetadata

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]";
string sourceModel = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
Operation<CopyModelResponse, CopyModelOperationMetadata> response = await modelServiceClient.CopyModelAsync(parent, sourceModel);

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

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)

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
TaskModelServiceClient

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
OperationEmptyDeleteOperationMetadata

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
OperationEmptyDeleteOperationMetadata

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
OperationEmptyDeleteOperationMetadata

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
TaskOperationEmptyDeleteOperationMetadata

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
TaskOperationEmptyDeleteOperationMetadata

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
TaskOperationEmptyDeleteOperationMetadata

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
TaskOperationEmptyDeleteOperationMetadata

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
TaskOperationEmptyDeleteOperationMetadata

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
TaskOperationEmptyDeleteOperationMetadata

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;
}

DeleteModelVersion(DeleteModelVersionRequest, CallSettings)

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

Deletes a Model version.

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

Parameters
NameDescription
requestDeleteModelVersionRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyDeleteOperationMetadata

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
DeleteModelVersionRequest request = new DeleteModelVersionRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = modelServiceClient.DeleteModelVersion(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.PollOnceDeleteModelVersion(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;
}

DeleteModelVersion(ModelName, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteModelVersion(ModelName name, CallSettings callSettings = null)

Deletes a Model version.

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

Parameters
NameDescription
nameModelName

Required. The name of the model version to be deleted, with a version ID explicitly included.

Example: projects/{project}/locations/{location}/models/{model}@1234

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyDeleteOperationMetadata

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.DeleteModelVersion(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.PollOnceDeleteModelVersion(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;
}

DeleteModelVersion(string, CallSettings)

public virtual Operation<Empty, DeleteOperationMetadata> DeleteModelVersion(string name, CallSettings callSettings = null)

Deletes a Model version.

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

Parameters
NameDescription
namestring

Required. The name of the model version to be deleted, with a version ID explicitly included.

Example: projects/{project}/locations/{location}/models/{model}@1234

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationEmptyDeleteOperationMetadata

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.DeleteModelVersion(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.PollOnceDeleteModelVersion(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;
}

DeleteModelVersionAsync(DeleteModelVersionRequest, CallSettings)

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

Deletes a Model version.

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

Parameters
NameDescription
requestDeleteModelVersionRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteModelVersionRequest request = new DeleteModelVersionRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await modelServiceClient.DeleteModelVersionAsync(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.PollOnceDeleteModelVersionAsync(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;
}

DeleteModelVersionAsync(DeleteModelVersionRequest, CancellationToken)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteModelVersionAsync(DeleteModelVersionRequest request, CancellationToken cancellationToken)

Deletes a Model version.

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

Parameters
NameDescription
requestDeleteModelVersionRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyDeleteOperationMetadata

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
DeleteModelVersionRequest request = new DeleteModelVersionRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
};
// Make the request
Operation<Empty, DeleteOperationMetadata> response = await modelServiceClient.DeleteModelVersionAsync(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.PollOnceDeleteModelVersionAsync(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;
}

DeleteModelVersionAsync(ModelName, CallSettings)

public virtual Task<Operation<Empty, DeleteOperationMetadata>> DeleteModelVersionAsync(ModelName name, CallSettings callSettings = null)

Deletes a Model version.

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

Parameters
NameDescription
nameModelName

Required. The name of the model version to be deleted, with a version ID explicitly included.

Example: projects/{project}/locations/{location}/models/{model}@1234

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyDeleteOperationMetadata

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.DeleteModelVersionAsync(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.PollOnceDeleteModelVersionAsync(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;
}

DeleteModelVersionAsync(ModelName, CancellationToken)

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

Deletes a Model version.

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

Parameters
NameDescription
nameModelName

Required. The name of the model version to be deleted, with a version ID explicitly included.

Example: projects/{project}/locations/{location}/models/{model}@1234

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyDeleteOperationMetadata

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.DeleteModelVersionAsync(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.PollOnceDeleteModelVersionAsync(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;
}

DeleteModelVersionAsync(string, CallSettings)

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

Deletes a Model version.

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

Parameters
NameDescription
namestring

Required. The name of the model version to be deleted, with a version ID explicitly included.

Example: projects/{project}/locations/{location}/models/{model}@1234

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationEmptyDeleteOperationMetadata

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.DeleteModelVersionAsync(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.PollOnceDeleteModelVersionAsync(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;
}

DeleteModelVersionAsync(string, CancellationToken)

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

Deletes a Model version.

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

Parameters
NameDescription
namestring

Required. The name of the model version to be deleted, with a version ID explicitly included.

Example: projects/{project}/locations/{location}/models/{model}@1234

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationEmptyDeleteOperationMetadata

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.DeleteModelVersionAsync(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.PollOnceDeleteModelVersionAsync(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
OperationExportModelResponseExportModelOperationMetadata

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, 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. The resource name may contain version id or version alias to specify the version, if no version is specified, the default version will be exported.

outputConfigExportModelRequestTypesOutputConfig

Required. The desired output location and configuration.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationExportModelResponseExportModelOperationMetadata

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, 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. The resource name may contain version id or version alias to specify the version, if no version is specified, the default version will be exported.

outputConfigExportModelRequestTypesOutputConfig

Required. The desired output location and configuration.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationExportModelResponseExportModelOperationMetadata

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
TaskOperationExportModelResponseExportModelOperationMetadata

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
TaskOperationExportModelResponseExportModelOperationMetadata

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, 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. The resource name may contain version id or version alias to specify the version, if no version is specified, the default version will be exported.

outputConfigExportModelRequestTypesOutputConfig

Required. The desired output location and configuration.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationExportModelResponseExportModelOperationMetadata

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, 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. The resource name may contain version id or version alias to specify the version, if no version is specified, the default version will be exported.

outputConfigExportModelRequestTypesOutputConfig

Required. The desired output location and configuration.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationExportModelResponseExportModelOperationMetadata

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, 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. The resource name may contain version id or version alias to specify the version, if no version is specified, the default version will be exported.

outputConfigExportModelRequestTypesOutputConfig

Required. The desired output location and configuration.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationExportModelResponseExportModelOperationMetadata

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, 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. The resource name may contain version id or version alias to specify the version, if no version is specified, the default version will be exported.

outputConfigExportModelRequestTypesOutputConfig

Required. The desired output location and configuration.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationExportModelResponseExportModelOperationMetadata

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}

In order to retrieve a specific version of the model, also provide the version ID or version alias. Example: projects/{project}/locations/{location}/models/{model}@2 or projects/{project}/locations/{location}/models/{model}@golden If no version ID or alias is specified, the "default" version will be returned. The "default" version alias is created for the first version of the model, and can be moved to other versions later on. There will be exactly one default version.

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}

In order to retrieve a specific version of the model, also provide the version ID or version alias. Example: projects/{project}/locations/{location}/models/{model}@2 or projects/{project}/locations/{location}/models/{model}@golden If no version ID or alias is specified, the "default" version will be returned. The "default" version alias is created for the first version of the model, and can be moved to other versions later on. There will be exactly one default version.

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
TaskModel

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
TaskModel

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}

In order to retrieve a specific version of the model, also provide the version ID or version alias. Example: projects/{project}/locations/{location}/models/{model}@2 or projects/{project}/locations/{location}/models/{model}@golden If no version ID or alias is specified, the "default" version will be returned. The "default" version alias is created for the first version of the model, and can be moved to other versions later on. There will be exactly one default version.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModel

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}

In order to retrieve a specific version of the model, also provide the version ID or version alias. Example: projects/{project}/locations/{location}/models/{model}@2 or projects/{project}/locations/{location}/models/{model}@golden If no version ID or alias is specified, the "default" version will be returned. The "default" version alias is created for the first version of the model, and can be moved to other versions later on. There will be exactly one default version.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskModel

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}

In order to retrieve a specific version of the model, also provide the version ID or version alias. Example: projects/{project}/locations/{location}/models/{model}@2 or projects/{project}/locations/{location}/models/{model}@golden If no version ID or alias is specified, the "default" version will be returned. The "default" version alias is created for the first version of the model, and can be moved to other versions later on. There will be exactly one default version.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModel

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}

In order to retrieve a specific version of the model, also provide the version ID or version alias. Example: projects/{project}/locations/{location}/models/{model}@2 or projects/{project}/locations/{location}/models/{model}@golden If no version ID or alias is specified, the "default" version will be returned. The "default" version alias is created for the first version of the model, and can be moved to other versions later on. There will be exactly one default version.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskModel

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
TaskModelEvaluation

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
TaskModelEvaluation

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
TaskModelEvaluation

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
TaskModelEvaluation

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
TaskModelEvaluation

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
TaskModelEvaluation

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
TaskModelEvaluationSlice

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
TaskModelEvaluationSlice

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
TaskModelEvaluationSlice

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
TaskModelEvaluationSlice

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
TaskModelEvaluationSlice

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
TaskModelEvaluationSlice

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);

ImportModelEvaluation(ImportModelEvaluationRequest, CallSettings)

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

Imports an externally generated ModelEvaluation.

Parameters
NameDescription
requestImportModelEvaluationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
ModelEvaluation

The RPC response.

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

ImportModelEvaluation(ModelName, ModelEvaluation, CallSettings)

public virtual ModelEvaluation ImportModelEvaluation(ModelName parent, ModelEvaluation modelEvaluation, CallSettings callSettings = null)

Imports an externally generated ModelEvaluation.

Parameters
NameDescription
parentModelName

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

modelEvaluationModelEvaluation

Required. Model evaluation resource to be imported.

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)
ModelName parent = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
ModelEvaluation modelEvaluation = new ModelEvaluation();
// Make the request
ModelEvaluation response = modelServiceClient.ImportModelEvaluation(parent, modelEvaluation);

ImportModelEvaluation(string, ModelEvaluation, CallSettings)

public virtual ModelEvaluation ImportModelEvaluation(string parent, ModelEvaluation modelEvaluation, CallSettings callSettings = null)

Imports an externally generated ModelEvaluation.

Parameters
NameDescription
parentstring

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

modelEvaluationModelEvaluation

Required. Model evaluation resource to be imported.

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 parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
ModelEvaluation modelEvaluation = new ModelEvaluation();
// Make the request
ModelEvaluation response = modelServiceClient.ImportModelEvaluation(parent, modelEvaluation);

ImportModelEvaluationAsync(ImportModelEvaluationRequest, CallSettings)

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

Imports an externally generated ModelEvaluation.

Parameters
NameDescription
requestImportModelEvaluationRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModelEvaluation

A Task containing the RPC response.

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

ImportModelEvaluationAsync(ImportModelEvaluationRequest, CancellationToken)

public virtual Task<ModelEvaluation> ImportModelEvaluationAsync(ImportModelEvaluationRequest request, CancellationToken cancellationToken)

Imports an externally generated ModelEvaluation.

Parameters
NameDescription
requestImportModelEvaluationRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskModelEvaluation

A Task containing the RPC response.

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

ImportModelEvaluationAsync(ModelName, ModelEvaluation, CallSettings)

public virtual Task<ModelEvaluation> ImportModelEvaluationAsync(ModelName parent, ModelEvaluation modelEvaluation, CallSettings callSettings = null)

Imports an externally generated ModelEvaluation.

Parameters
NameDescription
parentModelName

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

modelEvaluationModelEvaluation

Required. Model evaluation resource to be imported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModelEvaluation

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelName parent = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
ModelEvaluation modelEvaluation = new ModelEvaluation();
// Make the request
ModelEvaluation response = await modelServiceClient.ImportModelEvaluationAsync(parent, modelEvaluation);

ImportModelEvaluationAsync(ModelName, ModelEvaluation, CancellationToken)

public virtual Task<ModelEvaluation> ImportModelEvaluationAsync(ModelName parent, ModelEvaluation modelEvaluation, CancellationToken cancellationToken)

Imports an externally generated ModelEvaluation.

Parameters
NameDescription
parentModelName

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

modelEvaluationModelEvaluation

Required. Model evaluation resource to be imported.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskModelEvaluation

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ModelName parent = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
ModelEvaluation modelEvaluation = new ModelEvaluation();
// Make the request
ModelEvaluation response = await modelServiceClient.ImportModelEvaluationAsync(parent, modelEvaluation);

ImportModelEvaluationAsync(string, ModelEvaluation, CallSettings)

public virtual Task<ModelEvaluation> ImportModelEvaluationAsync(string parent, ModelEvaluation modelEvaluation, CallSettings callSettings = null)

Imports an externally generated ModelEvaluation.

Parameters
NameDescription
parentstring

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

modelEvaluationModelEvaluation

Required. Model evaluation resource to be imported.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModelEvaluation

A Task containing the RPC response.

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

ImportModelEvaluationAsync(string, ModelEvaluation, CancellationToken)

public virtual Task<ModelEvaluation> ImportModelEvaluationAsync(string parent, ModelEvaluation modelEvaluation, CancellationToken cancellationToken)

Imports an externally generated ModelEvaluation.

Parameters
NameDescription
parentstring

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

modelEvaluationModelEvaluation

Required. Model evaluation resource to be imported.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskModelEvaluation

A Task containing the RPC response.

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

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
PagedEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice

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, int?, CallSettings)

public virtual PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlices(ModelEvaluationName parent, string pageToken = null, int? pageSize = null, 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.

pageSizeint

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
PagedEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice

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, int?, CallSettings)

public virtual PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlices(string parent, string pageToken = null, int? pageSize = null, 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.

pageSizeint

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
PagedEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice

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
PagedAsyncEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice

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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlicesAsync(ModelEvaluationName parent, string pageToken = null, int? pageSize = null, 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.

pageSizeint

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
PagedAsyncEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice

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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlicesAsync(string parent, string pageToken = null, int? pageSize = null, 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.

pageSizeint

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
PagedAsyncEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice

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;

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
PagedEnumerableListModelEvaluationsResponseModelEvaluation

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, int?, CallSettings)

public virtual PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluations(ModelName parent, string pageToken = null, int? pageSize = null, 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.

pageSizeint

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
PagedEnumerableListModelEvaluationsResponseModelEvaluation

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, int?, CallSettings)

public virtual PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluations(string parent, string pageToken = null, int? pageSize = null, 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.

pageSizeint

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
PagedEnumerableListModelEvaluationsResponseModelEvaluation

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
PagedAsyncEnumerableListModelEvaluationsResponseModelEvaluation

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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluationsAsync(ModelName parent, string pageToken = null, int? pageSize = null, 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.

pageSizeint

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
PagedAsyncEnumerableListModelEvaluationsResponseModelEvaluation

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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluationsAsync(string parent, string pageToken = null, int? pageSize = null, 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.

pageSizeint

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
PagedAsyncEnumerableListModelEvaluationsResponseModelEvaluation

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;

ListModelVersions(ListModelVersionsRequest, CallSettings)

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

Lists versions of the specified model.

Parameters
NameDescription
requestListModelVersionsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedEnumerableListModelVersionsResponseModel

A pageable sequence of Model resources.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ListModelVersionsRequest request = new ListModelVersionsRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
    Filter = "",
    ReadMask = new FieldMask(),
    OrderBy = "",
};
// Make the request
PagedEnumerable<ListModelVersionsResponse, Model> response = modelServiceClient.ListModelVersions(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 (ListModelVersionsResponse 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;

ListModelVersions(ModelName, string, int?, CallSettings)

public virtual PagedEnumerable<ListModelVersionsResponse, Model> ListModelVersions(ModelName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists versions of the specified model.

Parameters
NameDescription
nameModelName

Required. The name of the model to list versions for.

pageTokenstring

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

pageSizeint

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
PagedEnumerableListModelVersionsResponseModel

A pageable sequence of Model resources.

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

// 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 (ListModelVersionsResponse 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;

ListModelVersions(string, string, int?, CallSettings)

public virtual PagedEnumerable<ListModelVersionsResponse, Model> ListModelVersions(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists versions of the specified model.

Parameters
NameDescription
namestring

Required. The name of the model to list versions for.

pageTokenstring

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

pageSizeint

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
PagedEnumerableListModelVersionsResponseModel

A pageable sequence of Model resources.

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

// 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 (ListModelVersionsResponse 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;

ListModelVersionsAsync(ListModelVersionsRequest, CallSettings)

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

Lists versions of the specified model.

Parameters
NameDescription
requestListModelVersionsRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
PagedAsyncEnumerableListModelVersionsResponseModel

A pageable asynchronous sequence of Model resources.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
ListModelVersionsRequest request = new ListModelVersionsRequest
{
    ModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
    Filter = "",
    ReadMask = new FieldMask(),
    OrderBy = "",
};
// Make the request
PagedAsyncEnumerable<ListModelVersionsResponse, Model> response = modelServiceClient.ListModelVersionsAsync(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((ListModelVersionsResponse 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;

ListModelVersionsAsync(ModelName, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListModelVersionsResponse, Model> ListModelVersionsAsync(ModelName name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists versions of the specified model.

Parameters
NameDescription
nameModelName

Required. The name of the model to list versions for.

pageTokenstring

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

pageSizeint

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
PagedAsyncEnumerableListModelVersionsResponseModel

A pageable asynchronous sequence of Model resources.

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

// 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((ListModelVersionsResponse 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;

ListModelVersionsAsync(string, string, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListModelVersionsResponse, Model> ListModelVersionsAsync(string name, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)

Lists versions of the specified model.

Parameters
NameDescription
namestring

Required. The name of the model to list versions for.

pageTokenstring

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

pageSizeint

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
PagedAsyncEnumerableListModelVersionsResponseModel

A pageable asynchronous sequence of Model resources.

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

// 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((ListModelVersionsResponse 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;

ListModels(LocationName, string, int?, CallSettings)

public virtual PagedEnumerable<ListModelsResponse, Model> ListModels(LocationName parent, string pageToken = null, int? pageSize = null, 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.

pageSizeint

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
PagedEnumerableListModelsResponseModel

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
PagedEnumerableListModelsResponseModel

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, int?, CallSettings)

public virtual PagedEnumerable<ListModelsResponse, Model> ListModels(string parent, string pageToken = null, int? pageSize = null, 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.

pageSizeint

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
PagedEnumerableListModelsResponseModel

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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListModelsResponse, Model> ListModelsAsync(LocationName parent, string pageToken = null, int? pageSize = null, 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.

pageSizeint

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
PagedAsyncEnumerableListModelsResponseModel

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
PagedAsyncEnumerableListModelsResponseModel

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, int?, CallSettings)

public virtual PagedAsyncEnumerable<ListModelsResponse, Model> ListModelsAsync(string parent, string pageToken = null, int? pageSize = null, 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.

pageSizeint

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
PagedAsyncEnumerableListModelsResponseModel

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;

MergeVersionAliases(MergeVersionAliasesRequest, CallSettings)

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

Merges a set of aliases for a Model version.

Parameters
NameDescription
requestMergeVersionAliasesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
Model

The RPC response.

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

MergeVersionAliases(ModelName, IEnumerable<string>, CallSettings)

public virtual Model MergeVersionAliases(ModelName name, IEnumerable<string> versionAliases, CallSettings callSettings = null)

Merges a set of aliases for a Model version.

Parameters
NameDescription
nameModelName

Required. The name of the model version to merge aliases, with a version ID explicitly included.

Example: projects/{project}/locations/{location}/models/{model}@1234

versionAliasesIEnumerablestring

Required. The set of version aliases to merge. The alias should be at most 128 characters, and match [a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]. Add the - prefix to an alias means removing that alias from the version. - is NOT counted in the 128 characters. Example: -golden means removing the golden alias from the version.

There is NO ordering in aliases, which means 1) The aliases returned from GetModel API might not have the exactly same order from this MergeVersionAliases API. 2) Adding and deleting the same alias in the request is not recommended, and the 2 operations will be cancelled out.

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]");
IEnumerable<string> versionAliases = new string[] { "", };
// Make the request
Model response = modelServiceClient.MergeVersionAliases(name, versionAliases);

MergeVersionAliases(string, IEnumerable<string>, CallSettings)

public virtual Model MergeVersionAliases(string name, IEnumerable<string> versionAliases, CallSettings callSettings = null)

Merges a set of aliases for a Model version.

Parameters
NameDescription
namestring

Required. The name of the model version to merge aliases, with a version ID explicitly included.

Example: projects/{project}/locations/{location}/models/{model}@1234

versionAliasesIEnumerablestring

Required. The set of version aliases to merge. The alias should be at most 128 characters, and match [a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]. Add the - prefix to an alias means removing that alias from the version. - is NOT counted in the 128 characters. Example: -golden means removing the golden alias from the version.

There is NO ordering in aliases, which means 1) The aliases returned from GetModel API might not have the exactly same order from this MergeVersionAliases API. 2) Adding and deleting the same alias in the request is not recommended, and the 2 operations will be cancelled out.

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]";
IEnumerable<string> versionAliases = new string[] { "", };
// Make the request
Model response = modelServiceClient.MergeVersionAliases(name, versionAliases);

MergeVersionAliasesAsync(MergeVersionAliasesRequest, CallSettings)

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

Merges a set of aliases for a Model version.

Parameters
NameDescription
requestMergeVersionAliasesRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModel

A Task containing the RPC response.

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

MergeVersionAliasesAsync(MergeVersionAliasesRequest, CancellationToken)

public virtual Task<Model> MergeVersionAliasesAsync(MergeVersionAliasesRequest request, CancellationToken cancellationToken)

Merges a set of aliases for a Model version.

Parameters
NameDescription
requestMergeVersionAliasesRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskModel

A Task containing the RPC response.

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

MergeVersionAliasesAsync(ModelName, IEnumerable<string>, CallSettings)

public virtual Task<Model> MergeVersionAliasesAsync(ModelName name, IEnumerable<string> versionAliases, CallSettings callSettings = null)

Merges a set of aliases for a Model version.

Parameters
NameDescription
nameModelName

Required. The name of the model version to merge aliases, with a version ID explicitly included.

Example: projects/{project}/locations/{location}/models/{model}@1234

versionAliasesIEnumerablestring

Required. The set of version aliases to merge. The alias should be at most 128 characters, and match [a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]. Add the - prefix to an alias means removing that alias from the version. - is NOT counted in the 128 characters. Example: -golden means removing the golden alias from the version.

There is NO ordering in aliases, which means 1) The aliases returned from GetModel API might not have the exactly same order from this MergeVersionAliases API. 2) Adding and deleting the same alias in the request is not recommended, and the 2 operations will be cancelled out.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModel

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]");
IEnumerable<string> versionAliases = new string[] { "", };
// Make the request
Model response = await modelServiceClient.MergeVersionAliasesAsync(name, versionAliases);

MergeVersionAliasesAsync(ModelName, IEnumerable<string>, CancellationToken)

public virtual Task<Model> MergeVersionAliasesAsync(ModelName name, IEnumerable<string> versionAliases, CancellationToken cancellationToken)

Merges a set of aliases for a Model version.

Parameters
NameDescription
nameModelName

Required. The name of the model version to merge aliases, with a version ID explicitly included.

Example: projects/{project}/locations/{location}/models/{model}@1234

versionAliasesIEnumerablestring

Required. The set of version aliases to merge. The alias should be at most 128 characters, and match [a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]. Add the - prefix to an alias means removing that alias from the version. - is NOT counted in the 128 characters. Example: -golden means removing the golden alias from the version.

There is NO ordering in aliases, which means 1) The aliases returned from GetModel API might not have the exactly same order from this MergeVersionAliases API. 2) Adding and deleting the same alias in the request is not recommended, and the 2 operations will be cancelled out.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskModel

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]");
IEnumerable<string> versionAliases = new string[] { "", };
// Make the request
Model response = await modelServiceClient.MergeVersionAliasesAsync(name, versionAliases);

MergeVersionAliasesAsync(string, IEnumerable<string>, CallSettings)

public virtual Task<Model> MergeVersionAliasesAsync(string name, IEnumerable<string> versionAliases, CallSettings callSettings = null)

Merges a set of aliases for a Model version.

Parameters
NameDescription
namestring

Required. The name of the model version to merge aliases, with a version ID explicitly included.

Example: projects/{project}/locations/{location}/models/{model}@1234

versionAliasesIEnumerablestring

Required. The set of version aliases to merge. The alias should be at most 128 characters, and match [a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]. Add the - prefix to an alias means removing that alias from the version. - is NOT counted in the 128 characters. Example: -golden means removing the golden alias from the version.

There is NO ordering in aliases, which means 1) The aliases returned from GetModel API might not have the exactly same order from this MergeVersionAliases API. 2) Adding and deleting the same alias in the request is not recommended, and the 2 operations will be cancelled out.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskModel

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]";
IEnumerable<string> versionAliases = new string[] { "", };
// Make the request
Model response = await modelServiceClient.MergeVersionAliasesAsync(name, versionAliases);

MergeVersionAliasesAsync(string, IEnumerable<string>, CancellationToken)

public virtual Task<Model> MergeVersionAliasesAsync(string name, IEnumerable<string> versionAliases, CancellationToken cancellationToken)

Merges a set of aliases for a Model version.

Parameters
NameDescription
namestring

Required. The name of the model version to merge aliases, with a version ID explicitly included.

Example: projects/{project}/locations/{location}/models/{model}@1234

versionAliasesIEnumerablestring

Required. The set of version aliases to merge. The alias should be at most 128 characters, and match [a-z][a-zA-Z0-9-]{0,126}[a-z-0-9]. Add the - prefix to an alias means removing that alias from the version. - is NOT counted in the 128 characters. Example: -golden means removing the golden alias from the version.

There is NO ordering in aliases, which means 1) The aliases returned from GetModel API might not have the exactly same order from this MergeVersionAliases API. 2) Adding and deleting the same alias in the request is not recommended, and the 2 operations will be cancelled out.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskModel

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]";
IEnumerable<string> versionAliases = new string[] { "", };
// Make the request
Model response = await modelServiceClient.MergeVersionAliasesAsync(name, versionAliases);

PollOnceCopyModel(string, CallSettings)

public virtual Operation<CopyModelResponse, CopyModelOperationMetadata> PollOnceCopyModel(string operationName, CallSettings callSettings = null)

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

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
OperationCopyModelResponseCopyModelOperationMetadata

The result of polling the operation.

PollOnceCopyModelAsync(string, CallSettings)

public virtual Task<Operation<CopyModelResponse, CopyModelOperationMetadata>> PollOnceCopyModelAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationCopyModelResponseCopyModelOperationMetadata

A task representing the result of polling the operation.

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
OperationEmptyDeleteOperationMetadata

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
TaskOperationEmptyDeleteOperationMetadata

A task representing the result of polling the operation.

PollOnceDeleteModelVersion(string, CallSettings)

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

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

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
OperationEmptyDeleteOperationMetadata

The result of polling the operation.

PollOnceDeleteModelVersionAsync(string, CallSettings)

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

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

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
TaskOperationEmptyDeleteOperationMetadata

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
OperationExportModelResponseExportModelOperationMetadata

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
TaskOperationExportModelResponseExportModelOperationMetadata

A task representing the result of polling the operation.

PollOnceUpdateExplanationDataset(string, CallSettings)

public virtual Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata> PollOnceUpdateExplanationDataset(string operationName, CallSettings callSettings = null)

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

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
OperationUpdateExplanationDatasetResponseUpdateExplanationDatasetOperationMetadata

The result of polling the operation.

PollOnceUpdateExplanationDatasetAsync(string, CallSettings)

public virtual Task<Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata>> PollOnceUpdateExplanationDatasetAsync(string operationName, CallSettings callSettings = null)

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

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
TaskOperationUpdateExplanationDatasetResponseUpdateExplanationDatasetOperationMetadata

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
OperationUploadModelResponseUploadModelOperationMetadata

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
TaskOperationUploadModelResponseUploadModelOperationMetadata

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.

UpdateExplanationDataset(ModelName, CallSettings)

public virtual Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata> UpdateExplanationDataset(ModelName model, CallSettings callSettings = null)

Incrementally update the dataset used for an examples model.

Parameters
NameDescription
modelModelName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationUpdateExplanationDatasetResponseUpdateExplanationDatasetOperationMetadata

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
ModelName model = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]");
// Make the request
Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata> response = modelServiceClient.UpdateExplanationDataset(model);

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

UpdateExplanationDataset(UpdateExplanationDatasetRequest, CallSettings)

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

Incrementally update the dataset used for an examples model.

Parameters
NameDescription
requestUpdateExplanationDatasetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationUpdateExplanationDatasetResponseUpdateExplanationDatasetOperationMetadata

The RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = ModelServiceClient.Create();
// Initialize request argument(s)
UpdateExplanationDatasetRequest request = new UpdateExplanationDatasetRequest
{
    ModelAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
    Examples = new Examples(),
};
// Make the request
Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata> response = modelServiceClient.UpdateExplanationDataset(request);

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

UpdateExplanationDataset(string, CallSettings)

public virtual Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata> UpdateExplanationDataset(string model, CallSettings callSettings = null)

Incrementally update the dataset used for an examples model.

Parameters
NameDescription
modelstring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationUpdateExplanationDatasetResponseUpdateExplanationDatasetOperationMetadata

The RPC response.

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

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

UpdateExplanationDatasetAsync(ModelName, CallSettings)

public virtual Task<Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata>> UpdateExplanationDatasetAsync(ModelName model, CallSettings callSettings = null)

Incrementally update the dataset used for an examples model.

Parameters
NameDescription
modelModelName

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationUpdateExplanationDatasetResponseUpdateExplanationDatasetOperationMetadata

A Task containing the RPC response.

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

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

UpdateExplanationDatasetAsync(ModelName, CancellationToken)

public virtual Task<Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata>> UpdateExplanationDatasetAsync(ModelName model, CancellationToken cancellationToken)

Incrementally update the dataset used for an examples model.

Parameters
NameDescription
modelModelName

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationUpdateExplanationDatasetResponseUpdateExplanationDatasetOperationMetadata

A Task containing the RPC response.

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

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

UpdateExplanationDatasetAsync(UpdateExplanationDatasetRequest, CallSettings)

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

Incrementally update the dataset used for an examples model.

Parameters
NameDescription
requestUpdateExplanationDatasetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationUpdateExplanationDatasetResponseUpdateExplanationDatasetOperationMetadata

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateExplanationDatasetRequest request = new UpdateExplanationDatasetRequest
{
    ModelAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
    Examples = new Examples(),
};
// Make the request
Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata> response = await modelServiceClient.UpdateExplanationDatasetAsync(request);

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

UpdateExplanationDatasetAsync(UpdateExplanationDatasetRequest, CancellationToken)

public virtual Task<Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata>> UpdateExplanationDatasetAsync(UpdateExplanationDatasetRequest request, CancellationToken cancellationToken)

Incrementally update the dataset used for an examples model.

Parameters
NameDescription
requestUpdateExplanationDatasetRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationUpdateExplanationDatasetResponseUpdateExplanationDatasetOperationMetadata

A Task containing the RPC response.

Example
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateExplanationDatasetRequest request = new UpdateExplanationDatasetRequest
{
    ModelAsModelName = ModelName.FromProjectLocationModel("[PROJECT]", "[LOCATION]", "[MODEL]"),
    Examples = new Examples(),
};
// Make the request
Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata> response = await modelServiceClient.UpdateExplanationDatasetAsync(request);

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

UpdateExplanationDatasetAsync(string, CallSettings)

public virtual Task<Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata>> UpdateExplanationDatasetAsync(string model, CallSettings callSettings = null)

Incrementally update the dataset used for an examples model.

Parameters
NameDescription
modelstring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationUpdateExplanationDatasetResponseUpdateExplanationDatasetOperationMetadata

A Task containing the RPC response.

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

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

UpdateExplanationDatasetAsync(string, CancellationToken)

public virtual Task<Operation<UpdateExplanationDatasetResponse, UpdateExplanationDatasetOperationMetadata>> UpdateExplanationDatasetAsync(string model, CancellationToken cancellationToken)

Incrementally update the dataset used for an examples model.

Parameters
NameDescription
modelstring

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationUpdateExplanationDatasetResponseUpdateExplanationDatasetOperationMetadata

A Task containing the RPC response.

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

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

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. When Model Versioning is enabled, the model.name will be used to determine whether to update the model or model version.

  1. model.name with the @ value, e.g. models/123@1, refers to a version specific update.
  2. model.name without the @ value, e.g. models/123, refers to a model update.
  3. model.name with @-, e.g. models/123@-, refers to a model update.
  4. Supported model fields: display_name, description; supported version-specific fields: version_description. Labels are supported in both scenarios. Both the model labels and the version labels are merged when a model is returned. When updating labels, if the request is for model-specific update, model label gets updated. Otherwise, version labels get updated.
  5. A model name or model version name fields update mismatch will cause a precondition error.
  6. One request cannot update both the model and the version fields. You must update them separately.
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. When Model Versioning is enabled, the model.name will be used to determine whether to update the model or model version.

  1. model.name with the @ value, e.g. models/123@1, refers to a version specific update.
  2. model.name without the @ value, e.g. models/123, refers to a model update.
  3. model.name with @-, e.g. models/123@-, refers to a model update.
  4. Supported model fields: display_name, description; supported version-specific fields: version_description. Labels are supported in both scenarios. Both the model labels and the version labels are merged when a model is returned. When updating labels, if the request is for model-specific update, model label gets updated. Otherwise, version labels get updated.
  5. A model name or model version name fields update mismatch will cause a precondition error.
  6. One request cannot update both the model and the version fields. You must update them separately.
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
TaskModel

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. When Model Versioning is enabled, the model.name will be used to determine whether to update the model or model version.

  1. model.name with the @ value, e.g. models/123@1, refers to a version specific update.
  2. model.name without the @ value, e.g. models/123, refers to a model update.
  3. model.name with @-, e.g. models/123@-, refers to a model update.
  4. Supported model fields: display_name, description; supported version-specific fields: version_description. Labels are supported in both scenarios. Both the model labels and the version labels are merged when a model is returned. When updating labels, if the request is for model-specific update, model label gets updated. Otherwise, version labels get updated.
  5. A model name or model version name fields update mismatch will cause a precondition error.
  6. One request cannot update both the model and the version fields. You must update them separately.
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
TaskModel

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
TaskModel

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
TaskModel

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
OperationUploadModelResponseUploadModelOperationMetadata

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
OperationUploadModelResponseUploadModelOperationMetadata

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(),
    ParentModel = "",
    ModelId = "",
    ServiceAccount = "",
};
// 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
OperationUploadModelResponseUploadModelOperationMetadata

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
TaskOperationUploadModelResponseUploadModelOperationMetadata

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
TaskOperationUploadModelResponseUploadModelOperationMetadata

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
TaskOperationUploadModelResponseUploadModelOperationMetadata

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(),
    ParentModel = "",
    ModelId = "",
    ServiceAccount = "",
};
// 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
TaskOperationUploadModelResponseUploadModelOperationMetadata

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(),
    ParentModel = "",
    ModelId = "",
    ServiceAccount = "",
};
// 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
TaskOperationUploadModelResponseUploadModelOperationMetadata

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
TaskOperationUploadModelResponseUploadModelOperationMetadata

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;
}