|
| 1 | +// Copyright 2023 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.cloud.documentai.v1beta3; |
| 18 | + |
| 19 | +import "google/api/field_behavior.proto"; |
| 20 | +import "google/api/resource.proto"; |
| 21 | +import "google/cloud/documentai/v1beta3/document_io.proto"; |
| 22 | +import "google/cloud/documentai/v1beta3/document_schema.proto"; |
| 23 | + |
| 24 | +option csharp_namespace = "Google.Cloud.DocumentAI.V1Beta3"; |
| 25 | +option go_package = "cloud.google.com/go/documentai/apiv1beta3/documentaipb;documentaipb"; |
| 26 | +option java_multiple_files = true; |
| 27 | +option java_outer_classname = "DatasetProto"; |
| 28 | +option java_package = "com.google.cloud.documentai.v1beta3"; |
| 29 | +option php_namespace = "Google\\Cloud\\DocumentAI\\V1beta3"; |
| 30 | +option ruby_package = "Google::Cloud::DocumentAI::V1beta3"; |
| 31 | +option (google.api.resource_definition) = { |
| 32 | + type: "contentwarehouse.googleapis.com/Schema" |
| 33 | + pattern: "projects/{project}/locations/{location}/schemas/{schema}" |
| 34 | +}; |
| 35 | + |
| 36 | +// A singleton resource under a |
| 37 | +// [Processor][google.cloud.documentai.v1beta3.Processor] which configures a |
| 38 | +// collection of documents. |
| 39 | +message Dataset { |
| 40 | + option (google.api.resource) = { |
| 41 | + type: "documentai.googleapis.com/Dataset" |
| 42 | + pattern: "projects/{project}/locations/{location}/processors/{processor}/dataset" |
| 43 | + }; |
| 44 | + |
| 45 | + // Configuration specific to the Cloud Storage-based implementation. |
| 46 | + message GCSManagedConfig { |
| 47 | + // Required. The Cloud Storage URI (a directory) where the documents |
| 48 | + // belonging to the dataset must be stored. |
| 49 | + GcsPrefix gcs_prefix = 1 [(google.api.field_behavior) = REQUIRED]; |
| 50 | + } |
| 51 | + |
| 52 | + // Configuration specific to the Document AI Warehouse-based implementation. |
| 53 | + message DocumentWarehouseConfig { |
| 54 | + // Output only. The collection in Document AI Warehouse associated with the |
| 55 | + // dataset. |
| 56 | + string collection = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| 57 | + |
| 58 | + // Output only. The schema in Document AI Warehouse associated with the |
| 59 | + // dataset. |
| 60 | + string schema = 2 [ |
| 61 | + (google.api.field_behavior) = OUTPUT_ONLY, |
| 62 | + (google.api.resource_reference) = { |
| 63 | + type: "contentwarehouse.googleapis.com/Schema" |
| 64 | + } |
| 65 | + ]; |
| 66 | + } |
| 67 | + |
| 68 | + // Configuration specific to an unmanaged dataset. |
| 69 | + message UnmanagedDatasetConfig {} |
| 70 | + |
| 71 | + // Configuration specific to spanner-based indexing. |
| 72 | + message SpannerIndexingConfig {} |
| 73 | + |
| 74 | + // Different states of a dataset. |
| 75 | + enum State { |
| 76 | + // Default unspecified enum, should not be used. |
| 77 | + STATE_UNSPECIFIED = 0; |
| 78 | + |
| 79 | + // Dataset has not been initialized. |
| 80 | + UNINITIALIZED = 1; |
| 81 | + |
| 82 | + // Dataset is being initialized. |
| 83 | + INITIALIZING = 2; |
| 84 | + |
| 85 | + // Dataset has been initialized. |
| 86 | + INITIALIZED = 3; |
| 87 | + } |
| 88 | + |
| 89 | + oneof storage_source { |
| 90 | + // Optional. User-managed Cloud Storage dataset configuration. Use this |
| 91 | + // configuration if the dataset documents are stored under a user-managed |
| 92 | + // Cloud Storage location. |
| 93 | + GCSManagedConfig gcs_managed_config = 3 |
| 94 | + [(google.api.field_behavior) = OPTIONAL]; |
| 95 | + |
| 96 | + // Optional. Document AI Warehouse-based dataset configuration. |
| 97 | + DocumentWarehouseConfig document_warehouse_config = 5 |
| 98 | + [(google.api.field_behavior) = OPTIONAL]; |
| 99 | + |
| 100 | + // Optional. Unmanaged dataset configuration. Use this configuration if the |
| 101 | + // dataset documents are managed by the document service internally (not |
| 102 | + // user-managed). |
| 103 | + UnmanagedDatasetConfig unmanaged_dataset_config = 6 |
| 104 | + [(google.api.field_behavior) = OPTIONAL]; |
| 105 | + } |
| 106 | + |
| 107 | + oneof indexing_source { |
| 108 | + // Optional. A lightweight indexing source with low latency and high |
| 109 | + // reliability, but lacking advanced features like CMEK and content-based |
| 110 | + // search. |
| 111 | + SpannerIndexingConfig spanner_indexing_config = 4 |
| 112 | + [(google.api.field_behavior) = OPTIONAL]; |
| 113 | + } |
| 114 | + |
| 115 | + // Dataset resource name. |
| 116 | + // Format: |
| 117 | + // `projects/{project}/locations/{location}/processors/{processor}/dataset` |
| 118 | + string name = 1; |
| 119 | + |
| 120 | + // Required. State of the dataset. Ignored when updating dataset. |
| 121 | + State state = 2 [(google.api.field_behavior) = REQUIRED]; |
| 122 | +} |
| 123 | + |
| 124 | +// Dataset Schema. |
| 125 | +message DatasetSchema { |
| 126 | + option (google.api.resource) = { |
| 127 | + type: "documentai.googleapis.com/DatasetSchema" |
| 128 | + pattern: "projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema" |
| 129 | + }; |
| 130 | + |
| 131 | + // Dataset schema resource name. |
| 132 | + // Format: |
| 133 | + // `projects/{project}/locations/{location}/processors/{processor}/dataset/datasetSchema` |
| 134 | + string name = 1; |
| 135 | + |
| 136 | + // Optional. Schema of the dataset. |
| 137 | + DocumentSchema document_schema = 3 [(google.api.field_behavior) = OPTIONAL]; |
| 138 | +} |
0 commit comments