- 3.13.0 (latest)
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 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
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
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 |
IReadOnlyList<String> |
The default ModelService scopes are:
DeleteModelOperationsClient
public virtual OperationsClient DeleteModelOperationsClient { get; }
The long-running operations client for DeleteModel
.
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 |
ModelService.ModelServiceClient |
UploadModelOperationsClient
public virtual OperationsClient UploadModelOperationsClient { get; }
The long-running operations client for UploadModel
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
Create()
public static ModelServiceClient Create()
Synchronously creates a ModelServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ModelServiceClientBuilder.
Returns | |
---|---|
Type | Description |
ModelServiceClient | The created ModelServiceClient. |
CreateAsync(CancellationToken)
public static Task<ModelServiceClient> CreateAsync(CancellationToken cancellationToken = default(CancellationToken))
Asynchronously creates a ModelServiceClient using the default credentials, endpoint and settings. To specify custom credentials or other settings, use ModelServiceClientBuilder.
Parameter | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
Task<ModelServiceClient> | The task representing the created ModelServiceClient. |
DeleteModel(DeleteModelRequest, CallSettings)
public virtual Operation<Empty, DeleteOperationMetadata> DeleteModel(DeleteModelRequest request, CallSettings callSettings = null)
Deletes a Model.
Model can only be deleted if there are no [DeployedModels][] created from it.
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 |
Operation<Empty, DeleteOperationMetadata> | 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.
Model can only be deleted if there are no [DeployedModels][] created from it.
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 |
Operation<Empty, DeleteOperationMetadata> | 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.
Model can only be deleted if there are no [DeployedModels][] created from it.
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 |
Operation<Empty, DeleteOperationMetadata> | 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.
Model can only be deleted if there are no [DeployedModels][] created from it.
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 |
Task<Operation<Empty, DeleteOperationMetadata>> | 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.
Model can only be deleted if there are no [DeployedModels][] created from it.
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 |
Task<Operation<Empty, DeleteOperationMetadata>> | 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.
Model can only be deleted if there are no [DeployedModels][] created from it.
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 |
Task<Operation<Empty, DeleteOperationMetadata>> | 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.
Model can only be deleted if there are no [DeployedModels][] created from it.
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 |
Task<Operation<Empty, DeleteOperationMetadata>> | 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.
Model can only be deleted if there are no [DeployedModels][] created from it.
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 |
Task<Operation<Empty, DeleteOperationMetadata>> | 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.
Model can only be deleted if there are no [DeployedModels][] created from it.
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 |
Task<Operation<Empty, DeleteOperationMetadata>> | 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;
}
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 |
Operation<ExportModelResponse, ExportModelOperationMetadata> | 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, ExportModelRequest.Types.OutputConfig, CallSettings)
public virtual Operation<ExportModelResponse, ExportModelOperationMetadata> ExportModel(ModelName name, ExportModelRequest.Types.OutputConfig outputConfig, CallSettings callSettings = null)
Exports a trained, exportable, Model to a location specified by the user. A Model is considered to be exportable if it has at least one [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats].
Parameters | |
---|---|
Name | Description |
name | ModelName Required. The resource name of the Model to export. |
outputConfig | ExportModelRequest.Types.OutputConfig Required. The desired output location and configuration. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ExportModelResponse, ExportModelOperationMetadata> | 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, ExportModelRequest.Types.OutputConfig, CallSettings)
public virtual Operation<ExportModelResponse, ExportModelOperationMetadata> ExportModel(string name, ExportModelRequest.Types.OutputConfig outputConfig, CallSettings callSettings = null)
Exports a trained, exportable, Model to a location specified by the user. A Model is considered to be exportable if it has at least one [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats].
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the Model to export. |
outputConfig | ExportModelRequest.Types.OutputConfig Required. The desired output location and configuration. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Operation<ExportModelResponse, ExportModelOperationMetadata> | 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 |
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> | 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 |
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> | 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, ExportModelRequest.Types.OutputConfig, CallSettings)
public virtual Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> ExportModelAsync(ModelName name, ExportModelRequest.Types.OutputConfig outputConfig, CallSettings callSettings = null)
Exports a trained, exportable, Model to a location specified by the user. A Model is considered to be exportable if it has at least one [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats].
Parameters | |
---|---|
Name | Description |
name | ModelName Required. The resource name of the Model to export. |
outputConfig | ExportModelRequest.Types.OutputConfig Required. The desired output location and configuration. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> | 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, ExportModelRequest.Types.OutputConfig, CancellationToken)
public virtual Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> ExportModelAsync(ModelName name, ExportModelRequest.Types.OutputConfig outputConfig, CancellationToken cancellationToken)
Exports a trained, exportable, Model to a location specified by the user. A Model is considered to be exportable if it has at least one [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats].
Parameters | |
---|---|
Name | Description |
name | ModelName Required. The resource name of the Model to export. |
outputConfig | ExportModelRequest.Types.OutputConfig Required. The desired output location and configuration. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> | 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, ExportModelRequest.Types.OutputConfig, CallSettings)
public virtual Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> ExportModelAsync(string name, ExportModelRequest.Types.OutputConfig outputConfig, CallSettings callSettings = null)
Exports a trained, exportable, Model to a location specified by the user. A Model is considered to be exportable if it has at least one [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats].
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the Model to export. |
outputConfig | ExportModelRequest.Types.OutputConfig Required. The desired output location and configuration. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> | 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, ExportModelRequest.Types.OutputConfig, CancellationToken)
public virtual Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> ExportModelAsync(string name, ExportModelRequest.Types.OutputConfig outputConfig, CancellationToken cancellationToken)
Exports a trained, exportable, Model to a location specified by the user. A Model is considered to be exportable if it has at least one [supported export format][google.cloud.aiplatform.v1.Model.supported_export_formats].
Parameters | |
---|---|
Name | Description |
name | String Required. The resource name of the Model to export. |
outputConfig | ExportModelRequest.Types.OutputConfig Required. The desired output location and configuration. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> | 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: |
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: |
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 |
Task<Model> | 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 |
Task<Model> | 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: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Model> | 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: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Model> | 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: |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
Task<Model> | 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: |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Model> | 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 |
Task<ModelEvaluation> | 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 |
Task<ModelEvaluation> | 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 |
Task<ModelEvaluation> | 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 |
Task<ModelEvaluation> | 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 |
Task<ModelEvaluation> | 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 |
Task<ModelEvaluation> | 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 |
Task<ModelEvaluationSlice> | 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 |
Task<ModelEvaluationSlice> | 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 |
Task<ModelEvaluationSlice> | 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 |
Task<ModelEvaluationSlice> | 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 |
Task<ModelEvaluationSlice> | 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 |
Task<ModelEvaluationSlice> | 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);
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 |
PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> | 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluations(ModelName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ModelEvaluations in a Model.
Parameters | |
---|---|
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 | Nullable<Int32> 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 |
PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> | 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluations(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ModelEvaluations in a Model.
Parameters | |
---|---|
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 | Nullable<Int32> 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 |
PagedEnumerable<ListModelEvaluationsResponse, ModelEvaluation> | 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 |
PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> | 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluationsAsync(ModelName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ModelEvaluations in a Model.
Parameters | |
---|---|
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 | Nullable<Int32> 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 |
PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> | 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> ListModelEvaluationsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ModelEvaluations in a Model.
Parameters | |
---|---|
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 | Nullable<Int32> 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 |
PagedAsyncEnumerable<ListModelEvaluationsResponse, ModelEvaluation> | 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 |
PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> | 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlices(ModelEvaluationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ModelEvaluationSlices in a ModelEvaluation.
Parameters | |
---|---|
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 | Nullable<Int32> 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 |
PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> | 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlices(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ModelEvaluationSlices in a ModelEvaluation.
Parameters | |
---|---|
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 | Nullable<Int32> 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 |
PagedEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> | 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 |
PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> | 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlicesAsync(ModelEvaluationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ModelEvaluationSlices in a ModelEvaluation.
Parameters | |
---|---|
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 | Nullable<Int32> 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 |
PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> | 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> ListModelEvaluationSlicesAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists ModelEvaluationSlices in a ModelEvaluation.
Parameters | |
---|---|
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 | Nullable<Int32> 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 |
PagedAsyncEnumerable<ListModelEvaluationSlicesResponse, ModelEvaluationSlice> | 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListModelsResponse, Model> ListModels(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists Models in a Location.
Parameters | |
---|---|
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 | Nullable<Int32> 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 |
PagedEnumerable<ListModelsResponse, Model> | 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 |
PagedEnumerable<ListModelsResponse, Model> | 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, Nullable<Int32>, CallSettings)
public virtual PagedEnumerable<ListModelsResponse, Model> ListModels(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists Models in a Location.
Parameters | |
---|---|
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 | Nullable<Int32> 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 |
PagedEnumerable<ListModelsResponse, Model> | 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListModelsResponse, Model> ListModelsAsync(LocationName parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists Models in a Location.
Parameters | |
---|---|
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 | Nullable<Int32> 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 |
PagedAsyncEnumerable<ListModelsResponse, Model> | 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 |
PagedAsyncEnumerable<ListModelsResponse, Model> | 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, Nullable<Int32>, CallSettings)
public virtual PagedAsyncEnumerable<ListModelsResponse, Model> ListModelsAsync(string parent, string pageToken = null, int? pageSize = default(int? ), CallSettings callSettings = null)
Lists Models in a Location.
Parameters | |
---|---|
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 | Nullable<Int32> 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 |
PagedAsyncEnumerable<ListModelsResponse, Model> | 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;
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 |
Operation<Empty, DeleteOperationMetadata> | The result of polling the operation. |
PollOnceDeleteModelAsync(String, CallSettings)
public virtual Task<Operation<Empty, DeleteOperationMetadata>> PollOnceDeleteModelAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
DeleteModel
.
Parameters | |
---|---|
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 |
Task<Operation<Empty, DeleteOperationMetadata>> | A task representing the result of polling the operation. |
PollOnceExportModel(String, CallSettings)
public virtual Operation<ExportModelResponse, ExportModelOperationMetadata> PollOnceExportModel(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of ExportModel
.
Parameters | |
---|---|
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 |
Operation<ExportModelResponse, ExportModelOperationMetadata> | The result of polling the operation. |
PollOnceExportModelAsync(String, CallSettings)
public virtual Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> PollOnceExportModelAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ExportModel
.
Parameters | |
---|---|
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 |
Task<Operation<ExportModelResponse, ExportModelOperationMetadata>> | A task representing the result of polling the operation. |
PollOnceUploadModel(String, CallSettings)
public virtual Operation<UploadModelResponse, UploadModelOperationMetadata> PollOnceUploadModel(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of UploadModel
.
Parameters | |
---|---|
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 |
Operation<UploadModelResponse, UploadModelOperationMetadata> | The result of polling the operation. |
PollOnceUploadModelAsync(String, CallSettings)
public virtual Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> PollOnceUploadModelAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
UploadModel
.
Parameters | |
---|---|
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 |
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> | A task representing the result of polling the operation. |
ShutdownDefaultChannelsAsync()
public static Task ShutdownDefaultChannelsAsync()
Shuts down any channels automatically created by Create() and CreateAsync(CancellationToken). Channels which weren't automatically created are not affected.
Returns | |
---|---|
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. |
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. |
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 |
Task<Model> | 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. |
updateMask | FieldMask Required. The update mask applies to the resource.
For the |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
Task<Model> | 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 |
Task<Model> | 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 |
Task<Model> | 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 |
Operation<UploadModelResponse, UploadModelOperationMetadata> | 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 |
Operation<UploadModelResponse, UploadModelOperationMetadata> | 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(),
};
// 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 |
Operation<UploadModelResponse, UploadModelOperationMetadata> | 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 |
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> | 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 |
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> | 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 |
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> | 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(),
};
// 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 |
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> | 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(),
};
// 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 |
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> | 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 |
Task<Operation<UploadModelResponse, UploadModelOperationMetadata>> | 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;
}