• 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.v1beta1;
18
19import "google/api/field_behavior.proto";
20import "google/cloud/datacatalog/v1beta1/timestamps.proto";
21
22option cc_enable_arenas = true;
23option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1";
24option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb";
25option java_multiple_files = true;
26option java_package = "com.google.cloud.datacatalog.v1beta1";
27option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1";
28option ruby_package = "Google::Cloud::DataCatalog::V1beta1";
29
30// Describes a Cloud Storage fileset entry.
31message GcsFilesetSpec {
32  // Required. Patterns to identify a set of files in Google Cloud Storage.
33  // See [Cloud Storage
34  // documentation](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames)
35  // for more information. Note that bucket wildcards are currently not
36  // supported.
37  //
38  // Examples of valid file_patterns:
39  //
40  //  * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir`
41  //                              directory.
42  //  * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
43  //                               spanning all subdirectories.
44  //  * `gs://bucket_name/file*`: matches files prefixed by `file` in
45  //                              `bucket_name`
46  //  * `gs://bucket_name/??.txt`: matches files with two characters followed by
47  //                               `.txt` in `bucket_name`
48  //  * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
49  //                                    vowel character followed by `.txt` in
50  //                                    `bucket_name`
51  //  * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
52  //                                  or `m` followed by `.txt` in `bucket_name`
53  //  * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
54  //                              `a/*/b` pattern, such as `a/c/b`, `a/d/b`
55  //  * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
56  //
57  // You can combine wildcards to provide more powerful matches, for example:
58  //
59  //  * `gs://bucket_name/[a-m]??.j*g`
60  repeated string file_patterns = 1 [(google.api.field_behavior) = REQUIRED];
61
62  // Output only. Sample files contained in this fileset, not all files
63  // contained in this fileset are represented here.
64  repeated GcsFileSpec sample_gcs_file_specs = 2
65      [(google.api.field_behavior) = OUTPUT_ONLY];
66}
67
68// Specifications of a single file in Cloud Storage.
69message GcsFileSpec {
70  // Required. The full file path. Example: `gs://bucket_name/a/b.txt`.
71  string file_path = 1 [(google.api.field_behavior) = REQUIRED];
72
73  // Output only. Timestamps about the Cloud Storage file.
74  SystemTimestamps gcs_timestamps = 2
75      [(google.api.field_behavior) = OUTPUT_ONLY];
76
77  // Output only. The size of the file, in bytes.
78  int64 size_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
79}
80