• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
15syntax = "proto3";
16
17package google.cloud.datacatalog.v1;
18
19import "google/api/field_behavior.proto";
20
21option cc_enable_arenas = true;
22option csharp_namespace = "Google.Cloud.DataCatalog.V1";
23option go_package = "cloud.google.com/go/datacatalog/apiv1/datacatalogpb;datacatalogpb";
24option java_multiple_files = true;
25option java_outer_classname = "DataSourceProto";
26option java_package = "com.google.cloud.datacatalog.v1";
27option php_namespace = "Google\\Cloud\\DataCatalog\\V1";
28option ruby_package = "Google::Cloud::DataCatalog::V1";
29
30// Physical location of an entry.
31message DataSource {
32  // Name of a service that stores the data.
33  enum Service {
34    // Default unknown service.
35    SERVICE_UNSPECIFIED = 0;
36
37    // Google Cloud Storage service.
38    CLOUD_STORAGE = 1;
39
40    // BigQuery service.
41    BIGQUERY = 2;
42  }
43
44  // Service that physically stores the data.
45  Service service = 1;
46
47  // Full name of a resource as defined by the service. For example:
48  //
49  // `//bigquery.googleapis.com/projects/{PROJECT_ID}/locations/{LOCATION}/datasets/{DATASET_ID}/tables/{TABLE_ID}`
50  string resource = 2;
51
52  // Output only. Data Catalog entry name, if applicable.
53  string source_entry = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
54
55  oneof properties {
56    // Detailed properties of the underlying storage.
57    StorageProperties storage_properties = 4;
58  }
59}
60
61// Details the properties of the underlying storage.
62message StorageProperties {
63  // Patterns to identify a set of files for this fileset.
64  //
65  // Examples of a valid `file_pattern`:
66  //
67  //  * `gs://bucket_name/dir/*`: matches all files in the `bucket_name/dir`
68  //                              directory
69  //  * `gs://bucket_name/dir/**`: matches all files in the `bucket_name/dir`
70  //                               and all subdirectories recursively
71  //  * `gs://bucket_name/file*`: matches files prefixed by `file` in
72  //                              `bucket_name`
73  //  * `gs://bucket_name/??.txt`: matches files with two characters followed by
74  //                               `.txt` in `bucket_name`
75  //  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
76  //                                    vowel character followed by `.txt` in
77  //                                    `bucket_name`
78  //  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
79  //                                  or `m` followed by `.txt` in `bucket_name`
80  //  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
81  //                              the `a/*/b` pattern, such as `a/c/b`, `a/d/b`
82  //  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
83  repeated string file_pattern = 1;
84
85  // File type in MIME format, for example, `text/plain`.
86  string file_type = 2;
87}
88