Vertex AI v1 API - Class DataFoundryServiceClient (3.45.0)

public abstract class DataFoundryServiceClient

Reference documentation and code samples for the Vertex AI v1 API class DataFoundryServiceClient.

DataFoundryService client wrapper, for convenient use.

Inheritance

object > DataFoundryServiceClient

Namespace

Google.Cloud.AIPlatform.V1

Assembly

Google.Cloud.AIPlatform.V1.dll

Remarks

Service for generating and preparing datasets for Gen AI evaluation.

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the DataFoundryService 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 DataFoundryService scopes.

Property Value
Type Description
IReadOnlyListstring
Remarks

The default DataFoundryService scopes are:

GrpcClient

public virtual DataFoundryService.DataFoundryServiceClient GrpcClient { get; }

The underlying gRPC DataFoundryService client

Property Value
Type Description
DataFoundryServiceDataFoundryServiceClient

IAMPolicyClient

public virtual IAMPolicyClient IAMPolicyClient { get; }

The IAMPolicyClient associated with this client.

Property Value
Type Description
IAMPolicyClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
Type Description
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
Type Description
ServiceMetadata

Methods

Create()

public static DataFoundryServiceClient Create()

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

Returns
Type Description
DataFoundryServiceClient

The created DataFoundryServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
Name Description
cancellationToken CancellationToken

The CancellationToken to use while creating the client.

Returns
Type Description
TaskDataFoundryServiceClient

The task representing the created DataFoundryServiceClient.

GenerateSyntheticData(GenerateSyntheticDataRequest, CallSettings)

public virtual GenerateSyntheticDataResponse GenerateSyntheticData(GenerateSyntheticDataRequest request, CallSettings callSettings = null)

Generates synthetic data based on the provided configuration.

Parameters
Name Description
request GenerateSyntheticDataRequest

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
GenerateSyntheticDataResponse

The RPC response.

Example
// Create client
DataFoundryServiceClient dataFoundryServiceClient = DataFoundryServiceClient.Create();
// Initialize request argument(s)
GenerateSyntheticDataRequest request = new GenerateSyntheticDataRequest
{
    LocationAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Count = 0,
    TaskDescription = new TaskDescriptionStrategy(),
    OutputFieldSpecs =
    {
        new OutputFieldSpec(),
    },
    Examples =
    {
        new SyntheticExample(),
    },
};
// Make the request
GenerateSyntheticDataResponse response = dataFoundryServiceClient.GenerateSyntheticData(request);

GenerateSyntheticDataAsync(GenerateSyntheticDataRequest, CallSettings)

public virtual Task<GenerateSyntheticDataResponse> GenerateSyntheticDataAsync(GenerateSyntheticDataRequest request, CallSettings callSettings = null)

Generates synthetic data based on the provided configuration.

Parameters
Name Description
request GenerateSyntheticDataRequest

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
TaskGenerateSyntheticDataResponse

A Task containing the RPC response.

Example
// Create client
DataFoundryServiceClient dataFoundryServiceClient = await DataFoundryServiceClient.CreateAsync();
// Initialize request argument(s)
GenerateSyntheticDataRequest request = new GenerateSyntheticDataRequest
{
    LocationAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Count = 0,
    TaskDescription = new TaskDescriptionStrategy(),
    OutputFieldSpecs =
    {
        new OutputFieldSpec(),
    },
    Examples =
    {
        new SyntheticExample(),
    },
};
// Make the request
GenerateSyntheticDataResponse response = await dataFoundryServiceClient.GenerateSyntheticDataAsync(request);

GenerateSyntheticDataAsync(GenerateSyntheticDataRequest, CancellationToken)

public virtual Task<GenerateSyntheticDataResponse> GenerateSyntheticDataAsync(GenerateSyntheticDataRequest request, CancellationToken cancellationToken)

Generates synthetic data based on the provided configuration.

Parameters
Name Description
request GenerateSyntheticDataRequest

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

cancellationToken CancellationToken

A CancellationToken to use for this RPC.

Returns
Type Description
TaskGenerateSyntheticDataResponse

A Task containing the RPC response.

Example
// Create client
DataFoundryServiceClient dataFoundryServiceClient = await DataFoundryServiceClient.CreateAsync();
// Initialize request argument(s)
GenerateSyntheticDataRequest request = new GenerateSyntheticDataRequest
{
    LocationAsLocationName = LocationName.FromProjectLocation("[PROJECT]", "[LOCATION]"),
    Count = 0,
    TaskDescription = new TaskDescriptionStrategy(),
    OutputFieldSpecs =
    {
        new OutputFieldSpec(),
    },
    Examples =
    {
        new SyntheticExample(),
    },
};
// Make the request
GenerateSyntheticDataResponse response = await dataFoundryServiceClient.GenerateSyntheticDataAsync(request);

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.

Remarks

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