123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- syntax = "proto3";
- package google.cloud.contentwarehouse.v1;
- import "google/api/annotations.proto";
- import "google/api/client.proto";
- import "google/api/resource.proto";
- import "google/cloud/contentwarehouse/v1/common.proto";
- import "google/cloud/contentwarehouse/v1/document.proto";
- import "google/cloud/contentwarehouse/v1/document_service_request.proto";
- import "google/cloud/contentwarehouse/v1/histogram.proto";
- import "google/cloud/contentwarehouse/v1/rule_engine.proto";
- import "google/iam/v1/policy.proto";
- import "google/protobuf/empty.proto";
- option go_package = "google.golang.org/genproto/googleapis/cloud/contentwarehouse/v1;contentwarehouse";
- option java_multiple_files = true;
- option java_outer_classname = "DocumentServiceProto";
- option java_package = "com.google.cloud.contentwarehouse.v1";
- service DocumentService {
- option (google.api.default_host) = "contentwarehouse.googleapis.com";
- option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform";
-
- rpc CreateDocument(CreateDocumentRequest) returns (CreateDocumentResponse) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*/locations/*}/documents"
- body: "*"
- };
- option (google.api.method_signature) = "parent,document";
- }
-
- rpc GetDocument(GetDocumentRequest) returns (Document) {
- option (google.api.http) = {
- post: "/v1/{name=projects/*/locations/*/documents/*}:get"
- body: "*"
- additional_bindings {
- post: "/v1/{name=projects/*/locations/*/documents/referenceId/*}:get"
- body: "*"
- }
- };
- option (google.api.method_signature) = "name";
- }
-
-
- rpc UpdateDocument(UpdateDocumentRequest) returns (UpdateDocumentResponse) {
- option (google.api.http) = {
- patch: "/v1/{name=projects/*/locations/*/documents/*}"
- body: "*"
- additional_bindings {
- patch: "/v1/{name=projects/*/locations/*/documents/referenceId/*}"
- body: "*"
- }
- };
- option (google.api.method_signature) = "name,document";
- }
-
- rpc DeleteDocument(DeleteDocumentRequest) returns (google.protobuf.Empty) {
- option (google.api.http) = {
- post: "/v1/{name=projects/*/locations/*/documents/*}:delete"
- body: "*"
- additional_bindings {
- post: "/v1/{name=projects/*/locations/*/documents/referenceId/*}:delete"
- body: "*"
- }
- };
- option (google.api.method_signature) = "name";
- }
-
-
-
- rpc SearchDocuments(SearchDocumentsRequest) returns (SearchDocumentsResponse) {
- option (google.api.http) = {
- post: "/v1/{parent=projects/*/locations/*}/documents:search"
- body: "*"
- };
- option (google.api.method_signature) = "parent";
- }
-
-
-
- rpc FetchAcl(FetchAclRequest) returns (FetchAclResponse) {
- option (google.api.http) = {
- post: "/v1/{resource=projects/*/locations/*/documents/*}:fetchAcl"
- body: "*"
- additional_bindings {
- post: "/v1/{resource=projects/*}:fetchAcl"
- body: "*"
- }
- };
- option (google.api.method_signature) = "resource";
- }
-
-
- rpc SetAcl(SetAclRequest) returns (SetAclResponse) {
- option (google.api.http) = {
- post: "/v1/{resource=projects/*/locations/*/documents/*}:setAcl"
- body: "*"
- additional_bindings {
- post: "/v1/{resource=projects/*}:setAcl"
- body: "*"
- }
- };
- option (google.api.method_signature) = "resource,policy";
- }
- }
- message CreateDocumentResponse {
-
- Document document = 1;
-
-
-
-
- RuleEngineOutput rule_engine_output = 2;
-
-
- ResponseMetadata metadata = 3;
- }
- message UpdateDocumentResponse {
-
- Document document = 1;
-
-
-
-
- RuleEngineOutput rule_engine_output = 2;
-
-
- ResponseMetadata metadata = 3;
- }
- message QAResult {
-
-
- message Highlight {
-
- int32 start_index = 1;
-
- int32 end_index = 2;
- }
-
- repeated Highlight highlights = 1;
-
-
-
- float confidence_score = 2;
- }
- message SearchDocumentsResponse {
-
- message MatchingDocument {
-
-
- Document document = 1;
-
-
-
-
-
-
-
-
-
- string search_text_snippet = 2;
-
-
- QAResult qa_result = 3;
- }
-
- repeated MatchingDocument matching_documents = 1;
-
-
- string next_page_token = 2;
-
-
-
-
-
-
- int32 total_size = 3;
-
-
- ResponseMetadata metadata = 4;
-
-
- repeated HistogramQueryResult histogram_query_results = 6;
- }
- message FetchAclResponse {
-
- google.iam.v1.Policy policy = 1;
-
-
- ResponseMetadata metadata = 2;
- }
- message SetAclResponse {
-
- google.iam.v1.Policy policy = 1;
-
-
- ResponseMetadata metadata = 2;
- }
|