- 3.7.0 (latest)
- 3.6.0
- 3.5.0
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.0
- 2.28.0
- 2.27.0
- 2.26.0
- 2.25.0
- 2.24.0
- 2.23.0
- 2.22.0
- 2.21.0
- 2.20.0
- 2.19.0
- 2.18.0
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- 2.9.0
- 2.8.0
- 2.7.0
- 2.6.0
- 2.5.0
- 2.4.0
- 2.3.0
- 2.2.0
- 2.1.0
- 2.0.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.0
- 1.4.0
- 1.3.0
- 1.2.0
- 1.1.0
- 1.0.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.
Derived Types
Namespace
Google.Cloud.AIPlatform.V1Assembly
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 | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default ModelService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default ModelService scopes are:
DeleteModelOperationsClient
public virtual OperationsClient DeleteModelOperationsClient { get; }
The long-running operations client for DeleteModel
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
DeleteModelVersionOperationsClient
public virtual OperationsClient DeleteModelVersionOperationsClient { get; }
The long-running operations client for DeleteModelVersion
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
ExportModelOperationsClient
public virtual OperationsClient ExportModelOperationsClient { get; }
The long-running operations client for ExportModel
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
GrpcClient
public virtual ModelService.ModelServiceClient GrpcClient { get; }
The underlying gRPC ModelService client
Property Value | |
---|---|
Type | Description |
ModelServiceModelServiceClient |
IAMPolicyClient
public virtual IAMPolicyClient IAMPolicyClient { get; }
The IAMPolicyClient associated with this client.
Property Value | |
---|---|
Type | Description |
IAMPolicyClient |
LocationsClient
public virtual LocationsClient LocationsClient { get; }
The LocationsClient associated with this client.
Property Value | |
---|---|
Type | Description |
LocationsClient |
ServiceMetadata
public static ServiceMetadata ServiceMetadata { get; }
The service metadata associated with this client type.
Property Value | |
---|---|
Type | Description |
ServiceMetadata |
UploadModelOperationsClient
public virtual OperationsClient UploadModelOperationsClient { get; }
The long-running operations client for UploadModel
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
BatchImportEvaluatedAnnotations(BatchImportEvaluatedAnnotationsRequest, CallSettings)
public virtual BatchImportEvaluatedAnnotationsResponse BatchImportEvaluatedAnnotations(BatchImportEvaluatedAnnotationsRequest request, CallSettings callSettings = null)
Imports a list of externally generated EvaluatedAnnotations.
Parameters | |
---|---|
Name | Description |
request | BatchImportEvaluatedAnnotationsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BatchImportEvaluatedAnnotationsResponse | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ModelEvaluationSliceName Required. The name of the parent ModelEvaluationSlice resource.
Format:
|
evaluatedAnnotations | IEnumerableEvaluatedAnnotation Required. Evaluated annotations resource to be imported. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BatchImportEvaluatedAnnotationsResponse | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The name of the parent ModelEvaluationSlice resource.
Format:
|
evaluatedAnnotations | IEnumerableEvaluatedAnnotation Required. Evaluated annotations resource to be imported. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BatchImportEvaluatedAnnotationsResponse | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | BatchImportEvaluatedAnnotationsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatchImportEvaluatedAnnotationsResponse | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | BatchImportEvaluatedAnnotationsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchImportEvaluatedAnnotationsResponse | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ModelEvaluationSliceName Required. The name of the parent ModelEvaluationSlice resource.
Format:
|
evaluatedAnnotations | IEnumerableEvaluatedAnnotation Required. Evaluated annotations resource to be imported. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatchImportEvaluatedAnnotationsResponse | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ModelEvaluationSliceName Required. The name of the parent ModelEvaluationSlice resource.
Format:
|
evaluatedAnnotations | IEnumerableEvaluatedAnnotation Required. Evaluated annotations resource to be imported. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchImportEvaluatedAnnotationsResponse | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The name of the parent ModelEvaluationSlice resource.
Format:
|
evaluatedAnnotations | IEnumerableEvaluatedAnnotation Required. Evaluated annotations resource to be imported. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatchImportEvaluatedAnnotationsResponse | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The name of the parent ModelEvaluationSlice resource.
Format:
|
evaluatedAnnotations | IEnumerableEvaluatedAnnotation Required. Evaluated annotations resource to be imported. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchImportEvaluatedAnnotationsResponse | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | BatchImportModelEvaluationSlicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BatchImportModelEvaluationSlicesResponse | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ModelEvaluationName Required. The name of the parent ModelEvaluation resource.
Format:
|
modelEvaluationSlices | IEnumerableModelEvaluationSlice Required. Model evaluation slice resource to be imported. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BatchImportModelEvaluationSlicesResponse | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The name of the parent ModelEvaluation resource.
Format:
|
modelEvaluationSlices | IEnumerableModelEvaluationSlice Required. Model evaluation slice resource to be imported. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
BatchImportModelEvaluationSlicesResponse | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | BatchImportModelEvaluationSlicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatchImportModelEvaluationSlicesResponse | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | BatchImportModelEvaluationSlicesRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchImportModelEvaluationSlicesResponse | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ModelEvaluationName Required. The name of the parent ModelEvaluation resource.
Format:
|
modelEvaluationSlices | IEnumerableModelEvaluationSlice Required. Model evaluation slice resource to be imported. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatchImportModelEvaluationSlicesResponse | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ModelEvaluationName Required. The name of the parent ModelEvaluation resource.
Format:
|
modelEvaluationSlices | IEnumerableModelEvaluationSlice Required. Model evaluation slice resource to be imported. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchImportModelEvaluationSlicesResponse | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The name of the parent ModelEvaluation resource.
Format:
|
modelEvaluationSlices | IEnumerableModelEvaluationSlice Required. Model evaluation slice resource to be imported. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskBatchImportModelEvaluationSlicesResponse | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The name of the parent ModelEvaluation resource.
Format:
|
modelEvaluationSlices | IEnumerableModelEvaluationSlice Required. Model evaluation slice resource to be imported. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskBatchImportModelEvaluationSlicesResponse | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the Location into which to copy the Model.
Format: |
sourceModel | ModelName Required. The resource name of the Model to copy. That Model must be in the
same Project. Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationCopyModelResponseCopyModelOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | CopyModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationCopyModelResponseCopyModelOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The resource name of the Location into which to copy the Model.
Format: |
sourceModel | string Required. The resource name of the Model to copy. That Model must be in the
same Project. Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationCopyModelResponseCopyModelOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the Location into which to copy the Model.
Format: |
sourceModel | ModelName Required. The resource name of the Model to copy. That Model must be in the
same Project. Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationCopyModelResponseCopyModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the Location into which to copy the Model.
Format: |
sourceModel | ModelName Required. The resource name of the Model to copy. That Model must be in the
same Project. Format:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationCopyModelResponseCopyModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CopyModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationCopyModelResponseCopyModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | CopyModelRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationCopyModelResponseCopyModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The resource name of the Location into which to copy the Model.
Format: |
sourceModel | string Required. The resource name of the Model to copy. That Model must be in the
same Project. Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationCopyModelResponseCopyModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The resource name of the Location into which to copy the Model.
Format: |
sourceModel | string Required. The resource name of the Model to copy. That Model must be in the
same Project. Format:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationCopyModelResponseCopyModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
request | DeleteModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the Model resource to be deleted.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the Model resource to be deleted.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | DeleteModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | DeleteModelRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the Model resource to be deleted.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the Model resource to be deleted.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the Model resource to be deleted.
Format: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the Model resource to be deleted.
Format: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | DeleteModelVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the model version to be deleted, with a version ID explicitly included. Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the model version to be deleted, with a version ID explicitly included. Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationEmptyDeleteOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | DeleteModelVersionRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | DeleteModelVersionRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the model version to be deleted, with a version ID explicitly included. Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the model version to be deleted, with a version ID explicitly included. Example: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the model version to be deleted, with a version ID explicitly included. Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the model version to be deleted, with a version ID explicitly included. Example: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationEmptyDeleteOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | ExportModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationExportModelResponseExportModelOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName 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. |
outputConfig | ExportModelRequestTypesOutputConfig Required. The desired output location and configuration. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationExportModelResponseExportModelOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | string 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. |
outputConfig | ExportModelRequestTypesOutputConfig Required. The desired output location and configuration. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationExportModelResponseExportModelOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | ExportModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExportModelResponseExportModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | ExportModelRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationExportModelResponseExportModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName 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. |
outputConfig | ExportModelRequestTypesOutputConfig Required. The desired output location and configuration. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExportModelResponseExportModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName 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. |
outputConfig | ExportModelRequestTypesOutputConfig Required. The desired output location and configuration. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationExportModelResponseExportModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string 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. |
outputConfig | ExportModelRequestTypesOutputConfig Required. The desired output location and configuration. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExportModelResponseExportModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string 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. |
outputConfig | ExportModelRequestTypesOutputConfig Required. The desired output location and configuration. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationExportModelResponseExportModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Model | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the Model resource.
Format: In order to retrieve a specific version of the model, also provide
the version ID or version alias.
Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Model | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the Model resource.
Format: In order to retrieve a specific version of the model, also provide
the version ID or version alias.
Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Model | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetModelRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the Model resource.
Format: In order to retrieve a specific version of the model, also provide
the version ID or version alias.
Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the Model resource.
Format: In order to retrieve a specific version of the model, also provide
the version ID or version alias.
Example: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the Model resource.
Format: In order to retrieve a specific version of the model, also provide
the version ID or version alias.
Example: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the Model resource.
Format: In order to retrieve a specific version of the model, also provide
the version ID or version alias.
Example: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetModelEvaluationRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ModelEvaluation | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelEvaluationName Required. The name of the ModelEvaluation resource.
Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ModelEvaluation | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the ModelEvaluation resource.
Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ModelEvaluation | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetModelEvaluationRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluation | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetModelEvaluationRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluation | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelEvaluationName Required. The name of the ModelEvaluation resource.
Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluation | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelEvaluationName Required. The name of the ModelEvaluation resource.
Format:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluation | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the ModelEvaluation resource.
Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluation | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the ModelEvaluation resource.
Format:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluation | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetModelEvaluationSliceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ModelEvaluationSlice | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelEvaluationSliceName Required. The name of the ModelEvaluationSlice resource.
Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ModelEvaluationSlice | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the ModelEvaluationSlice resource.
Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ModelEvaluationSlice | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetModelEvaluationSliceRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluationSlice | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetModelEvaluationSliceRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluationSlice | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelEvaluationSliceName Required. The name of the ModelEvaluationSlice resource.
Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluationSlice | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelEvaluationSliceName Required. The name of the ModelEvaluationSlice resource.
Format:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluationSlice | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the ModelEvaluationSlice resource.
Format:
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluationSlice | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the ModelEvaluationSlice resource.
Format:
|
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluationSlice | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | ImportModelEvaluationRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ModelEvaluation | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ModelName Required. The name of the parent model resource.
Format: |
modelEvaluation | ModelEvaluation Required. Model evaluation resource to be imported. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ModelEvaluation | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The name of the parent model resource.
Format: |
modelEvaluation | ModelEvaluation Required. Model evaluation resource to be imported. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
ModelEvaluation | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | ImportModelEvaluationRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluation | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | ImportModelEvaluationRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluation | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ModelName Required. The name of the parent model resource.
Format: |
modelEvaluation | ModelEvaluation Required. Model evaluation resource to be imported. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluation | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | ModelName Required. The name of the parent model resource.
Format: |
modelEvaluation | ModelEvaluation Required. Model evaluation resource to be imported. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluation | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The name of the parent model resource.
Format: |
modelEvaluation | ModelEvaluation Required. Model evaluation resource to be imported. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluation | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The name of the parent model resource.
Format: |
modelEvaluation | ModelEvaluation Required. Model evaluation resource to be imported. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModelEvaluation | A Task containing the RPC response. |
// 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);
ListModelEvaluations(ListModelEvaluationsRequest, CallSettings)
public virtual PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluations(ListModelEvaluationsRequest request, CallSettings callSettings = null)
Lists ModelEvaluations in a Model.
Parameters | |
---|---|
Name | Description |
request | ListModelEvaluationsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListModelEvaluationsResponseModelEvaluation | A pageable sequence of ModelEvaluation resources. |
// 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 | |
---|---|
Name | Description |
parent | ModelName Required. The resource name of the Model to list the ModelEvaluations from.
Format: |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListModelEvaluationsResponseModelEvaluation | A pageable sequence of ModelEvaluation resources. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The resource name of the Model to list the ModelEvaluations from.
Format: |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListModelEvaluationsResponseModelEvaluation | A pageable sequence of ModelEvaluation resources. |
// 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 | |
---|---|
Name | Description |
request | ListModelEvaluationsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListModelEvaluationsResponseModelEvaluation | A pageable asynchronous sequence of ModelEvaluation resources. |
// 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 | |
---|---|
Name | Description |
parent | ModelName Required. The resource name of the Model to list the ModelEvaluations from.
Format: |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListModelEvaluationsResponseModelEvaluation | A pageable asynchronous sequence of ModelEvaluation resources. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The resource name of the Model to list the ModelEvaluations from.
Format: |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListModelEvaluationsResponseModelEvaluation | A pageable asynchronous sequence of ModelEvaluation resources. |
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]";
// Make the request
PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> response = modelServiceClient.ListModelEvaluationsAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ModelEvaluation item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListModelEvaluationsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ModelEvaluation item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluation> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluation item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListModelEvaluationSlices(ListModelEvaluationSlicesRequest, CallSettings)
public virtual PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlices(ListModelEvaluationSlicesRequest request, CallSettings callSettings = null)
Lists ModelEvaluationSlices in a ModelEvaluation.
Parameters | |
---|---|
Name | Description |
request | ListModelEvaluationSlicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice | A pageable sequence of ModelEvaluationSlice resources. |
// 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 | |
---|---|
Name | Description |
parent | ModelEvaluationName Required. The resource name of the ModelEvaluation to list the
ModelEvaluationSlices from. Format:
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice | A pageable sequence of ModelEvaluationSlice resources. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The resource name of the ModelEvaluation to list the
ModelEvaluationSlices from. Format:
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice | A pageable sequence of ModelEvaluationSlice resources. |
// 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 | |
---|---|
Name | Description |
request | ListModelEvaluationSlicesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice | A pageable asynchronous sequence of ModelEvaluationSlice resources. |
// 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 | |
---|---|
Name | Description |
parent | ModelEvaluationName Required. The resource name of the ModelEvaluation to list the
ModelEvaluationSlices from. Format:
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice | A pageable asynchronous sequence of ModelEvaluationSlice resources. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The resource name of the ModelEvaluation to list the
ModelEvaluationSlices from. Format:
|
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListModelEvaluationSlicesResponseModelEvaluationSlice | A pageable asynchronous sequence of ModelEvaluationSlice resources. |
// Create client
ModelServiceClient modelServiceClient = await ModelServiceClient.CreateAsync();
// Initialize request argument(s)
string parent = "projects/[PROJECT]/locations/[LOCATION]/models/[MODEL]/evaluations/[EVALUATION]";
// Make the request
PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> response = modelServiceClient.ListModelEvaluationSlicesAsync(parent);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((ModelEvaluationSlice item) =>
{
// Do something with each item
Console.WriteLine(item);
});
// Or iterate over pages (of server-defined size), performing one RPC per page
await response.AsRawResponses().ForEachAsync((ListModelEvaluationSlicesResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (ModelEvaluationSlice item in page)
{
// Do something with each item
Console.WriteLine(item);
}
});
// Or retrieve a single page of known size (unless it's the final page), performing as many RPCs as required
int pageSize = 10;
Page<ModelEvaluationSlice> singlePage = await response.ReadPageAsync(pageSize);
// Do something with the page of items
Console.WriteLine($"A page of {pageSize} results (unless it's the final page):");
foreach (ModelEvaluationSlice item in singlePage)
{
// Do something with each item
Console.WriteLine(item);
}
// Store the pageToken, for when the next page is required.
string nextPageToken = singlePage.NextPageToken;
ListModels(LocationName, string, 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 | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the Location to list the Models from.
Format: |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListModelsResponseModel | A pageable sequence of Model resources. |
// 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 | |
---|---|
Name | Description |
request | ListModelsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListModelsResponseModel | A pageable sequence of Model resources. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The resource name of the Location to list the Models from.
Format: |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListModelsResponseModel | A pageable sequence of Model resources. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the Location to list the Models from.
Format: |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListModelsResponseModel | A pageable asynchronous sequence of Model resources. |
// 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 | |
---|---|
Name | Description |
request | ListModelsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListModelsResponseModel | A pageable asynchronous sequence of Model resources. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The resource name of the Location to list the Models from.
Format: |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListModelsResponseModel | A pageable asynchronous sequence of Model resources. |
// 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;
ListModelVersions(ListModelVersionsRequest, CallSettings)
public virtual PagedEnumerable<ListModelVersionsResponse, Model> ListModelVersions(ListModelVersionsRequest request, CallSettings callSettings = null)
Lists versions of the specified model.
Parameters | |
---|---|
Name | Description |
request | ListModelVersionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListModelVersionsResponseModel | A pageable sequence of Model resources. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the model to list versions for. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListModelVersionsResponseModel | A pageable sequence of Model resources. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the model to list versions for. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListModelVersionsResponseModel | A pageable sequence of Model resources. |
// 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 | |
---|---|
Name | Description |
request | ListModelVersionsRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListModelVersionsResponseModel | A pageable asynchronous sequence of Model resources. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the model to list versions for. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListModelVersionsResponseModel | A pageable asynchronous sequence of Model resources. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the model to list versions for. |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListModelVersionsResponseModel | A pageable asynchronous sequence of Model resources. |
// 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;
MergeVersionAliases(MergeVersionAliasesRequest, CallSettings)
public virtual Model MergeVersionAliases(MergeVersionAliasesRequest request, CallSettings callSettings = null)
Merges a set of aliases for a Model version.
Parameters | |
---|---|
Name | Description |
request | MergeVersionAliasesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Model | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the model version to merge aliases, with a version ID explicitly included. Example: |
versionAliases | IEnumerablestring Required. The set of version aliases to merge.
The alias should be at most 128 characters, and match
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. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Model | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the model version to merge aliases, with a version ID explicitly included. Example: |
versionAliases | IEnumerablestring Required. The set of version aliases to merge.
The alias should be at most 128 characters, and match
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. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Model | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | MergeVersionAliasesRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | MergeVersionAliasesRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the model version to merge aliases, with a version ID explicitly included. Example: |
versionAliases | IEnumerablestring Required. The set of version aliases to merge.
The alias should be at most 128 characters, and match
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. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | ModelName Required. The name of the model version to merge aliases, with a version ID explicitly included. Example: |
versionAliases | IEnumerablestring Required. The set of version aliases to merge.
The alias should be at most 128 characters, and match
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. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the model version to merge aliases, with a version ID explicitly included. Example: |
versionAliases | IEnumerablestring Required. The set of version aliases to merge.
The alias should be at most 128 characters, and match
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. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The name of the model version to merge aliases, with a version ID explicitly included. Example: |
versionAliases | IEnumerablestring Required. The set of version aliases to merge.
The alias should be at most 128 characters, and match
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. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationExportModelResponseExportModelOperationMetadata | 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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
operationName | string The name of a previously invoked operation. Must not be |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Type | Description |
Task | A task representing the asynchronous shutdown operation. |
After calling this method, further calls to Create() and CreateAsync(CancellationToken) will create new channels, which could in turn be shut down by another call to this method.
UpdateModel(Model, FieldMask, CallSettings)
public virtual Model UpdateModel(Model model, FieldMask updateMask, CallSettings callSettings = null)
Updates a Model.
Parameters | |
---|---|
Name | Description |
model | Model 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.
|
updateMask | FieldMask Required. The update mask applies to the resource.
For the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Model | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Model | The RPC response. |
// 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 | |
---|---|
Name | Description |
model | Model 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.
|
updateMask | FieldMask Required. The update mask applies to the resource.
For the |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
model | Model 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.
|
updateMask | FieldMask Required. The update mask applies to the resource.
For the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateModelRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskModel | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the Location into which to upload the Model.
Format: |
model | Model Required. The Model to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationUploadModelResponseUploadModelOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | UploadModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationUploadModelResponseUploadModelOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The resource name of the Location into which to upload the Model.
Format: |
model | Model Required. The Model to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationUploadModelResponseUploadModelOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the Location into which to upload the Model.
Format: |
model | Model Required. The Model to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationUploadModelResponseUploadModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | LocationName Required. The resource name of the Location into which to upload the Model.
Format: |
model | Model Required. The Model to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationUploadModelResponseUploadModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UploadModelRequest The request object containing all of the parameters for the API call. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationUploadModelResponseUploadModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UploadModelRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationUploadModelResponseUploadModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The resource name of the Location into which to upload the Model.
Format: |
model | Model Required. The Model to create. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationUploadModelResponseUploadModelOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
parent | string Required. The resource name of the Location into which to upload the Model.
Format: |
model | Model Required. The Model to create. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationUploadModelResponseUploadModelOperationMetadata | A Task containing the RPC response. |
// 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;
}