Cloud Document AI v1beta3 API - Class DocumentServiceClient (2.0.0-beta11)

public abstract class DocumentServiceClient

Reference documentation and code samples for the Cloud Document AI v1beta3 API class DocumentServiceClient.

DocumentService client wrapper, for convenient use.

Inheritance

object > DocumentServiceClient

Namespace

Google.Cloud.DocumentAI.V1Beta3

Assembly

Google.Cloud.DocumentAI.V1Beta3.dll

Remarks

Service to call Cloud DocumentAI to manage document collection (dataset).

Properties

DefaultEndpoint

public static string DefaultEndpoint { get; }

The default endpoint for the DocumentService service, which is a host of "documentai.googleapis.com" and a port of 443.

Property Value
TypeDescription
string

DefaultScopes

public static IReadOnlyList<string> DefaultScopes { get; }

The default DocumentService scopes.

Property Value
TypeDescription
IReadOnlyListstring
Remarks

The default DocumentService scopes are:

GrpcClient

public virtual DocumentService.DocumentServiceClient GrpcClient { get; }

The underlying gRPC DocumentService client

Property Value
TypeDescription
DocumentServiceDocumentServiceClient

LocationsClient

public virtual LocationsClient LocationsClient { get; }

The LocationsClient associated with this client.

Property Value
TypeDescription
LocationsClient

ServiceMetadata

public static ServiceMetadata ServiceMetadata { get; }

The service metadata associated with this client type.

Property Value
TypeDescription
ServiceMetadata

UpdateDatasetOperationsClient

public virtual OperationsClient UpdateDatasetOperationsClient { get; }

The long-running operations client for UpdateDataset.

Property Value
TypeDescription
OperationsClient

Methods

Create()

public static DocumentServiceClient Create()

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

Returns
TypeDescription
DocumentServiceClient

The created DocumentServiceClient.

CreateAsync(CancellationToken)

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

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

Parameter
NameDescription
cancellationTokenCancellationToken

The CancellationToken to use while creating the client.

Returns
TypeDescription
TaskDocumentServiceClient

The task representing the created DocumentServiceClient.

GetDatasetSchema(DatasetSchemaName, CallSettings)

public virtual DatasetSchema GetDatasetSchema(DatasetSchemaName name, CallSettings callSettings = null)

Gets the DatasetSchema of a Dataset.

Parameters
NameDescription
nameDatasetSchemaName

Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DatasetSchema

The RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
DatasetSchemaName name = DatasetSchemaName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
// Make the request
DatasetSchema response = documentServiceClient.GetDatasetSchema(name);

GetDatasetSchema(GetDatasetSchemaRequest, CallSettings)

public virtual DatasetSchema GetDatasetSchema(GetDatasetSchemaRequest request, CallSettings callSettings = null)

Gets the DatasetSchema of a Dataset.

Parameters
NameDescription
requestGetDatasetSchemaRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DatasetSchema

The RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
GetDatasetSchemaRequest request = new GetDatasetSchemaRequest
{
    DatasetSchemaName = DatasetSchemaName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]"),
    VisibleFieldsOnly = false,
};
// Make the request
DatasetSchema response = documentServiceClient.GetDatasetSchema(request);

GetDatasetSchema(string, CallSettings)

public virtual DatasetSchema GetDatasetSchema(string name, CallSettings callSettings = null)

Gets the DatasetSchema of a Dataset.

Parameters
NameDescription
namestring

Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DatasetSchema

The RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/processors/[PROCESSOR]/dataset/datasetSchema";
// Make the request
DatasetSchema response = documentServiceClient.GetDatasetSchema(name);

GetDatasetSchemaAsync(DatasetSchemaName, CallSettings)

public virtual Task<DatasetSchema> GetDatasetSchemaAsync(DatasetSchemaName name, CallSettings callSettings = null)

Gets the DatasetSchema of a Dataset.

Parameters
NameDescription
nameDatasetSchemaName

Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskDatasetSchema

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
DatasetSchemaName name = DatasetSchemaName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
// Make the request
DatasetSchema response = await documentServiceClient.GetDatasetSchemaAsync(name);

GetDatasetSchemaAsync(DatasetSchemaName, CancellationToken)

public virtual Task<DatasetSchema> GetDatasetSchemaAsync(DatasetSchemaName name, CancellationToken cancellationToken)

Gets the DatasetSchema of a Dataset.

Parameters
NameDescription
nameDatasetSchemaName

Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskDatasetSchema

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
DatasetSchemaName name = DatasetSchemaName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
// Make the request
DatasetSchema response = await documentServiceClient.GetDatasetSchemaAsync(name);

GetDatasetSchemaAsync(GetDatasetSchemaRequest, CallSettings)

public virtual Task<DatasetSchema> GetDatasetSchemaAsync(GetDatasetSchemaRequest request, CallSettings callSettings = null)

Gets the DatasetSchema of a Dataset.

Parameters
NameDescription
requestGetDatasetSchemaRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskDatasetSchema

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
GetDatasetSchemaRequest request = new GetDatasetSchemaRequest
{
    DatasetSchemaName = DatasetSchemaName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]"),
    VisibleFieldsOnly = false,
};
// Make the request
DatasetSchema response = await documentServiceClient.GetDatasetSchemaAsync(request);

GetDatasetSchemaAsync(GetDatasetSchemaRequest, CancellationToken)

public virtual Task<DatasetSchema> GetDatasetSchemaAsync(GetDatasetSchemaRequest request, CancellationToken cancellationToken)

Gets the DatasetSchema of a Dataset.

Parameters
NameDescription
requestGetDatasetSchemaRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskDatasetSchema

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
GetDatasetSchemaRequest request = new GetDatasetSchemaRequest
{
    DatasetSchemaName = DatasetSchemaName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]"),
    VisibleFieldsOnly = false,
};
// Make the request
DatasetSchema response = await documentServiceClient.GetDatasetSchemaAsync(request);

GetDatasetSchemaAsync(string, CallSettings)

public virtual Task<DatasetSchema> GetDatasetSchemaAsync(string name, CallSettings callSettings = null)

Gets the DatasetSchema of a Dataset.

Parameters
NameDescription
namestring

Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskDatasetSchema

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/processors/[PROCESSOR]/dataset/datasetSchema";
// Make the request
DatasetSchema response = await documentServiceClient.GetDatasetSchemaAsync(name);

GetDatasetSchemaAsync(string, CancellationToken)

public virtual Task<DatasetSchema> GetDatasetSchemaAsync(string name, CancellationToken cancellationToken)

Gets the DatasetSchema of a Dataset.

Parameters
NameDescription
namestring

Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskDatasetSchema

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
string name = "projects/[PROJECT]/locations/[LOCATION]/processors/[PROCESSOR]/dataset/datasetSchema";
// Make the request
DatasetSchema response = await documentServiceClient.GetDatasetSchemaAsync(name);

PollOnceUpdateDataset(string, CallSettings)

public virtual Operation<Dataset, UpdateDatasetOperationMetadata> PollOnceUpdateDataset(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationDatasetUpdateDatasetOperationMetadata

The result of polling the operation.

PollOnceUpdateDatasetAsync(string, CallSettings)

public virtual Task<Operation<Dataset, UpdateDatasetOperationMetadata>> PollOnceUpdateDatasetAsync(string operationName, CallSettings callSettings = null)

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

Parameters
NameDescription
operationNamestring

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationDatasetUpdateDatasetOperationMetadata

A task representing the result of polling the operation.

ShutdownDefaultChannelsAsync()

public static Task ShutdownDefaultChannelsAsync()

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

Returns
TypeDescription
Task

A task representing the asynchronous shutdown operation.

Remarks

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

UpdateDataset(Dataset, FieldMask, CallSettings)

public virtual Operation<Dataset, UpdateDatasetOperationMetadata> UpdateDataset(Dataset dataset, FieldMask updateMask, CallSettings callSettings = null)

Updates metadata associated with a dataset.

Parameters
NameDescription
datasetDataset

Required. The name field of the Dataset is used to identify the resource to be updated.

updateMaskFieldMask

The update mask applies to the resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationDatasetUpdateDatasetOperationMetadata

The RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
Dataset dataset = new Dataset();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Dataset, UpdateDatasetOperationMetadata> response = documentServiceClient.UpdateDataset(dataset, updateMask);

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

UpdateDataset(UpdateDatasetRequest, CallSettings)

public virtual Operation<Dataset, UpdateDatasetOperationMetadata> UpdateDataset(UpdateDatasetRequest request, CallSettings callSettings = null)

Updates metadata associated with a dataset.

Parameters
NameDescription
requestUpdateDatasetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
OperationDatasetUpdateDatasetOperationMetadata

The RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
UpdateDatasetRequest request = new UpdateDatasetRequest
{
    Dataset = new Dataset(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<Dataset, UpdateDatasetOperationMetadata> response = documentServiceClient.UpdateDataset(request);

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

UpdateDatasetAsync(Dataset, FieldMask, CallSettings)

public virtual Task<Operation<Dataset, UpdateDatasetOperationMetadata>> UpdateDatasetAsync(Dataset dataset, FieldMask updateMask, CallSettings callSettings = null)

Updates metadata associated with a dataset.

Parameters
NameDescription
datasetDataset

Required. The name field of the Dataset is used to identify the resource to be updated.

updateMaskFieldMask

The update mask applies to the resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationDatasetUpdateDatasetOperationMetadata

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
Dataset dataset = new Dataset();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Dataset, UpdateDatasetOperationMetadata> response = await documentServiceClient.UpdateDatasetAsync(dataset, updateMask);

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

UpdateDatasetAsync(Dataset, FieldMask, CancellationToken)

public virtual Task<Operation<Dataset, UpdateDatasetOperationMetadata>> UpdateDatasetAsync(Dataset dataset, FieldMask updateMask, CancellationToken cancellationToken)

Updates metadata associated with a dataset.

Parameters
NameDescription
datasetDataset

Required. The name field of the Dataset is used to identify the resource to be updated.

updateMaskFieldMask

The update mask applies to the resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationDatasetUpdateDatasetOperationMetadata

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
Dataset dataset = new Dataset();
FieldMask updateMask = new FieldMask();
// Make the request
Operation<Dataset, UpdateDatasetOperationMetadata> response = await documentServiceClient.UpdateDatasetAsync(dataset, updateMask);

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

UpdateDatasetAsync(UpdateDatasetRequest, CallSettings)

public virtual Task<Operation<Dataset, UpdateDatasetOperationMetadata>> UpdateDatasetAsync(UpdateDatasetRequest request, CallSettings callSettings = null)

Updates metadata associated with a dataset.

Parameters
NameDescription
requestUpdateDatasetRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskOperationDatasetUpdateDatasetOperationMetadata

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateDatasetRequest request = new UpdateDatasetRequest
{
    Dataset = new Dataset(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<Dataset, UpdateDatasetOperationMetadata> response = await documentServiceClient.UpdateDatasetAsync(request);

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

UpdateDatasetAsync(UpdateDatasetRequest, CancellationToken)

public virtual Task<Operation<Dataset, UpdateDatasetOperationMetadata>> UpdateDatasetAsync(UpdateDatasetRequest request, CancellationToken cancellationToken)

Updates metadata associated with a dataset.

Parameters
NameDescription
requestUpdateDatasetRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskOperationDatasetUpdateDatasetOperationMetadata

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateDatasetRequest request = new UpdateDatasetRequest
{
    Dataset = new Dataset(),
    UpdateMask = new FieldMask(),
};
// Make the request
Operation<Dataset, UpdateDatasetOperationMetadata> response = await documentServiceClient.UpdateDatasetAsync(request);

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

UpdateDatasetSchema(DatasetSchema, FieldMask, CallSettings)

public virtual DatasetSchema UpdateDatasetSchema(DatasetSchema datasetSchema, FieldMask updateMask, CallSettings callSettings = null)

Updates a DatasetSchema.

Parameters
NameDescription
datasetSchemaDatasetSchema

Required. The name field of the DatasetSchema is used to identify the resource to be updated.

updateMaskFieldMask

The update mask applies to the resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DatasetSchema

The RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
DatasetSchema datasetSchema = new DatasetSchema();
FieldMask updateMask = new FieldMask();
// Make the request
DatasetSchema response = documentServiceClient.UpdateDatasetSchema(datasetSchema, updateMask);

UpdateDatasetSchema(UpdateDatasetSchemaRequest, CallSettings)

public virtual DatasetSchema UpdateDatasetSchema(UpdateDatasetSchemaRequest request, CallSettings callSettings = null)

Updates a DatasetSchema.

Parameters
NameDescription
requestUpdateDatasetSchemaRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
DatasetSchema

The RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
UpdateDatasetSchemaRequest request = new UpdateDatasetSchemaRequest
{
    DatasetSchema = new DatasetSchema(),
    UpdateMask = new FieldMask(),
};
// Make the request
DatasetSchema response = documentServiceClient.UpdateDatasetSchema(request);

UpdateDatasetSchemaAsync(DatasetSchema, FieldMask, CallSettings)

public virtual Task<DatasetSchema> UpdateDatasetSchemaAsync(DatasetSchema datasetSchema, FieldMask updateMask, CallSettings callSettings = null)

Updates a DatasetSchema.

Parameters
NameDescription
datasetSchemaDatasetSchema

Required. The name field of the DatasetSchema is used to identify the resource to be updated.

updateMaskFieldMask

The update mask applies to the resource.

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskDatasetSchema

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
DatasetSchema datasetSchema = new DatasetSchema();
FieldMask updateMask = new FieldMask();
// Make the request
DatasetSchema response = await documentServiceClient.UpdateDatasetSchemaAsync(datasetSchema, updateMask);

UpdateDatasetSchemaAsync(DatasetSchema, FieldMask, CancellationToken)

public virtual Task<DatasetSchema> UpdateDatasetSchemaAsync(DatasetSchema datasetSchema, FieldMask updateMask, CancellationToken cancellationToken)

Updates a DatasetSchema.

Parameters
NameDescription
datasetSchemaDatasetSchema

Required. The name field of the DatasetSchema is used to identify the resource to be updated.

updateMaskFieldMask

The update mask applies to the resource.

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskDatasetSchema

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
DatasetSchema datasetSchema = new DatasetSchema();
FieldMask updateMask = new FieldMask();
// Make the request
DatasetSchema response = await documentServiceClient.UpdateDatasetSchemaAsync(datasetSchema, updateMask);

UpdateDatasetSchemaAsync(UpdateDatasetSchemaRequest, CallSettings)

public virtual Task<DatasetSchema> UpdateDatasetSchemaAsync(UpdateDatasetSchemaRequest request, CallSettings callSettings = null)

Updates a DatasetSchema.

Parameters
NameDescription
requestUpdateDatasetSchemaRequest

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

callSettingsCallSettings

If not null, applies overrides to this RPC call.

Returns
TypeDescription
TaskDatasetSchema

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateDatasetSchemaRequest request = new UpdateDatasetSchemaRequest
{
    DatasetSchema = new DatasetSchema(),
    UpdateMask = new FieldMask(),
};
// Make the request
DatasetSchema response = await documentServiceClient.UpdateDatasetSchemaAsync(request);

UpdateDatasetSchemaAsync(UpdateDatasetSchemaRequest, CancellationToken)

public virtual Task<DatasetSchema> UpdateDatasetSchemaAsync(UpdateDatasetSchemaRequest request, CancellationToken cancellationToken)

Updates a DatasetSchema.

Parameters
NameDescription
requestUpdateDatasetSchemaRequest

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

cancellationTokenCancellationToken

A CancellationToken to use for this RPC.

Returns
TypeDescription
TaskDatasetSchema

A Task containing the RPC response.

Example
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
UpdateDatasetSchemaRequest request = new UpdateDatasetSchemaRequest
{
    DatasetSchema = new DatasetSchema(),
    UpdateMask = new FieldMask(),
};
// Make the request
DatasetSchema response = await documentServiceClient.UpdateDatasetSchemaAsync(request);