gcs_fileset_spec.proto 3.5 KB

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