gcs_fileset_spec.proto 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // Copyright 2022 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. syntax = "proto3";
  15. package google.cloud.datacatalog.v1;
  16. import "google/api/field_behavior.proto";
  17. import "google/cloud/datacatalog/v1/timestamps.proto";
  18. option cc_enable_arenas = true;
  19. option csharp_namespace = "Google.Cloud.DataCatalog.V1";
  20. option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog";
  21. option java_multiple_files = true;
  22. option java_package = "com.google.cloud.datacatalog.v1";
  23. option php_namespace = "Google\\Cloud\\DataCatalog\\V1";
  24. option ruby_package = "Google::Cloud::DataCatalog::V1";
  25. // Describes a Cloud Storage fileset entry.
  26. message GcsFilesetSpec {
  27. // Required. Patterns to identify a set of files in Google Cloud Storage.
  28. //
  29. // For more information, see [Wildcard Names]
  30. // (https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames).
  31. //
  32. // Note: Currently, bucket wildcards are not supported.
  33. //
  34. // Examples of valid `file_patterns`:
  35. //
  36. // * `gs://bucket_name/dir/*`: matches all files in `bucket_name/dir`
  37. // directory
  38. // * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir`
  39. // and all subdirectories
  40. // * `gs://bucket_name/file*`: matches files prefixed by `file` in
  41. // `bucket_name`
  42. // * `gs://bucket_name/??.txt`: matches files with two characters followed by
  43. // `.txt` in `bucket_name`
  44. // * `gs://bucket_name/[aeiou].txt`: matches files that contain a single
  45. // vowel character followed by `.txt` in
  46. // `bucket_name`
  47. // * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ...
  48. // or `m` followed by `.txt` in `bucket_name`
  49. // * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match
  50. // the `a/*/b` pattern, such as `a/c/b`, `a/d/b`
  51. // * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt`
  52. //
  53. // You can combine wildcards to match complex sets of files, for example:
  54. //
  55. // `gs://bucket_name/[a-m]??.j*g`
  56. repeated string file_patterns = 1 [(google.api.field_behavior) = REQUIRED];
  57. // Output only. Sample files contained in this fileset, not all files
  58. // contained in this fileset are represented here.
  59. repeated GcsFileSpec sample_gcs_file_specs = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  60. }
  61. // Specification of a single file in Cloud Storage.
  62. message GcsFileSpec {
  63. // Required. Full file path. Example: `gs://bucket_name/a/b.txt`.
  64. string file_path = 1 [(google.api.field_behavior) = REQUIRED];
  65. // Output only. Creation, modification, and expiration timestamps of a Cloud Storage file.
  66. SystemTimestamps gcs_timestamps = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
  67. // Output only. File size in bytes.
  68. int64 size_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
  69. }