Public interface definitions of Google APIs. Topics (grpc依赖)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

112 lines
4.0 KiB

// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.cloud.documentai.v1beta3;
import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/documentai/v1beta3/dataset.proto";
import "google/cloud/documentai/v1beta3/operation_metadata.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/field_mask.proto";
option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3";
option go_package = "cloud.google.com/go/documentai/apiv1beta3/documentaipb;documentaipb";
option java_multiple_files = true;
option java_outer_classname = "DocumentAiDocumentService";
option java_package = "com.google.cloud.documentai.v1beta3";
option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta3";
option ruby_package = "Google::Cloud::DocumentAI::V1beta3";
// Service to call Cloud DocumentAI to manage document collection (dataset).
service DocumentService {
option (google.api.default_host) = "documentai.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform";
// Updates metadata associated with a dataset.
rpc UpdateDataset(UpdateDatasetRequest)
returns (google.longrunning.Operation) {
option (google.api.http) = {
patch: "/v1beta3/{dataset.name=projects/*/locations/*/processors/*/dataset}"
body: "dataset"
};
option (google.api.method_signature) = "dataset,update_mask";
option (google.longrunning.operation_info) = {
response_type: "Dataset"
metadata_type: "UpdateDatasetOperationMetadata"
};
}
// Gets the `DatasetSchema` of a `Dataset`.
rpc GetDatasetSchema(GetDatasetSchemaRequest) returns (DatasetSchema) {
option (google.api.http) = {
get: "/v1beta3/{name=projects/*/locations/*/processors/*/dataset/datasetSchema}"
};
option (google.api.method_signature) = "name";
}
// Updates a `DatasetSchema`.
rpc UpdateDatasetSchema(UpdateDatasetSchemaRequest) returns (DatasetSchema) {
option (google.api.http) = {
patch: "/v1beta3/{dataset_schema.name=projects/*/locations/*/processors/*/dataset/datasetSchema}"
body: "dataset_schema"
};
option (google.api.method_signature) = "dataset_schema,update_mask";
}
}
message UpdateDatasetRequest {
// Required. The `name` field of the `Dataset` is used to identify the
// resource to be updated.
Dataset dataset = 1 [(google.api.field_behavior) = REQUIRED];
// The update mask applies to the resource.
google.protobuf.FieldMask update_mask = 2;
}
message UpdateDatasetOperationMetadata {
// The basic metadata of the long running operation.
CommonOperationMetadata common_metadata = 1;
}
// Request for `GetDatasetSchema`.
message GetDatasetSchemaRequest {
// Required. The dataset schema resource name.
// Format:
// projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "documentai.googleapis.com/DatasetSchema"
}
];
// If set, only returns the visible fields of the schema.
bool visible_fields_only = 2;
}
// Request for `UpdateDatasetSchema`.
message UpdateDatasetSchemaRequest {
// Required. The name field of the `DatasetSchema` is used to identify the
// resource to be updated.
DatasetSchema dataset_schema = 1 [(google.api.field_behavior) = REQUIRED];
// The update mask applies to the resource.
google.protobuf.FieldMask update_mask = 2;
}