public abstract class DocumentServiceClient
Reference documentation and code samples for the Cloud Document AI v1beta3 API class DocumentServiceClient.
DocumentService client wrapper, for convenient use.
Derived Types
Namespace
Google.Cloud.DocumentAI.V1Beta3Assembly
Google.Cloud.DocumentAI.V1Beta3.dll
Remarks
Service to call Cloud DocumentAI to manage document collection (dataset).
Properties
BatchDeleteDocumentsOperationsClient
public virtual OperationsClient BatchDeleteDocumentsOperationsClient { get; }
The long-running operations client for BatchDeleteDocuments
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
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 | |
---|---|
Type | Description |
string |
DefaultScopes
public static IReadOnlyList<string> DefaultScopes { get; }
The default DocumentService scopes.
Property Value | |
---|---|
Type | Description |
IReadOnlyListstring |
The default DocumentService scopes are:
GrpcClient
public virtual DocumentService.DocumentServiceClient GrpcClient { get; }
The underlying gRPC DocumentService client
Property Value | |
---|---|
Type | Description |
DocumentServiceDocumentServiceClient |
ImportDocumentsOperationsClient
public virtual OperationsClient ImportDocumentsOperationsClient { get; }
The long-running operations client for ImportDocuments
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
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 |
UpdateDatasetOperationsClient
public virtual OperationsClient UpdateDatasetOperationsClient { get; }
The long-running operations client for UpdateDataset
.
Property Value | |
---|---|
Type | Description |
OperationsClient |
Methods
BatchDeleteDocuments(BatchDeleteDocumentsRequest, CallSettings)
public virtual Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> BatchDeleteDocuments(BatchDeleteDocumentsRequest request, CallSettings callSettings = null)
Deletes a set of documents.
Parameters | |
---|---|
Name | Description |
request | BatchDeleteDocumentsRequest 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 |
OperationBatchDeleteDocumentsResponseBatchDeleteDocumentsMetadata | The RPC response. |
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
BatchDeleteDocumentsRequest request = new BatchDeleteDocumentsRequest
{
Dataset = "",
DatasetDocuments = new BatchDatasetDocuments(),
};
// Make the request
Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> response = documentServiceClient.BatchDeleteDocuments(request);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchDeleteDocumentsResponse 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<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> retrievedResponse = documentServiceClient.PollOnceBatchDeleteDocuments(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteDocumentsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteDocuments(string, CallSettings)
public virtual Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> BatchDeleteDocuments(string dataset, CallSettings callSettings = null)
Deletes a set of documents.
Parameters | |
---|---|
Name | Description |
dataset | string Required. The dataset resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationBatchDeleteDocumentsResponseBatchDeleteDocumentsMetadata | The RPC response. |
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
string dataset = "";
// Make the request
Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> response = documentServiceClient.BatchDeleteDocuments(dataset);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
BatchDeleteDocumentsResponse 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<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> retrievedResponse = documentServiceClient.PollOnceBatchDeleteDocuments(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteDocumentsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteDocumentsAsync(BatchDeleteDocumentsRequest, CallSettings)
public virtual Task<Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>> BatchDeleteDocumentsAsync(BatchDeleteDocumentsRequest request, CallSettings callSettings = null)
Deletes a set of documents.
Parameters | |
---|---|
Name | Description |
request | BatchDeleteDocumentsRequest 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 |
TaskOperationBatchDeleteDocumentsResponseBatchDeleteDocumentsMetadata | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteDocumentsRequest request = new BatchDeleteDocumentsRequest
{
Dataset = "",
DatasetDocuments = new BatchDatasetDocuments(),
};
// Make the request
Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> response = await documentServiceClient.BatchDeleteDocumentsAsync(request);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchDeleteDocumentsResponse 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<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> retrievedResponse = await documentServiceClient.PollOnceBatchDeleteDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteDocumentsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteDocumentsAsync(BatchDeleteDocumentsRequest, CancellationToken)
public virtual Task<Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>> BatchDeleteDocumentsAsync(BatchDeleteDocumentsRequest request, CancellationToken cancellationToken)
Deletes a set of documents.
Parameters | |
---|---|
Name | Description |
request | BatchDeleteDocumentsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchDeleteDocumentsResponseBatchDeleteDocumentsMetadata | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
BatchDeleteDocumentsRequest request = new BatchDeleteDocumentsRequest
{
Dataset = "",
DatasetDocuments = new BatchDatasetDocuments(),
};
// Make the request
Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> response = await documentServiceClient.BatchDeleteDocumentsAsync(request);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchDeleteDocumentsResponse 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<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> retrievedResponse = await documentServiceClient.PollOnceBatchDeleteDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteDocumentsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteDocumentsAsync(string, CallSettings)
public virtual Task<Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>> BatchDeleteDocumentsAsync(string dataset, CallSettings callSettings = null)
Deletes a set of documents.
Parameters | |
---|---|
Name | Description |
dataset | string Required. The dataset resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchDeleteDocumentsResponseBatchDeleteDocumentsMetadata | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
string dataset = "";
// Make the request
Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> response = await documentServiceClient.BatchDeleteDocumentsAsync(dataset);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchDeleteDocumentsResponse 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<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> retrievedResponse = await documentServiceClient.PollOnceBatchDeleteDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteDocumentsResponse retrievedResult = retrievedResponse.Result;
}
BatchDeleteDocumentsAsync(string, CancellationToken)
public virtual Task<Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>> BatchDeleteDocumentsAsync(string dataset, CancellationToken cancellationToken)
Deletes a set of documents.
Parameters | |
---|---|
Name | Description |
dataset | string Required. The dataset resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationBatchDeleteDocumentsResponseBatchDeleteDocumentsMetadata | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
string dataset = "";
// Make the request
Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> response = await documentServiceClient.BatchDeleteDocumentsAsync(dataset);
// Poll until the returned long-running operation is complete
Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
BatchDeleteDocumentsResponse 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<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> retrievedResponse = await documentServiceClient.PollOnceBatchDeleteDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
BatchDeleteDocumentsResponse retrievedResult = retrievedResponse.Result;
}
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 | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
cancellationToken | CancellationToken The CancellationToken to use while creating the client. |
Returns | |
---|---|
Type | Description |
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 | |
---|---|
Name | Description |
name | DatasetSchemaName Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DatasetSchema | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetDatasetSchemaRequest 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 |
DatasetSchema | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DatasetSchema | The RPC response. |
// 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 | |
---|---|
Name | Description |
name | DatasetSchemaName Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDatasetSchema | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | DatasetSchemaName Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDatasetSchema | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetDatasetSchemaRequest 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 |
TaskDatasetSchema | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | GetDatasetSchemaRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDatasetSchema | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDatasetSchema | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
name | string Required. The dataset schema resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDatasetSchema | A Task containing the RPC response. |
// 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);
GetDocument(DatasetName, CallSettings)
public virtual GetDocumentResponse GetDocument(DatasetName dataset, CallSettings callSettings = null)
Returns relevant fields present in the requested document.
Parameters | |
---|---|
Name | Description |
dataset | DatasetName Required. The resource name of the dataset that the document belongs to . Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
GetDocumentResponse | The RPC response. |
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
DatasetName dataset = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
// Make the request
GetDocumentResponse response = documentServiceClient.GetDocument(dataset);
GetDocument(GetDocumentRequest, CallSettings)
public virtual GetDocumentResponse GetDocument(GetDocumentRequest request, CallSettings callSettings = null)
Returns relevant fields present in the requested document.
Parameters | |
---|---|
Name | Description |
request | GetDocumentRequest 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 |
GetDocumentResponse | The RPC response. |
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
GetDocumentRequest request = new GetDocumentRequest
{
DatasetAsDatasetName = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]"),
DocumentId = new DocumentId(),
ReadMask = new FieldMask(),
PageRange = new DocumentPageRange(),
};
// Make the request
GetDocumentResponse response = documentServiceClient.GetDocument(request);
GetDocument(string, CallSettings)
public virtual GetDocumentResponse GetDocument(string dataset, CallSettings callSettings = null)
Returns relevant fields present in the requested document.
Parameters | |
---|---|
Name | Description |
dataset | string Required. The resource name of the dataset that the document belongs to . Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
GetDocumentResponse | The RPC response. |
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
string dataset = "projects/[PROJECT]/locations/[LOCATION]/processors/[PROCESSOR]/dataset";
// Make the request
GetDocumentResponse response = documentServiceClient.GetDocument(dataset);
GetDocumentAsync(DatasetName, CallSettings)
public virtual Task<GetDocumentResponse> GetDocumentAsync(DatasetName dataset, CallSettings callSettings = null)
Returns relevant fields present in the requested document.
Parameters | |
---|---|
Name | Description |
dataset | DatasetName Required. The resource name of the dataset that the document belongs to . Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskGetDocumentResponse | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
DatasetName dataset = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
// Make the request
GetDocumentResponse response = await documentServiceClient.GetDocumentAsync(dataset);
GetDocumentAsync(DatasetName, CancellationToken)
public virtual Task<GetDocumentResponse> GetDocumentAsync(DatasetName dataset, CancellationToken cancellationToken)
Returns relevant fields present in the requested document.
Parameters | |
---|---|
Name | Description |
dataset | DatasetName Required. The resource name of the dataset that the document belongs to . Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskGetDocumentResponse | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
DatasetName dataset = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
// Make the request
GetDocumentResponse response = await documentServiceClient.GetDocumentAsync(dataset);
GetDocumentAsync(GetDocumentRequest, CallSettings)
public virtual Task<GetDocumentResponse> GetDocumentAsync(GetDocumentRequest request, CallSettings callSettings = null)
Returns relevant fields present in the requested document.
Parameters | |
---|---|
Name | Description |
request | GetDocumentRequest 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 |
TaskGetDocumentResponse | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
GetDocumentRequest request = new GetDocumentRequest
{
DatasetAsDatasetName = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]"),
DocumentId = new DocumentId(),
ReadMask = new FieldMask(),
PageRange = new DocumentPageRange(),
};
// Make the request
GetDocumentResponse response = await documentServiceClient.GetDocumentAsync(request);
GetDocumentAsync(GetDocumentRequest, CancellationToken)
public virtual Task<GetDocumentResponse> GetDocumentAsync(GetDocumentRequest request, CancellationToken cancellationToken)
Returns relevant fields present in the requested document.
Parameters | |
---|---|
Name | Description |
request | GetDocumentRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskGetDocumentResponse | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
GetDocumentRequest request = new GetDocumentRequest
{
DatasetAsDatasetName = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]"),
DocumentId = new DocumentId(),
ReadMask = new FieldMask(),
PageRange = new DocumentPageRange(),
};
// Make the request
GetDocumentResponse response = await documentServiceClient.GetDocumentAsync(request);
GetDocumentAsync(string, CallSettings)
public virtual Task<GetDocumentResponse> GetDocumentAsync(string dataset, CallSettings callSettings = null)
Returns relevant fields present in the requested document.
Parameters | |
---|---|
Name | Description |
dataset | string Required. The resource name of the dataset that the document belongs to . Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskGetDocumentResponse | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
string dataset = "projects/[PROJECT]/locations/[LOCATION]/processors/[PROCESSOR]/dataset";
// Make the request
GetDocumentResponse response = await documentServiceClient.GetDocumentAsync(dataset);
GetDocumentAsync(string, CancellationToken)
public virtual Task<GetDocumentResponse> GetDocumentAsync(string dataset, CancellationToken cancellationToken)
Returns relevant fields present in the requested document.
Parameters | |
---|---|
Name | Description |
dataset | string Required. The resource name of the dataset that the document belongs to . Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskGetDocumentResponse | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
string dataset = "projects/[PROJECT]/locations/[LOCATION]/processors/[PROCESSOR]/dataset";
// Make the request
GetDocumentResponse response = await documentServiceClient.GetDocumentAsync(dataset);
ImportDocuments(DatasetName, CallSettings)
public virtual Operation<ImportDocumentsResponse, ImportDocumentsMetadata> ImportDocuments(DatasetName dataset, CallSettings callSettings = null)
Import documents into a dataset.
Parameters | |
---|---|
Name | Description |
dataset | DatasetName Required. The dataset resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationImportDocumentsResponseImportDocumentsMetadata | The RPC response. |
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
DatasetName dataset = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
// Make the request
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> response = documentServiceClient.ImportDocuments(dataset);
// Poll until the returned long-running operation is complete
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ImportDocumentsResponse 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<ImportDocumentsResponse, ImportDocumentsMetadata> retrievedResponse = documentServiceClient.PollOnceImportDocuments(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ImportDocuments(ImportDocumentsRequest, CallSettings)
public virtual Operation<ImportDocumentsResponse, ImportDocumentsMetadata> ImportDocuments(ImportDocumentsRequest request, CallSettings callSettings = null)
Import documents into a dataset.
Parameters | |
---|---|
Name | Description |
request | ImportDocumentsRequest 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 |
OperationImportDocumentsResponseImportDocumentsMetadata | The RPC response. |
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
ImportDocumentsRequest request = new ImportDocumentsRequest
{
DatasetAsDatasetName = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]"),
BatchDocumentsImportConfigs =
{
new ImportDocumentsRequest.Types.BatchDocumentsImportConfig(),
},
};
// Make the request
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> response = documentServiceClient.ImportDocuments(request);
// Poll until the returned long-running operation is complete
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ImportDocumentsResponse 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<ImportDocumentsResponse, ImportDocumentsMetadata> retrievedResponse = documentServiceClient.PollOnceImportDocuments(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ImportDocuments(string, CallSettings)
public virtual Operation<ImportDocumentsResponse, ImportDocumentsMetadata> ImportDocuments(string dataset, CallSettings callSettings = null)
Import documents into a dataset.
Parameters | |
---|---|
Name | Description |
dataset | string Required. The dataset resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationImportDocumentsResponseImportDocumentsMetadata | The RPC response. |
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
string dataset = "projects/[PROJECT]/locations/[LOCATION]/processors/[PROCESSOR]/dataset";
// Make the request
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> response = documentServiceClient.ImportDocuments(dataset);
// Poll until the returned long-running operation is complete
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> completedResponse = response.PollUntilCompleted();
// Retrieve the operation result
ImportDocumentsResponse 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<ImportDocumentsResponse, ImportDocumentsMetadata> retrievedResponse = documentServiceClient.PollOnceImportDocuments(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ImportDocumentsAsync(DatasetName, CallSettings)
public virtual Task<Operation<ImportDocumentsResponse, ImportDocumentsMetadata>> ImportDocumentsAsync(DatasetName dataset, CallSettings callSettings = null)
Import documents into a dataset.
Parameters | |
---|---|
Name | Description |
dataset | DatasetName Required. The dataset resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationImportDocumentsResponseImportDocumentsMetadata | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
DatasetName dataset = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
// Make the request
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> response = await documentServiceClient.ImportDocumentsAsync(dataset);
// Poll until the returned long-running operation is complete
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportDocumentsResponse 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<ImportDocumentsResponse, ImportDocumentsMetadata> retrievedResponse = await documentServiceClient.PollOnceImportDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ImportDocumentsAsync(DatasetName, CancellationToken)
public virtual Task<Operation<ImportDocumentsResponse, ImportDocumentsMetadata>> ImportDocumentsAsync(DatasetName dataset, CancellationToken cancellationToken)
Import documents into a dataset.
Parameters | |
---|---|
Name | Description |
dataset | DatasetName Required. The dataset resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationImportDocumentsResponseImportDocumentsMetadata | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
DatasetName dataset = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
// Make the request
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> response = await documentServiceClient.ImportDocumentsAsync(dataset);
// Poll until the returned long-running operation is complete
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportDocumentsResponse 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<ImportDocumentsResponse, ImportDocumentsMetadata> retrievedResponse = await documentServiceClient.PollOnceImportDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ImportDocumentsAsync(ImportDocumentsRequest, CallSettings)
public virtual Task<Operation<ImportDocumentsResponse, ImportDocumentsMetadata>> ImportDocumentsAsync(ImportDocumentsRequest request, CallSettings callSettings = null)
Import documents into a dataset.
Parameters | |
---|---|
Name | Description |
request | ImportDocumentsRequest 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 |
TaskOperationImportDocumentsResponseImportDocumentsMetadata | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
ImportDocumentsRequest request = new ImportDocumentsRequest
{
DatasetAsDatasetName = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]"),
BatchDocumentsImportConfigs =
{
new ImportDocumentsRequest.Types.BatchDocumentsImportConfig(),
},
};
// Make the request
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> response = await documentServiceClient.ImportDocumentsAsync(request);
// Poll until the returned long-running operation is complete
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportDocumentsResponse 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<ImportDocumentsResponse, ImportDocumentsMetadata> retrievedResponse = await documentServiceClient.PollOnceImportDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ImportDocumentsAsync(ImportDocumentsRequest, CancellationToken)
public virtual Task<Operation<ImportDocumentsResponse, ImportDocumentsMetadata>> ImportDocumentsAsync(ImportDocumentsRequest request, CancellationToken cancellationToken)
Import documents into a dataset.
Parameters | |
---|---|
Name | Description |
request | ImportDocumentsRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationImportDocumentsResponseImportDocumentsMetadata | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
ImportDocumentsRequest request = new ImportDocumentsRequest
{
DatasetAsDatasetName = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]"),
BatchDocumentsImportConfigs =
{
new ImportDocumentsRequest.Types.BatchDocumentsImportConfig(),
},
};
// Make the request
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> response = await documentServiceClient.ImportDocumentsAsync(request);
// Poll until the returned long-running operation is complete
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportDocumentsResponse 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<ImportDocumentsResponse, ImportDocumentsMetadata> retrievedResponse = await documentServiceClient.PollOnceImportDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ImportDocumentsAsync(string, CallSettings)
public virtual Task<Operation<ImportDocumentsResponse, ImportDocumentsMetadata>> ImportDocumentsAsync(string dataset, CallSettings callSettings = null)
Import documents into a dataset.
Parameters | |
---|---|
Name | Description |
dataset | string Required. The dataset resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationImportDocumentsResponseImportDocumentsMetadata | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
string dataset = "projects/[PROJECT]/locations/[LOCATION]/processors/[PROCESSOR]/dataset";
// Make the request
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> response = await documentServiceClient.ImportDocumentsAsync(dataset);
// Poll until the returned long-running operation is complete
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportDocumentsResponse 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<ImportDocumentsResponse, ImportDocumentsMetadata> retrievedResponse = await documentServiceClient.PollOnceImportDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ImportDocumentsAsync(string, CancellationToken)
public virtual Task<Operation<ImportDocumentsResponse, ImportDocumentsMetadata>> ImportDocumentsAsync(string dataset, CancellationToken cancellationToken)
Import documents into a dataset.
Parameters | |
---|---|
Name | Description |
dataset | string Required. The dataset resource name. Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationImportDocumentsResponseImportDocumentsMetadata | A Task containing the RPC response. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
string dataset = "projects/[PROJECT]/locations/[LOCATION]/processors/[PROCESSOR]/dataset";
// Make the request
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> response = await documentServiceClient.ImportDocumentsAsync(dataset);
// Poll until the returned long-running operation is complete
Operation<ImportDocumentsResponse, ImportDocumentsMetadata> completedResponse = await response.PollUntilCompletedAsync();
// Retrieve the operation result
ImportDocumentsResponse 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<ImportDocumentsResponse, ImportDocumentsMetadata> retrievedResponse = await documentServiceClient.PollOnceImportDocumentsAsync(operationName);
// Check if the retrieved long-running operation has completed
if (retrievedResponse.IsCompleted)
{
// If it has completed, then access the result
ImportDocumentsResponse retrievedResult = retrievedResponse.Result;
}
ListDocuments(DatasetName, string, int?, CallSettings)
public virtual PagedEnumerable<ListDocumentsResponse, DocumentMetadata> ListDocuments(DatasetName dataset, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Returns a list of documents present in the dataset.
Parameters | |
---|---|
Name | Description |
dataset | DatasetName Required. The resource name of the dataset to be listed. Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListDocumentsResponseDocumentMetadata | A pageable sequence of DocumentMetadata resources. |
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
DatasetName dataset = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
// Make the request
PagedEnumerable<ListDocumentsResponse, DocumentMetadata> response = documentServiceClient.ListDocuments(dataset);
// Iterate over all response items, lazily performing RPCs as required
foreach (DocumentMetadata 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 (ListDocumentsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (DocumentMetadata 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<DocumentMetadata> 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 (DocumentMetadata 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;
ListDocuments(ListDocumentsRequest, CallSettings)
public virtual PagedEnumerable<ListDocumentsResponse, DocumentMetadata> ListDocuments(ListDocumentsRequest request, CallSettings callSettings = null)
Returns a list of documents present in the dataset.
Parameters | |
---|---|
Name | Description |
request | ListDocumentsRequest 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 |
PagedEnumerableListDocumentsResponseDocumentMetadata | A pageable sequence of DocumentMetadata resources. |
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
ListDocumentsRequest request = new ListDocumentsRequest
{
DatasetAsDatasetName = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]"),
Filter = "",
ReturnTotalSize = false,
Skip = 0,
};
// Make the request
PagedEnumerable<ListDocumentsResponse, DocumentMetadata> response = documentServiceClient.ListDocuments(request);
// Iterate over all response items, lazily performing RPCs as required
foreach (DocumentMetadata 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 (ListDocumentsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (DocumentMetadata 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<DocumentMetadata> 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 (DocumentMetadata 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;
ListDocuments(string, string, int?, CallSettings)
public virtual PagedEnumerable<ListDocumentsResponse, DocumentMetadata> ListDocuments(string dataset, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Returns a list of documents present in the dataset.
Parameters | |
---|---|
Name | Description |
dataset | string Required. The resource name of the dataset to be listed. Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedEnumerableListDocumentsResponseDocumentMetadata | A pageable sequence of DocumentMetadata resources. |
// Create client
DocumentServiceClient documentServiceClient = DocumentServiceClient.Create();
// Initialize request argument(s)
string dataset = "projects/[PROJECT]/locations/[LOCATION]/processors/[PROCESSOR]/dataset";
// Make the request
PagedEnumerable<ListDocumentsResponse, DocumentMetadata> response = documentServiceClient.ListDocuments(dataset);
// Iterate over all response items, lazily performing RPCs as required
foreach (DocumentMetadata 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 (ListDocumentsResponse page in response.AsRawResponses())
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (DocumentMetadata 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<DocumentMetadata> 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 (DocumentMetadata 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;
ListDocumentsAsync(DatasetName, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListDocumentsResponse, DocumentMetadata> ListDocumentsAsync(DatasetName dataset, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Returns a list of documents present in the dataset.
Parameters | |
---|---|
Name | Description |
dataset | DatasetName Required. The resource name of the dataset to be listed. Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListDocumentsResponseDocumentMetadata | A pageable asynchronous sequence of DocumentMetadata resources. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
DatasetName dataset = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]");
// Make the request
PagedAsyncEnumerable<ListDocumentsResponse, DocumentMetadata> response = documentServiceClient.ListDocumentsAsync(dataset);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DocumentMetadata 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((ListDocumentsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (DocumentMetadata 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<DocumentMetadata> 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 (DocumentMetadata 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;
ListDocumentsAsync(ListDocumentsRequest, CallSettings)
public virtual PagedAsyncEnumerable<ListDocumentsResponse, DocumentMetadata> ListDocumentsAsync(ListDocumentsRequest request, CallSettings callSettings = null)
Returns a list of documents present in the dataset.
Parameters | |
---|---|
Name | Description |
request | ListDocumentsRequest 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 |
PagedAsyncEnumerableListDocumentsResponseDocumentMetadata | A pageable asynchronous sequence of DocumentMetadata resources. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
ListDocumentsRequest request = new ListDocumentsRequest
{
DatasetAsDatasetName = DatasetName.FromProjectLocationProcessor("[PROJECT]", "[LOCATION]", "[PROCESSOR]"),
Filter = "",
ReturnTotalSize = false,
Skip = 0,
};
// Make the request
PagedAsyncEnumerable<ListDocumentsResponse, DocumentMetadata> response = documentServiceClient.ListDocumentsAsync(request);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DocumentMetadata 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((ListDocumentsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (DocumentMetadata 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<DocumentMetadata> 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 (DocumentMetadata 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;
ListDocumentsAsync(string, string, int?, CallSettings)
public virtual PagedAsyncEnumerable<ListDocumentsResponse, DocumentMetadata> ListDocumentsAsync(string dataset, string pageToken = null, int? pageSize = null, CallSettings callSettings = null)
Returns a list of documents present in the dataset.
Parameters | |
---|---|
Name | Description |
dataset | string Required. The resource name of the dataset to be listed. Format: projects/{project}/locations/{location}/processors/{processor}/dataset |
pageToken | string The token returned from the previous request. A value of |
pageSize | int The size of page to request. The response will not be larger than this, but may be smaller. A value of
|
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
PagedAsyncEnumerableListDocumentsResponseDocumentMetadata | A pageable asynchronous sequence of DocumentMetadata resources. |
// Create client
DocumentServiceClient documentServiceClient = await DocumentServiceClient.CreateAsync();
// Initialize request argument(s)
string dataset = "projects/[PROJECT]/locations/[LOCATION]/processors/[PROCESSOR]/dataset";
// Make the request
PagedAsyncEnumerable<ListDocumentsResponse, DocumentMetadata> response = documentServiceClient.ListDocumentsAsync(dataset);
// Iterate over all response items, lazily performing RPCs as required
await response.ForEachAsync((DocumentMetadata 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((ListDocumentsResponse page) =>
{
// Do something with each page of items
Console.WriteLine("A page of results:");
foreach (DocumentMetadata 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<DocumentMetadata> 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 (DocumentMetadata 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;
PollOnceBatchDeleteDocuments(string, CallSettings)
public virtual Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata> PollOnceBatchDeleteDocuments(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of BatchDeleteDocuments
.
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 |
OperationBatchDeleteDocumentsResponseBatchDeleteDocumentsMetadata | The result of polling the operation. |
PollOnceBatchDeleteDocumentsAsync(string, CallSettings)
public virtual Task<Operation<BatchDeleteDocumentsResponse, BatchDeleteDocumentsMetadata>> PollOnceBatchDeleteDocumentsAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
BatchDeleteDocuments
.
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 |
TaskOperationBatchDeleteDocumentsResponseBatchDeleteDocumentsMetadata | A task representing the result of polling the operation. |
PollOnceImportDocuments(string, CallSettings)
public virtual Operation<ImportDocumentsResponse, ImportDocumentsMetadata> PollOnceImportDocuments(string operationName, CallSettings callSettings = null)
Poll an operation once, using an operationName
from a previous invocation of ImportDocuments
.
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 |
OperationImportDocumentsResponseImportDocumentsMetadata | The result of polling the operation. |
PollOnceImportDocumentsAsync(string, CallSettings)
public virtual Task<Operation<ImportDocumentsResponse, ImportDocumentsMetadata>> PollOnceImportDocumentsAsync(string operationName, CallSettings callSettings = null)
Asynchronously poll an operation once, using an operationName
from a previous invocation of
ImportDocuments
.
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 |
TaskOperationImportDocumentsResponseImportDocumentsMetadata | A task representing the result of polling the operation. |
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 | |
---|---|
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 |
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 | |
---|---|
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 |
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 | |
---|---|
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.
UpdateDataset(Dataset, FieldMask, CallSettings)
public virtual Operation<Dataset, UpdateDatasetOperationMetadata> UpdateDataset(Dataset dataset, FieldMask updateMask, CallSettings callSettings = null)
Updates metadata associated with a dataset.
Parameters | |
---|---|
Name | Description |
dataset | Dataset Required. The |
updateMask | FieldMask The update mask applies to the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
OperationDatasetUpdateDatasetOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateDatasetRequest 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 |
OperationDatasetUpdateDatasetOperationMetadata | The RPC response. |
// 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 | |
---|---|
Name | Description |
dataset | Dataset Required. The |
updateMask | FieldMask The update mask applies to the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskOperationDatasetUpdateDatasetOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
dataset | Dataset Required. The |
updateMask | FieldMask The update mask applies to the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationDatasetUpdateDatasetOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateDatasetRequest 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 |
TaskOperationDatasetUpdateDatasetOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateDatasetRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskOperationDatasetUpdateDatasetOperationMetadata | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
datasetSchema | DatasetSchema Required. The name field of the |
updateMask | FieldMask The update mask applies to the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
DatasetSchema | The RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateDatasetSchemaRequest 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 |
DatasetSchema | The RPC response. |
// 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 | |
---|---|
Name | Description |
datasetSchema | DatasetSchema Required. The name field of the |
updateMask | FieldMask The update mask applies to the resource. |
callSettings | CallSettings If not null, applies overrides to this RPC call. |
Returns | |
---|---|
Type | Description |
TaskDatasetSchema | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
datasetSchema | DatasetSchema Required. The name field of the |
updateMask | FieldMask The update mask applies to the resource. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDatasetSchema | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateDatasetSchemaRequest 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 |
TaskDatasetSchema | A Task containing the RPC response. |
// 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 | |
---|---|
Name | Description |
request | UpdateDatasetSchemaRequest The request object containing all of the parameters for the API call. |
cancellationToken | CancellationToken A CancellationToken to use for this RPC. |
Returns | |
---|---|
Type | Description |
TaskDatasetSchema | A Task containing the RPC response. |
// 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);