diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 864c1765..da616c91 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,3 +1,3 @@ docker: image: gcr.io/repo-automation-bots/owlbot-python:latest - digest: sha256:4c981a6b6f2b8914a448d7b3a01688365be03e3ed26dfee399a6aa77fb112eaa + digest: sha256:c66ba3c8d7bc8566f47df841f98cd0097b28fff0b1864c86f5817f4c8c3e8600 diff --git a/CHANGELOG.md b/CHANGELOG.md index 22f2a339..6436bfa5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://pypi.org/project/google-cloud-datacatalog/#history +### [3.2.1](https://www.github.com/googleapis/python-datacatalog/compare/v3.2.0...v3.2.1) (2021-06-09) + + +### Bug Fixes + +* **deps:** add packaging requirement ([#163](https://www.github.com/googleapis/python-datacatalog/issues/163)) ([1cfdb5a](https://www.github.com/googleapis/python-datacatalog/commit/1cfdb5a444cd6c845546b060da2e0a0f7d533a0c)) + ## [3.2.0](https://www.github.com/googleapis/python-datacatalog/compare/v3.1.1...v3.2.0) (2021-05-18) diff --git a/docs/conf.py b/docs/conf.py index d225b87e..bea0b88f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -363,6 +363,7 @@ "google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,), "grpc": ("https://grpc.github.io/grpc/python/", None), "proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None), + "protobuf": ("https://googleapis.dev/python/protobuf/latest/", None), } diff --git a/docs/multiprocessing.rst b/docs/multiprocessing.rst index 1cb29d4c..536d17b2 100644 --- a/docs/multiprocessing.rst +++ b/docs/multiprocessing.rst @@ -1,7 +1,7 @@ .. note:: - Because this client uses :mod:`grpcio` library, it is safe to + Because this client uses :mod:`grpc` library, it is safe to share instances across threads. In multiprocessing scenarios, the best practice is to create client instances *after* the invocation of - :func:`os.fork` by :class:`multiprocessing.Pool` or + :func:`os.fork` by :class:`multiprocessing.pool.Pool` or :class:`multiprocessing.Process`. diff --git a/google/cloud/datacatalog_v1/proto/common.proto b/google/cloud/datacatalog_v1/proto/common.proto deleted file mode 100644 index bb31bceb..00000000 --- a/google/cloud/datacatalog_v1/proto/common.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// This enum describes all the possible systems that Data Catalog integrates -// with. -enum IntegratedSystem { - // Default unknown system. - INTEGRATED_SYSTEM_UNSPECIFIED = 0; - - // BigQuery. - BIGQUERY = 1; - - // Cloud Pub/Sub. - CLOUD_PUBSUB = 2; -} diff --git a/google/cloud/datacatalog_v1/proto/datacatalog.proto b/google/cloud/datacatalog_v1/proto/datacatalog.proto deleted file mode 100644 index c5b700dd..00000000 --- a/google/cloud/datacatalog_v1/proto/datacatalog.proto +++ /dev/null @@ -1,1261 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/datacatalog/v1/common.proto"; -import "google/cloud/datacatalog/v1/gcs_fileset_spec.proto"; -import "google/cloud/datacatalog/v1/schema.proto"; -import "google/cloud/datacatalog/v1/search.proto"; -import "google/cloud/datacatalog/v1/table_spec.proto"; -import "google/cloud/datacatalog/v1/tags.proto"; -import "google/cloud/datacatalog/v1/timestamps.proto"; -import "google/iam/v1/iam_policy.proto"; -import "google/iam/v1/policy.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Data Catalog API service allows clients to discover, understand, and manage -// their data. -service DataCatalog { - option (google.api.default_host) = "datacatalog.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Searches Data Catalog for multiple resources like entries, tags that - // match a query. - // - // This is a custom method - // (https://cloud.google.com/apis/design/custom_methods) and does not return - // the complete resource, only the resource identifier and high level - // fields. Clients can subsequentally call `Get` methods. - // - // Note that Data Catalog search queries do not guarantee full recall. Query - // results that match your query may not be returned, even in subsequent - // result pages. Also note that results returned (and not returned) can vary - // across repeated search queries. - // - // See [Data Catalog Search - // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) - // for more information. - rpc SearchCatalog(SearchCatalogRequest) returns (SearchCatalogResponse) { - option (google.api.http) = { - post: "/v1/catalog:search" - body: "*" - }; - option (google.api.method_signature) = "scope,query"; - } - - // Creates an EntryGroup. - // - // An entry group contains logically related entries together with Cloud - // Identity and Access Management policies that specify the users who can - // create, edit, and view entries within the entry group. - // - // Data Catalog automatically creates an entry group for BigQuery entries - // ("@bigquery") and Pub/Sub topics ("@pubsub"). Users create their own entry - // group to contain Cloud Storage fileset entries or custom type entries, - // and the IAM policies associated with those entries. Entry groups, like - // entries, can be searched. - // - // A maximum of 10,000 entry groups may be created per organization across all - // locations. - // - // Users should enable the Data Catalog API in the project identified by - // the `parent` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc CreateEntryGroup(CreateEntryGroupRequest) returns (EntryGroup) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/entryGroups" - body: "entry_group" - }; - option (google.api.method_signature) = "parent,entry_group_id,entry_group"; - } - - // Gets an EntryGroup. - rpc GetEntryGroup(GetEntryGroupRequest) returns (EntryGroup) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/entryGroups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.api.method_signature) = "name,read_mask"; - } - - // Updates an EntryGroup. The user should enable the Data Catalog API in the - // project identified by the `entry_group.name` parameter (see [Data Catalog - // Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc UpdateEntryGroup(UpdateEntryGroupRequest) returns (EntryGroup) { - option (google.api.http) = { - patch: "/v1/{entry_group.name=projects/*/locations/*/entryGroups/*}" - body: "entry_group" - }; - option (google.api.method_signature) = "entry_group"; - option (google.api.method_signature) = "entry_group,update_mask"; - } - - // Deletes an EntryGroup. Only entry groups that do not contain entries can be - // deleted. Users should enable the Data Catalog API in the project - // identified by the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc DeleteEntryGroup(DeleteEntryGroupRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/entryGroups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists entry groups. - rpc ListEntryGroups(ListEntryGroupsRequest) - returns (ListEntryGroupsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/entryGroups" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates an entry. Only entries of 'FILESET' type or user-specified type can - // be created. - // - // Users should enable the Data Catalog API in the project identified by - // the `parent` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - // - // A maximum of 100,000 entries may be created per entry group. - rpc CreateEntry(CreateEntryRequest) returns (Entry) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" - body: "entry" - }; - option (google.api.method_signature) = "parent,entry_id,entry"; - } - - // Updates an existing entry. - // Users should enable the Data Catalog API in the project identified by - // the `entry.name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc UpdateEntry(UpdateEntryRequest) returns (Entry) { - option (google.api.http) = { - patch: "/v1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}" - body: "entry" - }; - option (google.api.method_signature) = "entry"; - option (google.api.method_signature) = "entry,update_mask"; - } - - // Deletes an existing entry. Only entries created through - // [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry] - // method can be deleted. - // Users should enable the Data Catalog API in the project identified by - // the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc DeleteEntry(DeleteEntryRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Gets an entry. - rpc GetEntry(GetEntryRequest) returns (Entry) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Get an entry by target resource name. This method allows clients to use - // the resource name from the source Google Cloud Platform service to get the - // Data Catalog Entry. - rpc LookupEntry(LookupEntryRequest) returns (Entry) { - option (google.api.http) = { - get: "/v1/entries:lookup" - }; - } - - // Lists entries. - rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/entries" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates a tag template. The user should enable the Data Catalog API in - // the project identified by the `parent` parameter (see [Data Catalog - // Resource - // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) - // for more information). - rpc CreateTagTemplate(CreateTagTemplateRequest) returns (TagTemplate) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/tagTemplates" - body: "tag_template" - }; - option (google.api.method_signature) = - "parent,tag_template_id,tag_template"; - } - - // Gets a tag template. - rpc GetTagTemplate(GetTagTemplateRequest) returns (TagTemplate) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/tagTemplates/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates a tag template. This method cannot be used to update the fields of - // a template. The tag template fields are represented as separate resources - // and should be updated using their own create/update/delete methods. - // Users should enable the Data Catalog API in the project identified by - // the `tag_template.name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc UpdateTagTemplate(UpdateTagTemplateRequest) returns (TagTemplate) { - option (google.api.http) = { - patch: "/v1/{tag_template.name=projects/*/locations/*/tagTemplates/*}" - body: "tag_template" - }; - option (google.api.method_signature) = "tag_template"; - option (google.api.method_signature) = "tag_template,update_mask"; - } - - // Deletes a tag template and all tags using the template. - // Users should enable the Data Catalog API in the project identified by - // the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc DeleteTagTemplate(DeleteTagTemplateRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/tagTemplates/*}" - }; - option (google.api.method_signature) = "name,force"; - } - - // Creates a field in a tag template. The user should enable the Data Catalog - // API in the project identified by the `parent` parameter (see - // [Data Catalog Resource - // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) - // for more information). - rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) - returns (TagTemplateField) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/tagTemplates/*}/fields" - body: "tag_template_field" - }; - option (google.api.method_signature) = - "parent,tag_template_field_id,tag_template_field"; - } - - // Updates a field in a tag template. This method cannot be used to update the - // field type. Users should enable the Data Catalog API in the project - // identified by the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) - returns (TagTemplateField) { - option (google.api.http) = { - patch: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" - body: "tag_template_field" - }; - option (google.api.method_signature) = "name,tag_template_field"; - option (google.api.method_signature) = - "name,tag_template_field,update_mask"; - } - - // Renames a field in a tag template. The user should enable the Data Catalog - // API in the project identified by the `name` parameter (see [Data Catalog - // Resource - // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) - // for more information). - rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) - returns (TagTemplateField) { - option (google.api.http) = { - post: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename" - body: "*" - }; - option (google.api.method_signature) = "name,new_tag_template_field_id"; - } - - // Deletes a field in a tag template and all uses of that field. - // Users should enable the Data Catalog API in the project identified by - // the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" - }; - option (google.api.method_signature) = "name,force"; - } - - // Creates a tag on an [Entry][google.cloud.datacatalog.v1.Entry]. - // Note: The project identified by the `parent` parameter for the - // [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.entryGroups.entries.tags/create#path-parameters) - // and the - // [tag - // template](https://cloud.google.com/data-catalog/docs/reference/rest/v1/projects.locations.tagTemplates/create#path-parameters) - // used to create the tag must be from the same organization. - rpc CreateTag(CreateTagRequest) returns (Tag) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" - body: "tag" - additional_bindings { - post: "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags" - body: "tag" - } - }; - option (google.api.method_signature) = "parent,tag"; - } - - // Updates an existing tag. - rpc UpdateTag(UpdateTagRequest) returns (Tag) { - option (google.api.http) = { - patch: "/v1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" - body: "tag" - additional_bindings { - patch: "/v1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}" - body: "tag" - } - }; - option (google.api.method_signature) = "tag"; - option (google.api.method_signature) = "tag,update_mask"; - } - - // Deletes a tag. - rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" - additional_bindings { - delete: "/v1/{name=projects/*/locations/*/entryGroups/*/tags/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists the tags on an [Entry][google.cloud.datacatalog.v1.Entry]. - rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" - additional_bindings { - get: "/v1/{parent=projects/*/locations/*/entryGroups/*}/tags" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Sets the access control policy for a resource. Replaces any existing - // policy. - // Supported resources are: - // - Tag templates. - // - Entries. - // - Entry groups. - // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub - // and any external Google Cloud Platform resources synced to Data Catalog. - // - // Callers must have following Google IAM permission - // - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag - // templates. - // - `datacatalog.entries.setIamPolicy` to set policies on entries. - // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) - returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy" - body: "*" - } - }; - option (google.api.method_signature) = "resource,policy"; - } - - // Gets the access control policy for a resource. A `NOT_FOUND` error - // is returned if the resource does not exist. An empty policy is returned - // if the resource exists but does not have a policy set on it. - // - // Supported resources are: - // - Tag templates. - // - Entries. - // - Entry groups. - // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub - // and any external Google Cloud Platform resources synced to Data Catalog. - // - // Callers must have following Google IAM permission - // - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag - // templates. - // - `datacatalog.entries.getIamPolicy` to get policies on entries. - // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) - returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy" - body: "*" - } - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy" - body: "*" - } - }; - option (google.api.method_signature) = "resource"; - } - - // Returns the caller's permissions on a resource. - // If the resource does not exist, an empty set of permissions is returned - // (We don't return a `NOT_FOUND` error). - // - // Supported resources are: - // - Tag templates. - // - Entries. - // - Entry groups. - // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub - // and any external Google Cloud Platform resources synced to Data Catalog. - // - // A caller is not required to have Google IAM permission to make this - // request. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) - returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions" - body: "*" - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions" - body: "*" - } - additional_bindings { - post: "/v1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions" - body: "*" - } - }; - } -} - -// Request message for -// [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. -message SearchCatalogRequest { - // The criteria that select the subspace used for query matching. - message Scope { - // The list of organization IDs to search within. To find your organization - // ID, follow instructions in - // https://cloud.google.com/resource-manager/docs/creating-managing-organization. - repeated string include_org_ids = 2; - - // The list of project IDs to search within. To learn more about the - // distinction between project names/IDs/numbers, go to - // https://cloud.google.com/docs/overview/#projects. - repeated string include_project_ids = 3; - - // If `true`, include Google Cloud Platform (GCP) public datasets in the - // search results. Info on GCP public datasets is available at - // https://cloud.google.com/public-datasets/. By default, GCP public - // datasets are excluded. - bool include_gcp_public_datasets = 7; - - // Optional. The list of locations to search within. - // 1. If empty, search will be performed in all locations; - // 2. If any of the locations are NOT in the valid locations list, error - // will be returned; - // 3. Otherwise, search only the given locations for matching results. - // Typical usage is to leave this field empty. When a location is - // unreachable as returned in the `SearchCatalogResponse.unreachable` field, - // users can repeat the search request with this parameter set to get - // additional information on the error. - // - // Valid locations: - // * asia-east1 - // * asia-east2 - // * asia-northeast1 - // * asia-northeast2 - // * asia-northeast3 - // * asia-south1 - // * asia-southeast1 - // * australia-southeast1 - // * eu - // * europe-north1 - // * europe-west1 - // * europe-west2 - // * europe-west3 - // * europe-west4 - // * europe-west6 - // * global - // * northamerica-northeast1 - // * southamerica-east1 - // * us - // * us-central1 - // * us-east1 - // * us-east4 - // * us-west1 - // * us-west2 - repeated string restricted_locations = 16 - [(google.api.field_behavior) = OPTIONAL]; - } - - // Required. The scope of this search request. A `scope` that has empty - // `include_org_ids`, `include_project_ids` AND false - // `include_gcp_public_datasets` is considered invalid. Data Catalog will - // return an error in such a case. - Scope scope = 6 [(google.api.field_behavior) = REQUIRED]; - - // Required. The query string in search query syntax. The query must be - // non-empty. - // - // Query strings can be simple as "x" or more qualified as: - // - // * name:x - // * column:x - // * description:y - // - // Note: Query tokens need to have a minimum of 3 characters for substring - // matching to work correctly. See [Data Catalog Search - // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) - // for more information. - string query = 1 [(google.api.field_behavior) = REQUIRED]; - - // Number of results in the search page. If <=0 then defaults to 10. Max limit - // for page_size is 1000. Throws an invalid argument for page_size > 1000. - int32 page_size = 2; - - // Optional. Pagination token returned in an earlier - // [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1.SearchCatalogResponse.next_page_token], - // which indicates that this is a continuation of a prior - // [SearchCatalogRequest][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog] - // call, and that the system should return the next page of data. If empty, - // the first page is returned. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Specifies the ordering of results, currently supported case-sensitive - // choices are: - // - // * `relevance`, only supports descending - // * `last_modified_timestamp [asc|desc]`, defaults to descending if not - // specified - // - // If not specified, defaults to `relevance` descending. - string order_by = 5; -} - -// Response message for -// [SearchCatalog][google.cloud.datacatalog.v1.DataCatalog.SearchCatalog]. -message SearchCatalogResponse { - // Search results. - repeated SearchCatalogResult results = 1; - - // The token that can be used to retrieve the next page of results. - string next_page_token = 3; - - // Unreachable locations. Search result does not include data from those - // locations. Users can get additional information on the error by repeating - // the search request with a more restrictive parameter -- setting the value - // for `SearchDataCatalogRequest.scope.include_locations`. - repeated string unreachable = 6; -} - -// Request message for -// [CreateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.CreateEntryGroup]. -message CreateEntryGroupRequest { - // Required. The name of the project this entry group is in. Example: - // - // * projects/{project_id}/locations/{location} - // - // Note that this EntryGroup and its child resources may not actually be - // stored in the location in this name. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Required. The id of the entry group to create. - // The id must begin with a letter or underscore, contain only English - // letters, numbers and underscores, and be at most 64 characters. - string entry_group_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // The entry group to create. Defaults to an empty entry group. - EntryGroup entry_group = 2; -} - -// Request message for -// [UpdateEntryGroup][google.cloud.datacatalog.v1.DataCatalog.UpdateEntryGroup]. -message UpdateEntryGroupRequest { - // Required. The updated entry group. "name" field must be set. - EntryGroup entry_group = 1 [(google.api.field_behavior) = REQUIRED]; - - // The fields to update on the entry group. If absent or empty, all modifiable - // fields are updated. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [GetEntryGroup][google.cloud.datacatalog.v1.DataCatalog.GetEntryGroup]. -message GetEntryGroupRequest { - // Required. The name of the entry group. For example, - // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // The fields to return. If not set or empty, all fields are returned. - google.protobuf.FieldMask read_mask = 2; -} - -// Request message for -// [DeleteEntryGroup][google.cloud.datacatalog.v1.DataCatalog.DeleteEntryGroup]. -message DeleteEntryGroupRequest { - // Required. The name of the entry group. For example, - // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Optional. If true, deletes all entries in the entry group. - bool force = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. -message ListEntryGroupsRequest { - // Required. The name of the location that contains the entry groups, which - // can be provided in URL format. Example: - // - // * projects/{project_id}/locations/{location} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Optional. The maximum number of items to return. Default is 10. Max limit - // is 1000. Throws an invalid argument for `page_size > 1000`. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Token that specifies which page is requested. If empty, the first - // page is returned. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [ListEntryGroups][google.cloud.datacatalog.v1.DataCatalog.ListEntryGroups]. -message ListEntryGroupsResponse { - // EntryGroup details. - repeated EntryGroup entry_groups = 1; - - // Token to retrieve the next page of results. It is set to empty if no items - // remain in results. - string next_page_token = 2; -} - -// Request message for -// [CreateEntry][google.cloud.datacatalog.v1.DataCatalog.CreateEntry]. -message CreateEntryRequest { - // Required. The name of the entry group this entry is in. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - // - // Note that this Entry and its child resources may not actually be stored in - // the location in this name. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Required. The id of the entry to create. - string entry_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The entry to create. - Entry entry = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [UpdateEntry][google.cloud.datacatalog.v1.DataCatalog.UpdateEntry]. -message UpdateEntryRequest { - // Required. The updated entry. The "name" field must be set. - Entry entry = 1 [(google.api.field_behavior) = REQUIRED]; - - // The fields to update on the entry. If absent or empty, all modifiable - // fields are updated. - // - // The following fields are modifiable: - // * For entries with type `DATA_STREAM`: - // * `schema` - // * For entries with type `FILESET` - // * `schema` - // * `display_name` - // * `description` - // * `gcs_fileset_spec` - // * `gcs_fileset_spec.file_patterns` - // * For entries with `user_specified_type` - // * `schema` - // * `display_name` - // * `description` - // * user_specified_type - // * user_specified_system - // * linked_resource - // * source_system_timestamps - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [DeleteEntry][google.cloud.datacatalog.v1.DataCatalog.DeleteEntry]. -message DeleteEntryRequest { - // Required. The name of the entry. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Request message for -// [GetEntry][google.cloud.datacatalog.v1.DataCatalog.GetEntry]. -message GetEntryRequest { - // Required. The name of the entry. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Request message for -// [LookupEntry][google.cloud.datacatalog.v1.DataCatalog.LookupEntry]. -message LookupEntryRequest { - // Required. Represents either the Google Cloud Platform resource or SQL name - // for a Google Cloud Platform resource. - oneof target_name { - // The full name of the Google Cloud Platform resource the Data Catalog - // entry represents. See: - // https://cloud.google.com/apis/design/resource_names#full_resource_name. - // Full names are case-sensitive. - // - // Examples: - // - // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - // * //pubsub.googleapis.com/projects/projectId/topics/topicId - string linked_resource = 1; - - // The SQL name of the entry. SQL names are case-sensitive. - // - // Examples: - // - // * `pubsub.project_id.topic_id` - // * ``pubsub.project_id.`topic.id.with.dots` `` - // * `bigquery.table.project_id.dataset_id.table_id` - // * `bigquery.dataset.project_id.dataset_id` - // * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - // - // `*_id`s shoud satisfy the standard SQL rules for identifiers. - // https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. - string sql_resource = 3; - } -} - -// Entry Metadata. -// A Data Catalog Entry resource represents another resource in Google -// Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic) or -// outside of Google Cloud Platform. Clients can use the `linked_resource` field -// in the Entry resource to refer to the original resource ID of the source -// system. -// -// An Entry resource contains resource details, such as its schema. An Entry can -// also be used to attach flexible metadata, such as a -// [Tag][google.cloud.datacatalog.v1.Tag]. -message Entry { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/Entry" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}" - }; - - // The Data Catalog resource name of the entry in URL format. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - // - // Note that this Entry and its child resources may not actually be stored in - // the location in this name. - string name = 1 [(google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - }]; - - // The resource this metadata entry refers to. - // - // For Google Cloud Platform resources, `linked_resource` is the [full name of - // the - // resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). - // For example, the `linked_resource` for a table resource from BigQuery is: - // - // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - // - // Output only when Entry is of type in the EntryType enum. For entries with - // user_specified_type, this field is optional and defaults to an empty - // string. - string linked_resource = 9; - - // Required. Entry type. - oneof entry_type { - // The type of the entry. - // Only used for Entries with types in the EntryType enum. - EntryType type = 2; - - // Entry type if it does not fit any of the input-allowed values listed in - // `EntryType` enum above. When creating an entry, users should check the - // enum values first, if nothing matches the entry to be created, then - // provide a custom value, for example "my_special_type". - // `user_specified_type` strings must begin with a letter or underscore and - // can only contain letters, numbers, and underscores; are case insensitive; - // must be at least 1 character and at most 64 characters long. - // - // Currently, only FILESET enum value is allowed. All other entries created - // through Data Catalog must use `user_specified_type`. - string user_specified_type = 16; - } - - // The source system of the entry. - oneof system { - // Output only. This field indicates the entry's source system that Data - // Catalog integrates with, such as BigQuery or Pub/Sub. - IntegratedSystem integrated_system = 17 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // This field indicates the entry's source system that Data Catalog does not - // integrate with. `user_specified_system` strings must begin with a letter - // or underscore and can only contain letters, numbers, and underscores; are - // case insensitive; must be at least 1 character and at most 64 characters - // long. - string user_specified_system = 18; - } - - // Type specification information. - oneof type_spec { - // Specification that applies to a Cloud Storage fileset. This is only valid - // on entries of type FILESET. - GcsFilesetSpec gcs_fileset_spec = 6; - - // Specification that applies to a BigQuery table. This is only valid on - // entries of type `TABLE`. - BigQueryTableSpec bigquery_table_spec = 12; - - // Specification for a group of BigQuery tables with name pattern - // `[prefix]YYYYMMDD`. Context: - // https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding. - BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; - } - - // Display information such as title and description. A short name to identify - // the entry, for example, "Analytics Data - Jan 2011". Default value is an - // empty string. - string display_name = 3; - - // Entry description, which can consist of several sentences or paragraphs - // that describe entry contents. Default value is an empty string. - string description = 4; - - // Schema of the entry. An entry might not have any schema attached to it. - Schema schema = 5; - - // Timestamps about the underlying resource, not about this Data Catalog - // entry. Output only when Entry is of type in the EntryType enum. For entries - // with user_specified_type, this field is optional and defaults to an empty - // timestamp. - SystemTimestamps source_system_timestamps = 7; -} - -// EntryGroup Metadata. -// An EntryGroup resource represents a logical grouping of zero or more -// Data Catalog [Entry][google.cloud.datacatalog.v1.Entry] resources. -message EntryGroup { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/EntryGroup" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}" - }; - - // The resource name of the entry group in URL format. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - // - // Note that this EntryGroup and its child resources may not actually be - // stored in the location in this name. - string name = 1; - - // A short name to identify the entry group, for example, - // "analytics data - jan 2011". Default value is an empty string. - string display_name = 2; - - // Entry group description, which can consist of several sentences or - // paragraphs that describe entry group contents. Default value is an empty - // string. - string description = 3; - - // Output only. Timestamps about this EntryGroup. Default value is empty - // timestamps. - SystemTimestamps data_catalog_timestamps = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [CreateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplate]. -message CreateTagTemplateRequest { - // Required. The name of the project and the template location - // [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - // - // Example: - // - // * projects/{project_id}/locations/us-central1 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/TagTemplate" - } - ]; - - // Required. The id of the tag template to create. - string tag_template_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The tag template to create. - TagTemplate tag_template = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [GetTagTemplate][google.cloud.datacatalog.v1.DataCatalog.GetTagTemplate]. -message GetTagTemplateRequest { - // Required. The name of the tag template. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplate" - } - ]; -} - -// Request message for -// [UpdateTagTemplate][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplate]. -message UpdateTagTemplateRequest { - // Required. The template to update. The "name" field must be set. - TagTemplate tag_template = 1 [(google.api.field_behavior) = REQUIRED]; - - // The field mask specifies the parts of the template to overwrite. - // - // Allowed fields: - // - // * `display_name` - // - // If absent or empty, all of the allowed fields above will be updated. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [DeleteTagTemplate][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplate]. -message DeleteTagTemplateRequest { - // Required. The name of the tag template to delete. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplate" - } - ]; - - // Required. Currently, this field must always be set to `true`. - // This confirms the deletion of any possible tags using this template. - // `force = false` will be supported in the future. - bool force = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [CreateTag][google.cloud.datacatalog.v1.DataCatalog.CreateTag]. -message CreateTagRequest { - // Required. The name of the resource to attach this tag to. Tags can be - // attached to Entries. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - // - // Note that this Tag and its child resources may not actually be stored in - // the location in this name. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { type: "datacatalog.googleapis.com/Tag" } - ]; - - // Required. The tag to create. - Tag tag = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [UpdateTag][google.cloud.datacatalog.v1.DataCatalog.UpdateTag]. -message UpdateTagRequest { - // Required. The updated tag. The "name" field must be set. - Tag tag = 1 [(google.api.field_behavior) = REQUIRED]; - - // The fields to update on the Tag. If absent or empty, all modifiable fields - // are updated. Currently the only modifiable field is the field `fields`. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [DeleteTag][google.cloud.datacatalog.v1.DataCatalog.DeleteTag]. -message DeleteTagRequest { - // Required. The name of the tag to delete. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Tag" - } - ]; -} - -// Request message for -// [CreateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.CreateTagTemplateField]. -message CreateTagTemplateFieldRequest { - // Required. The name of the project and the template location - // [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - // - // Example: - // - // * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplate" - } - ]; - - // Required. The ID of the tag template field to create. - // Field ids can contain letters (both uppercase and lowercase), numbers - // (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - // character long and at most 128 characters long. Field IDs must also be - // unique within their template. - string tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The tag template field to create. - TagTemplateField tag_template_field = 3 - [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [UpdateTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.UpdateTagTemplateField]. -message UpdateTagTemplateFieldRequest { - // Required. The name of the tag template field. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplateField" - } - ]; - - // Required. The template to update. - TagTemplateField tag_template_field = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. The field mask specifies the parts of the template to be updated. - // Allowed fields: - // - // * `display_name` - // * `type.enum_type` - // * `is_required` - // - // If `update_mask` is not set or empty, all of the allowed fields above will - // be updated. - // - // When updating an enum type, the provided values will be merged with the - // existing values. Therefore, enum values can only be added, existing enum - // values cannot be deleted nor renamed. Updating a template field from - // optional to required is NOT allowed. - google.protobuf.FieldMask update_mask = 3 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [RenameTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.RenameTagTemplateField]. -message RenameTagTemplateFieldRequest { - // Required. The name of the tag template. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplateField" - } - ]; - - // Required. The new ID of this tag template field. For example, - // `my_new_field`. - string new_tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [DeleteTagTemplateField][google.cloud.datacatalog.v1.DataCatalog.DeleteTagTemplateField]. -message DeleteTagTemplateFieldRequest { - // Required. The name of the tag template field to delete. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplateField" - } - ]; - - // Required. Currently, this field must always be set to `true`. - // This confirms the deletion of this field from any tags using this field. - // `force = false` will be supported in the future. - bool force = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. -message ListTagsRequest { - // Required. The name of the Data Catalog resource to list the tags of. The - // resource could be an [Entry][google.cloud.datacatalog.v1.Entry] or an - // [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. - // - // Examples: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Tag" - } - ]; - - // The maximum number of tags to return. Default is 10. Max limit is 1000. - int32 page_size = 2; - - // Token that specifies which page is requested. If empty, the first page is - // returned. - string page_token = 3; -} - -// Response message for -// [ListTags][google.cloud.datacatalog.v1.DataCatalog.ListTags]. -message ListTagsResponse { - // [Tag][google.cloud.datacatalog.v1.Tag] details. - repeated Tag tags = 1; - - // Token to retrieve the next page of results. It is set to empty if no items - // remain in results. - string next_page_token = 2; -} - -// Request message for -// [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. -message ListEntriesRequest { - // Required. The name of the entry group that contains the entries, which can - // be provided in URL format. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // The maximum number of items to return. Default is 10. Max limit is 1000. - // Throws an invalid argument for `page_size > 1000`. - int32 page_size = 2; - - // Token that specifies which page is requested. If empty, the first page is - // returned. - string page_token = 3; - - // The fields to return for each Entry. If not set or empty, all - // fields are returned. - // For example, setting read_mask to contain only one path "name" will cause - // ListEntries to return a list of Entries with only "name" field. - google.protobuf.FieldMask read_mask = 4; -} - -// Response message for -// [ListEntries][google.cloud.datacatalog.v1.DataCatalog.ListEntries]. -message ListEntriesResponse { - // Entry details. - repeated Entry entries = 1; - - // Token to retrieve the next page of results. It is set to empty if no items - // remain in results. - string next_page_token = 2; -} - -// Entry resources in Data Catalog can be of different types e.g. a BigQuery -// Table entry is of type `TABLE`. This enum describes all the possible types -// Data Catalog contains. -enum EntryType { - // Default unknown type. - ENTRY_TYPE_UNSPECIFIED = 0; - - // Output only. The type of entry that has a GoogleSQL schema, including - // logical views. - TABLE = 2; - - // Output only. The type of models, examples include - // https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro - MODEL = 5; - - // Output only. An entry type which is used for streaming entries. Example: - // Pub/Sub topic. - DATA_STREAM = 3; - - // An entry type which is a set of files or objects. Example: - // Cloud Storage fileset. - FILESET = 4; -} diff --git a/google/cloud/datacatalog_v1/proto/gcs_fileset_spec.proto b/google/cloud/datacatalog_v1/proto/gcs_fileset_spec.proto deleted file mode 100644 index bcf0ead6..00000000 --- a/google/cloud/datacatalog_v1/proto/gcs_fileset_spec.proto +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/cloud/datacatalog/v1/timestamps.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Describes a Cloud Storage fileset entry. -message GcsFilesetSpec { - // Required. Patterns to identify a set of files in Google Cloud Storage. - // See [Cloud Storage - // documentation](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames) - // for more information. Note that bucket wildcards are currently not - // supported. - // - // Examples of valid file_patterns: - // - // * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir` - // directory. - // * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` - // spanning all subdirectories. - // * `gs://bucket_name/file*`: matches files prefixed by `file` in - // `bucket_name` - // * `gs://bucket_name/??.txt`: matches files with two characters followed by - // `.txt` in `bucket_name` - // * `gs://bucket_name/[aeiou].txt`: matches files that contain a single - // vowel character followed by `.txt` in - // `bucket_name` - // * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... - // or `m` followed by `.txt` in `bucket_name` - // * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match - // `a/*/b` pattern, such as `a/c/b`, `a/d/b` - // * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - // - // You can combine wildcards to provide more powerful matches, for example: - // - // * `gs://bucket_name/[a-m]??.j*g` - repeated string file_patterns = 1 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Sample files contained in this fileset, not all files - // contained in this fileset are represented here. - repeated GcsFileSpec sample_gcs_file_specs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Specifications of a single file in Cloud Storage. -message GcsFileSpec { - // Required. The full file path. Example: `gs://bucket_name/a/b.txt`. - string file_path = 1 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Timestamps about the Cloud Storage file. - SystemTimestamps gcs_timestamps = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The size of the file, in bytes. - int64 size_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/google/cloud/datacatalog_v1/proto/schema.proto b/google/cloud/datacatalog_v1/proto/schema.proto deleted file mode 100644 index c34d99e2..00000000 --- a/google/cloud/datacatalog_v1/proto/schema.proto +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). -message Schema { - // Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be - // specified. - repeated ColumnSchema columns = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Representation of a column within a schema. Columns could be nested inside -// other columns. -message ColumnSchema { - // Required. Name of the column. - string column = 6 [(google.api.field_behavior) = REQUIRED]; - - // Required. Type of the column. - string type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Description of the column. Default value is an empty string. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A column's mode indicates whether the values in this column are required, - // nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported. - // Default mode is `NULLABLE`. - string mode = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Schema of sub-columns. A column can have zero or more sub-columns. - repeated ColumnSchema subcolumns = 7 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/google/cloud/datacatalog_v1/proto/search.proto b/google/cloud/datacatalog_v1/proto/search.proto deleted file mode 100644 index 37f6923b..00000000 --- a/google/cloud/datacatalog_v1/proto/search.proto +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/cloud/datacatalog/v1/common.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// A result that appears in the response of a search request. Each result -// captures details of one entry that matches the search. -message SearchCatalogResult { - // Type of the search result. This field can be used to determine which Get - // method to call to fetch the full resource. - SearchResultType search_result_type = 1; - - // Sub-type of the search result. This is a dot-delimited description of the - // resource's full type, and is the same as the value callers would provide in - // the "type" search facet. Examples: `entry.table`, `entry.dataStream`, - // `tagTemplate`. - string search_result_subtype = 2; - - // The relative resource name of the resource in URL format. - // Examples: - // - // * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}` - // * `projects/{project_id}/tagTemplates/{tag_template_id}` - string relative_resource_name = 3; - - // The full name of the cloud resource the entry belongs to. See: - // https://cloud.google.com/apis/design/resource_names#full_resource_name. - // Example: - // - // * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId` - string linked_resource = 4; - - // The source system of the entry. Only applicable when `search_result_type` - // is ENTRY. - oneof system { - // Output only. This field indicates the entry's source system that Data Catalog - // integrates with, such as BigQuery or Cloud Pub/Sub. - IntegratedSystem integrated_system = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // This field indicates the entry's source system that Data Catalog does not - // integrate with. - string user_specified_system = 9; - } -} - -// The different types of resources that can be returned in search. -enum SearchResultType { - // Default unknown type. - SEARCH_RESULT_TYPE_UNSPECIFIED = 0; - - // An [Entry][google.cloud.datacatalog.v1.Entry]. - ENTRY = 1; - - // A [TagTemplate][google.cloud.datacatalog.v1.TagTemplate]. - TAG_TEMPLATE = 2; - - // An [EntryGroup][google.cloud.datacatalog.v1.EntryGroup]. - ENTRY_GROUP = 3; -} diff --git a/google/cloud/datacatalog_v1/proto/table_spec.proto b/google/cloud/datacatalog_v1/proto/table_spec.proto deleted file mode 100644 index c87afc54..00000000 --- a/google/cloud/datacatalog_v1/proto/table_spec.proto +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Describes a BigQuery table. -message BigQueryTableSpec { - // Output only. The table source type. - TableSourceType table_source_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. - oneof type_spec { - // Table view specification. This field should only be populated if - // `table_source_type` is `BIGQUERY_VIEW`. - ViewSpec view_spec = 2; - - // Spec of a BigQuery table. This field should only be populated if - // `table_source_type` is `BIGQUERY_TABLE`. - TableSpec table_spec = 3; - } -} - -// Table source type. -enum TableSourceType { - // Default unknown type. - TABLE_SOURCE_TYPE_UNSPECIFIED = 0; - - // Table view. - BIGQUERY_VIEW = 2; - - // BigQuery native table. - BIGQUERY_TABLE = 5; -} - -// Table view specification. -message ViewSpec { - // Output only. The query that defines the table view. - string view_query = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Normal BigQuery table spec. -message TableSpec { - // Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`, - // `grouped_entry` is the Data Catalog resource name of the date sharded - // grouped entry, for example, - // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. - // Otherwise, `grouped_entry` is empty. - string grouped_entry = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Spec for a group of BigQuery tables with name pattern `[prefix]YYYYMMDD`. -// Context: -// https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding -message BigQueryDateShardedSpec { - // Output only. The Data Catalog resource name of the dataset entry the current table - // belongs to, for example, - // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. - string dataset = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; - - // Output only. The table name prefix of the shards. The name of any given shard is - // `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the - // `table_prefix` is `MyTable`. - string table_prefix = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Total number of shards. - int64 shard_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/google/cloud/datacatalog_v1/proto/tags.proto b/google/cloud/datacatalog_v1/proto/tags.proto deleted file mode 100644 index 4efefa52..00000000 --- a/google/cloud/datacatalog_v1/proto/tags.proto +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Tags are used to attach custom metadata to Data Catalog resources. Tags -// conform to the specifications within their tag template. -// -// See [Data Catalog -// IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for information -// on the permissions needed to create or view tags. -message Tag { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/Tag" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}" - }; - - // The resource name of the tag in URL format. Example: - // - // * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} - // - // where `tag_id` is a system-generated identifier. - // Note that this Tag may not actually be stored in the location in this name. - string name = 1; - - // Required. The resource name of the tag template that this tag uses. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - // - // This field cannot be modified after creation. - string template = 2 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The display name of the tag template. - string template_display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The scope within the parent resource that this tag is attached to. If not - // provided, the tag is attached to the parent resource itself. - // Deleting the scope from the parent resource will delete all tags attached - // to that scope. These fields cannot be updated after creation. - oneof scope { - // Resources like Entry can have schemas associated with them. This scope - // allows users to attach tags to an individual column based on that schema. - // - // For attaching a tag to a nested column, use `.` to separate the column - // names. Example: - // - // * `outer_column.inner_column` - string column = 4; - } - - // Required. This maps the ID of a tag field to the value of and additional information - // about that field. Valid field IDs are defined by the tag's template. A tag - // must have at least 1 field and at most 500 fields. - map fields = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Contains the value and supporting information for a field within -// a [Tag][google.cloud.datacatalog.v1.Tag]. -message TagField { - // Holds an enum value. - message EnumValue { - // The display name of the enum value. - string display_name = 1; - } - - // Output only. The display name of this field. - string display_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The value of this field. - oneof kind { - // Holds the value for a tag field with double type. - double double_value = 2; - - // Holds the value for a tag field with string type. - string string_value = 3; - - // Holds the value for a tag field with boolean type. - bool bool_value = 4; - - // Holds the value for a tag field with timestamp type. - google.protobuf.Timestamp timestamp_value = 5; - - // Holds the value for a tag field with enum type. This value must be - // one of the allowed values in the definition of this enum. - EnumValue enum_value = 6; - } - - // Output only. The order of this field with respect to other fields in this tag. It can be - // set in [Tag][google.cloud.datacatalog.v1.TagTemplateField.order]. For - // example, a higher value can indicate a more important field. The value can - // be negative. Multiple fields can have the same order, and field orders - // within a tag do not have to be sequential. - int32 order = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A tag template defines a tag, which can have one or more typed fields. -// The template is used to create and attach the tag to GCP resources. -// [Tag template -// roles](https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) -// provide permissions to create, edit, and use the template. See, for example, -// the [TagTemplate -// User](https://cloud.google.com/data-catalog/docs/how-to/template-user) role, -// which includes permission to use the tag template to tag resources. -message TagTemplate { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/TagTemplate" - pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}" - }; - - // The resource name of the tag template in URL format. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - // - // Note that this TagTemplate and its child resources may not actually be - // stored in the location in this name. - string name = 1; - - // The display name for this template. Defaults to an empty string. - string display_name = 2; - - // Required. Map of tag template field IDs to the settings for the field. - // This map is an exhaustive list of the allowed fields. This map must contain - // at least one field and at most 500 fields. - // - // The keys to this map are tag template field IDs. Field IDs can contain - // letters (both uppercase and lowercase), numbers (0-9) and underscores (_). - // Field IDs must be at least 1 character long and at most - // 64 characters long. Field IDs must start with a letter or underscore. - map fields = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The template for an individual field within a tag template. -message TagTemplateField { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/TagTemplateField" - pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}" - }; - - // Output only. The resource name of the tag template field in URL format. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field} - // - // Note that this TagTemplateField may not actually be stored in the location - // in this name. - string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The display name for this field. Defaults to an empty string. - string display_name = 1; - - // Required. The type of value this tag field can contain. - FieldType type = 2 [(google.api.field_behavior) = REQUIRED]; - - // Whether this is a required field. Defaults to false. - bool is_required = 3; - - // The order of this field with respect to other fields in this tag - // template. For example, a higher value can indicate a more important field. - // The value can be negative. Multiple fields can have the same order, and - // field orders within a tag do not have to be sequential. - int32 order = 5; -} - -message FieldType { - message EnumType { - message EnumValue { - // Required. The display name of the enum value. Must not be an empty string. - string display_name = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Required on create; optional on update. The set of allowed values for - // this enum. This set must not be empty, the display names of the values in - // this set must not be empty and the display names of the values must be - // case-insensitively unique within this set. Currently, enum values can - // only be added to the list of allowed values. Deletion and renaming of - // enum values are not supported. Can have up to 500 allowed values. - repeated EnumValue allowed_values = 1; - } - - enum PrimitiveType { - // This is the default invalid value for a type. - PRIMITIVE_TYPE_UNSPECIFIED = 0; - - // A double precision number. - DOUBLE = 1; - - // An UTF-8 string. - STRING = 2; - - // A boolean value. - BOOL = 3; - - // A timestamp. - TIMESTAMP = 4; - } - - // Required. - oneof type_decl { - // Represents primitive types - string, bool etc. - PrimitiveType primitive_type = 1; - - // Represents an enum type. - EnumType enum_type = 2; - } -} diff --git a/google/cloud/datacatalog_v1/proto/timestamps.proto b/google/cloud/datacatalog_v1/proto/timestamps.proto deleted file mode 100644 index a4372ae3..00000000 --- a/google/cloud/datacatalog_v1/proto/timestamps.proto +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1"; -option ruby_package = "Google::Cloud::DataCatalog::V1"; - -// Timestamps about this resource according to a particular system. -message SystemTimestamps { - // The creation time of the resource within the given system. - google.protobuf.Timestamp create_time = 1; - - // The last-modified time of the resource within the given system. - google.protobuf.Timestamp update_time = 2; - - // Output only. The expiration time of the resource within the given system. - // Currently only apllicable to BigQuery resources. - google.protobuf.Timestamp expire_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/google/cloud/datacatalog_v1beta1/proto/common.proto b/google/cloud/datacatalog_v1beta1/proto/common.proto deleted file mode 100644 index a759b371..00000000 --- a/google/cloud/datacatalog_v1beta1/proto/common.proto +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// This enum describes all the possible systems that Data Catalog integrates -// with. -enum IntegratedSystem { - // Default unknown system. - INTEGRATED_SYSTEM_UNSPECIFIED = 0; - - // BigQuery. - BIGQUERY = 1; - - // Cloud Pub/Sub. - CLOUD_PUBSUB = 2; -} diff --git a/google/cloud/datacatalog_v1beta1/proto/datacatalog.proto b/google/cloud/datacatalog_v1beta1/proto/datacatalog.proto deleted file mode 100644 index 038e2203..00000000 --- a/google/cloud/datacatalog_v1beta1/proto/datacatalog.proto +++ /dev/null @@ -1,1186 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/datacatalog/v1beta1/common.proto"; -import "google/cloud/datacatalog/v1beta1/gcs_fileset_spec.proto"; -import "google/cloud/datacatalog/v1beta1/schema.proto"; -import "google/cloud/datacatalog/v1beta1/search.proto"; -import "google/cloud/datacatalog/v1beta1/table_spec.proto"; -import "google/cloud/datacatalog/v1beta1/tags.proto"; -import "google/cloud/datacatalog/v1beta1/timestamps.proto"; -import "google/iam/v1/iam_policy.proto"; -import "google/iam/v1/policy.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Data Catalog API service allows clients to discover, understand, and manage -// their data. -service DataCatalog { - option (google.api.default_host) = "datacatalog.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Searches Data Catalog for multiple resources like entries, tags that - // match a query. - // - // This is a custom method - // (https://cloud.google.com/apis/design/custom_methods) and does not return - // the complete resource, only the resource identifier and high level - // fields. Clients can subsequentally call `Get` methods. - // - // Note that Data Catalog search queries do not guarantee full recall. Query - // results that match your query may not be returned, even in subsequent - // result pages. Also note that results returned (and not returned) can vary - // across repeated search queries. - // - // See [Data Catalog Search - // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) - // for more information. - rpc SearchCatalog(SearchCatalogRequest) returns (SearchCatalogResponse) { - option (google.api.http) = { - post: "/v1beta1/catalog:search" - body: "*" - }; - option (google.api.method_signature) = "scope,query"; - } - - // A maximum of 10,000 entry groups may be created per organization across all - // locations. - // - // Users should enable the Data Catalog API in the project identified by - // the `parent` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc CreateEntryGroup(CreateEntryGroupRequest) returns (EntryGroup) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/entryGroups" - body: "entry_group" - }; - option (google.api.method_signature) = "parent,entry_group_id,entry_group"; - } - - // Updates an EntryGroup. The user should enable the Data Catalog API in the - // project identified by the `entry_group.name` parameter (see [Data Catalog - // Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc UpdateEntryGroup(UpdateEntryGroupRequest) returns (EntryGroup) { - option (google.api.http) = { - patch: "/v1beta1/{entry_group.name=projects/*/locations/*/entryGroups/*}" - body: "entry_group" - }; - option (google.api.method_signature) = "entry_group"; - option (google.api.method_signature) = "entry_group,update_mask"; - } - - // Gets an EntryGroup. - rpc GetEntryGroup(GetEntryGroupRequest) returns (EntryGroup) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/entryGroups/*}" - }; - option (google.api.method_signature) = "name"; - option (google.api.method_signature) = "name,read_mask"; - } - - // Deletes an EntryGroup. Only entry groups that do not contain entries can be - // deleted. Users should enable the Data Catalog API in the project - // identified by the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc DeleteEntryGroup(DeleteEntryGroupRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists entry groups. - rpc ListEntryGroups(ListEntryGroupsRequest) returns (ListEntryGroupsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/entryGroups" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates an entry. Only entries of 'FILESET' type or user-specified type can - // be created. - // - // Users should enable the Data Catalog API in the project identified by - // the `parent` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - // - // A maximum of 100,000 entries may be created per entry group. - rpc CreateEntry(CreateEntryRequest) returns (Entry) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/entries" - body: "entry" - }; - option (google.api.method_signature) = "parent,entry_id,entry"; - } - - // Updates an existing entry. - // Users should enable the Data Catalog API in the project identified by - // the `entry.name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc UpdateEntry(UpdateEntryRequest) returns (Entry) { - option (google.api.http) = { - patch: "/v1beta1/{entry.name=projects/*/locations/*/entryGroups/*/entries/*}" - body: "entry" - }; - option (google.api.method_signature) = "entry"; - option (google.api.method_signature) = "entry,update_mask"; - } - - // Deletes an existing entry. Only entries created through - // [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry] - // method can be deleted. - // Users should enable the Data Catalog API in the project identified by - // the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc DeleteEntry(DeleteEntryRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Gets an entry. - rpc GetEntry(GetEntryRequest) returns (Entry) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Get an entry by target resource name. This method allows clients to use - // the resource name from the source Google Cloud Platform service to get the - // Data Catalog Entry. - rpc LookupEntry(LookupEntryRequest) returns (Entry) { - option (google.api.http) = { - get: "/v1beta1/entries:lookup" - }; - } - - // Lists entries. - rpc ListEntries(ListEntriesRequest) returns (ListEntriesResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/entries" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates a tag template. The user should enable the Data Catalog API in - // the project identified by the `parent` parameter (see [Data Catalog - // Resource - // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) - // for more information). - rpc CreateTagTemplate(CreateTagTemplateRequest) returns (TagTemplate) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/tagTemplates" - body: "tag_template" - }; - option (google.api.method_signature) = "parent,tag_template_id,tag_template"; - } - - // Gets a tag template. - rpc GetTagTemplate(GetTagTemplateRequest) returns (TagTemplate) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates a tag template. This method cannot be used to update the fields of - // a template. The tag template fields are represented as separate resources - // and should be updated using their own create/update/delete methods. - // Users should enable the Data Catalog API in the project identified by - // the `tag_template.name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc UpdateTagTemplate(UpdateTagTemplateRequest) returns (TagTemplate) { - option (google.api.http) = { - patch: "/v1beta1/{tag_template.name=projects/*/locations/*/tagTemplates/*}" - body: "tag_template" - }; - option (google.api.method_signature) = "tag_template"; - option (google.api.method_signature) = "tag_template,update_mask"; - } - - // Deletes a tag template and all tags using the template. - // Users should enable the Data Catalog API in the project identified by - // the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc DeleteTagTemplate(DeleteTagTemplateRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*}" - }; - option (google.api.method_signature) = "name,force"; - } - - // Creates a field in a tag template. The user should enable the Data Catalog - // API in the project identified by the `parent` parameter (see - // [Data Catalog Resource - // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) - // for more information). - rpc CreateTagTemplateField(CreateTagTemplateFieldRequest) returns (TagTemplateField) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*/tagTemplates/*}/fields" - body: "tag_template_field" - }; - option (google.api.method_signature) = "parent,tag_template_field_id,tag_template_field"; - } - - // Updates a field in a tag template. This method cannot be used to update the - // field type. Users should enable the Data Catalog API in the project - // identified by the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc UpdateTagTemplateField(UpdateTagTemplateFieldRequest) returns (TagTemplateField) { - option (google.api.http) = { - patch: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" - body: "tag_template_field" - }; - option (google.api.method_signature) = "name,tag_template_field"; - option (google.api.method_signature) = "name,tag_template_field,update_mask"; - } - - // Renames a field in a tag template. The user should enable the Data Catalog - // API in the project identified by the `name` parameter (see [Data Catalog - // Resource - // Project](https://cloud.google.com/data-catalog/docs/concepts/resource-project) - // for more information). - rpc RenameTagTemplateField(RenameTagTemplateFieldRequest) returns (TagTemplateField) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}:rename" - body: "*" - }; - option (google.api.method_signature) = "name,new_tag_template_field_id"; - } - - // Deletes a field in a tag template and all uses of that field. - // Users should enable the Data Catalog API in the project identified by - // the `name` parameter (see [Data Catalog Resource Project] - // (https://cloud.google.com/data-catalog/docs/concepts/resource-project) for - // more information). - rpc DeleteTagTemplateField(DeleteTagTemplateFieldRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/tagTemplates/*/fields/*}" - }; - option (google.api.method_signature) = "name,force"; - } - - // Creates a tag on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. - // Note: The project identified by the `parent` parameter for the - // [tag](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.entryGroups.entries.tags/create#path-parameters) - // and the - // [tag - // template](https://cloud.google.com/data-catalog/docs/reference/rest/v1beta1/projects.locations.tagTemplates/create#path-parameters) - // used to create the tag must be from the same organization. - rpc CreateTag(CreateTagRequest) returns (Tag) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" - body: "tag" - additional_bindings { - post: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/tags" - body: "tag" - } - }; - option (google.api.method_signature) = "parent,tag"; - } - - // Updates an existing tag. - rpc UpdateTag(UpdateTagRequest) returns (Tag) { - option (google.api.http) = { - patch: "/v1beta1/{tag.name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" - body: "tag" - additional_bindings { - patch: "/v1beta1/{tag.name=projects/*/locations/*/entryGroups/*/tags/*}" - body: "tag" - } - }; - option (google.api.method_signature) = "tag"; - option (google.api.method_signature) = "tag,update_mask"; - } - - // Deletes a tag. - rpc DeleteTag(DeleteTagRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/entries/*/tags/*}" - additional_bindings { - delete: "/v1beta1/{name=projects/*/locations/*/entryGroups/*/tags/*}" - } - }; - option (google.api.method_signature) = "name"; - } - - // Lists the tags on an [Entry][google.cloud.datacatalog.v1beta1.Entry]. - rpc ListTags(ListTagsRequest) returns (ListTagsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags" - additional_bindings { - get: "/v1beta1/{parent=projects/*/locations/*/entryGroups/*}/tags" - } - }; - option (google.api.method_signature) = "parent"; - } - - // Sets the access control policy for a resource. Replaces any existing - // policy. - // Supported resources are: - // - Tag templates. - // - Entries. - // - Entry groups. - // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub - // and any external Google Cloud Platform resources synced to Data Catalog. - // - // Callers must have following Google IAM permission - // - `datacatalog.tagTemplates.setIamPolicy` to set policies on tag - // templates. - // - `datacatalog.entries.setIamPolicy` to set policies on entries. - // - `datacatalog.entryGroups.setIamPolicy` to set policies on entry groups. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:setIamPolicy" - body: "*" - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy" - body: "*" - } - }; - - option (google.api.method_signature) = "resource,policy"; - } - - // Gets the access control policy for a resource. A `NOT_FOUND` error - // is returned if the resource does not exist. An empty policy is returned - // if the resource exists but does not have a policy set on it. - // - // Supported resources are: - // - Tag templates. - // - Entries. - // - Entry groups. - // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub - // and any external Google Cloud Platform resources synced to Data Catalog. - // - // Callers must have following Google IAM permission - // - `datacatalog.tagTemplates.getIamPolicy` to get policies on tag - // templates. - // - `datacatalog.entries.getIamPolicy` to get policies on entries. - // - `datacatalog.entryGroups.getIamPolicy` to get policies on entry groups. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:getIamPolicy" - body: "*" - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:getIamPolicy" - body: "*" - } - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:getIamPolicy" - body: "*" - } - }; - option (google.api.method_signature) = "resource"; - } - - // Returns the caller's permissions on a resource. - // If the resource does not exist, an empty set of permissions is returned - // (We don't return a `NOT_FOUND` error). - // - // Supported resources are: - // - Tag templates. - // - Entries. - // - Entry groups. - // Note, this method cannot be used to manage policies for BigQuery, Pub/Sub - // and any external Google Cloud Platform resources synced to Data Catalog. - // - // A caller is not required to have Google IAM permission to make this - // request. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1beta1/{resource=projects/*/locations/*/tagTemplates/*}:testIamPermissions" - body: "*" - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:testIamPermissions" - body: "*" - } - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:testIamPermissions" - body: "*" - } - }; - } -} - -// Request message for -// [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. -message SearchCatalogRequest { - // The criteria that select the subspace used for query matching. - message Scope { - // The list of organization IDs to search within. To find your organization - // ID, follow instructions in - // https://cloud.google.com/resource-manager/docs/creating-managing-organization. - repeated string include_org_ids = 2; - - // The list of project IDs to search within. To learn more about the - // distinction between project names/IDs/numbers, go to - // https://cloud.google.com/docs/overview/#projects. - repeated string include_project_ids = 3; - - // If `true`, include Google Cloud Platform (GCP) public datasets in the - // search results. Info on GCP public datasets is available at - // https://cloud.google.com/public-datasets/. By default, GCP public - // datasets are excluded. - bool include_gcp_public_datasets = 7; - } - - // Required. The scope of this search request. A `scope` that has empty - // `include_org_ids`, `include_project_ids` AND false - // `include_gcp_public_datasets` is considered invalid. Data Catalog will - // return an error in such a case. - Scope scope = 6 [(google.api.field_behavior) = REQUIRED]; - - // Required. The query string in search query syntax. The query must be non-empty. - // - // Query strings can be simple as "x" or more qualified as: - // - // * name:x - // * column:x - // * description:y - // - // Note: Query tokens need to have a minimum of 3 characters for substring - // matching to work correctly. See [Data Catalog Search - // Syntax](https://cloud.google.com/data-catalog/docs/how-to/search-reference) - // for more information. - string query = 1 [(google.api.field_behavior) = REQUIRED]; - - // Number of results in the search page. If <=0 then defaults to 10. Max limit - // for page_size is 1000. Throws an invalid argument for page_size > 1000. - int32 page_size = 2; - - // Optional. Pagination token returned in an earlier - // [SearchCatalogResponse.next_page_token][google.cloud.datacatalog.v1beta1.SearchCatalogResponse.next_page_token], which - // indicates that this is a continuation of a prior - // [SearchCatalogRequest][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog] - // call, and that the system should return the next page of data. If empty, - // the first page is returned. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Specifies the ordering of results, currently supported case-sensitive - // choices are: - // - // * `relevance`, only supports descending - // * `last_modified_timestamp [asc|desc]`, defaults to descending if not - // specified - // - // If not specified, defaults to `relevance` descending. - string order_by = 5; -} - -// Response message for -// [SearchCatalog][google.cloud.datacatalog.v1beta1.DataCatalog.SearchCatalog]. -message SearchCatalogResponse { - // Search results. - repeated SearchCatalogResult results = 1; - - // The token that can be used to retrieve the next page of results. - string next_page_token = 3; -} - -// Request message for -// [CreateEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntryGroup]. -message CreateEntryGroupRequest { - // Required. The name of the project this entry group is in. Example: - // - // * projects/{project_id}/locations/{location} - // - // Note that this EntryGroup and its child resources may not actually be - // stored in the location in this name. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Required. The id of the entry group to create. - // The id must begin with a letter or underscore, contain only English - // letters, numbers and underscores, and be at most 64 characters. - string entry_group_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // The entry group to create. Defaults to an empty entry group. - EntryGroup entry_group = 2; -} - -// Request message for -// [UpdateEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntryGroup]. -message UpdateEntryGroupRequest { - // Required. The updated entry group. "name" field must be set. - EntryGroup entry_group = 1 [(google.api.field_behavior) = REQUIRED]; - - // The fields to update on the entry group. If absent or empty, all modifiable - // fields are updated. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [GetEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.GetEntryGroup]. -message GetEntryGroupRequest { - // Required. The name of the entry group. For example, - // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // The fields to return. If not set or empty, all fields are returned. - google.protobuf.FieldMask read_mask = 2; -} - -// Request message for -// [DeleteEntryGroup][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntryGroup]. -message DeleteEntryGroupRequest { - // Required. The name of the entry group. For example, - // `projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}`. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Optional. If true, deletes all entries in the entry group. - bool force = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. -message ListEntryGroupsRequest { - // Required. The name of the location that contains the entry groups, which can be - // provided in URL format. Example: - // - // * projects/{project_id}/locations/{location} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Optional. The maximum number of items to return. Default is 10. Max limit is 1000. - // Throws an invalid argument for `page_size > 1000`. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Token that specifies which page is requested. If empty, the first page is - // returned. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response message for -// [ListEntryGroups][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntryGroups]. -message ListEntryGroupsResponse { - // EntryGroup details. - repeated EntryGroup entry_groups = 1; - - // Token to retrieve the next page of results. It is set to empty if no items - // remain in results. - string next_page_token = 2; -} - -// Request message for -// [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry]. -message CreateEntryRequest { - // Required. The name of the entry group this entry is in. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - // - // Note that this Entry and its child resources may not actually be stored in - // the location in this name. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // Required. The id of the entry to create. - string entry_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The entry to create. - Entry entry = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [UpdateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateEntry]. -message UpdateEntryRequest { - // Required. The updated entry. The "name" field must be set. - Entry entry = 1 [(google.api.field_behavior) = REQUIRED]; - - // The fields to update on the entry. If absent or empty, all modifiable - // fields are updated. - // - // The following fields are modifiable: - // * For entries with type `DATA_STREAM`: - // * `schema` - // * For entries with type `FILESET` - // * `schema` - // * `display_name` - // * `description` - // * `gcs_fileset_spec` - // * `gcs_fileset_spec.file_patterns` - // * For entries with `user_specified_type` - // * `schema` - // * `display_name` - // * `description` - // * user_specified_type - // * user_specified_system - // * linked_resource - // * source_system_timestamps - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [DeleteEntry][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteEntry]. -message DeleteEntryRequest { - // Required. The name of the entry. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Request message for -// [GetEntry][google.cloud.datacatalog.v1beta1.DataCatalog.GetEntry]. -message GetEntryRequest { - // Required. The name of the entry. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Request message for -// [LookupEntry][google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntry]. -message LookupEntryRequest { - // Required. Represents either the Google Cloud Platform resource or SQL name - // for a Google Cloud Platform resource. - oneof target_name { - // The full name of the Google Cloud Platform resource the Data Catalog - // entry represents. See: - // https://cloud.google.com/apis/design/resource_names#full_resource_name. - // Full names are case-sensitive. - // - // Examples: - // - // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - // * //pubsub.googleapis.com/projects/projectId/topics/topicId - string linked_resource = 1; - - // The SQL name of the entry. SQL names are case-sensitive. - // - // Examples: - // - // * `pubsub.project_id.topic_id` - // * ``pubsub.project_id.`topic.id.with.dots` `` - // * `bigquery.table.project_id.dataset_id.table_id` - // * `bigquery.dataset.project_id.dataset_id` - // * `datacatalog.entry.project_id.location_id.entry_group_id.entry_id` - // - // `*_id`s shoud satisfy the standard SQL rules for identifiers. - // https://cloud.google.com/bigquery/docs/reference/standard-sql/lexical. - string sql_resource = 3; - } -} - -// Entry Metadata. -// A Data Catalog Entry resource represents another resource in Google -// Cloud Platform (such as a BigQuery dataset or a Pub/Sub topic), or -// outside of Google Cloud Platform. Clients can use the `linked_resource` field -// in the Entry resource to refer to the original resource ID of the source -// system. -// -// An Entry resource contains resource details, such as its schema. An Entry can -// also be used to attach flexible metadata, such as a -// [Tag][google.cloud.datacatalog.v1beta1.Tag]. -message Entry { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/Entry" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}" - }; - - // The Data Catalog resource name of the entry in URL format. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - // - // Note that this Entry and its child resources may not actually be stored in - // the location in this name. - string name = 1 [(google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - }]; - - // The resource this metadata entry refers to. - // - // For Google Cloud Platform resources, `linked_resource` is the [full name of - // the - // resource](https://cloud.google.com/apis/design/resource_names#full_resource_name). - // For example, the `linked_resource` for a table resource from BigQuery is: - // - // * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId - // - // Output only when Entry is of type in the EntryType enum. For entries with - // user_specified_type, this field is optional and defaults to an empty - // string. - string linked_resource = 9; - - // Required. Entry type. - oneof entry_type { - // The type of the entry. - // Only used for Entries with types in the EntryType enum. - EntryType type = 2; - - // Entry type if it does not fit any of the input-allowed values listed in - // `EntryType` enum above. When creating an entry, users should check the - // enum values first, if nothing matches the entry to be created, then - // provide a custom value, for example "my_special_type". - // `user_specified_type` strings must begin with a letter or underscore and - // can only contain letters, numbers, and underscores; are case insensitive; - // must be at least 1 character and at most 64 characters long. - // - // Currently, only FILESET enum value is allowed. All other entries created - // through Data Catalog must use `user_specified_type`. - string user_specified_type = 16; - } - - // The source system of the entry. - oneof system { - // Output only. This field indicates the entry's source system that Data Catalog - // integrates with, such as BigQuery or Pub/Sub. - IntegratedSystem integrated_system = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // This field indicates the entry's source system that Data Catalog does not - // integrate with. `user_specified_system` strings must begin with a letter - // or underscore and can only contain letters, numbers, and underscores; are - // case insensitive; must be at least 1 character and at most 64 characters - // long. - string user_specified_system = 18; - } - - // Type specification information. - oneof type_spec { - // Specification that applies to a Cloud Storage fileset. This is only valid - // on entries of type FILESET. - GcsFilesetSpec gcs_fileset_spec = 6; - - // Specification that applies to a BigQuery table. This is only valid on - // entries of type `TABLE`. - BigQueryTableSpec bigquery_table_spec = 12; - - // Specification for a group of BigQuery tables with name pattern - // `[prefix]YYYYMMDD`. Context: - // https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding. - BigQueryDateShardedSpec bigquery_date_sharded_spec = 15; - } - - // Display information such as title and description. A short name to identify - // the entry, for example, "Analytics Data - Jan 2011". Default value is an - // empty string. - string display_name = 3; - - // Entry description, which can consist of several sentences or paragraphs - // that describe entry contents. Default value is an empty string. - string description = 4; - - // Schema of the entry. An entry might not have any schema attached to it. - Schema schema = 5; - - // Output only. Timestamps about the underlying resource, not about this Data Catalog - // entry. Output only when Entry is of type in the EntryType enum. For entries - // with user_specified_type, this field is optional and defaults to an empty - // timestamp. - SystemTimestamps source_system_timestamps = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// EntryGroup Metadata. -// An EntryGroup resource represents a logical grouping of zero or more -// Data Catalog [Entry][google.cloud.datacatalog.v1beta1.Entry] resources. -message EntryGroup { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/EntryGroup" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}" - }; - - // The resource name of the entry group in URL format. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - // - // Note that this EntryGroup and its child resources may not actually be - // stored in the location in this name. - string name = 1; - - // A short name to identify the entry group, for example, - // "analytics data - jan 2011". Default value is an empty string. - string display_name = 2; - - // Entry group description, which can consist of several sentences or - // paragraphs that describe entry group contents. Default value is an empty - // string. - string description = 3; - - // Output only. Timestamps about this EntryGroup. Default value is empty timestamps. - SystemTimestamps data_catalog_timestamps = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [CreateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplate]. -message CreateTagTemplateRequest { - // Required. The name of the project and the template location - // [region](https://cloud.google.com/data-catalog/docs/concepts/regions. - // - // Example: - // - // * projects/{project_id}/locations/us-central1 - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/TagTemplate" - } - ]; - - // Required. The id of the tag template to create. - string tag_template_id = 3 [(google.api.field_behavior) = REQUIRED]; - - // Required. The tag template to create. - TagTemplate tag_template = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [GetTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.GetTagTemplate]. -message GetTagTemplateRequest { - // Required. The name of the tag template. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplate" - } - ]; -} - -// Request message for -// [UpdateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplate]. -message UpdateTagTemplateRequest { - // Required. The template to update. The "name" field must be set. - TagTemplate tag_template = 1 [(google.api.field_behavior) = REQUIRED]; - - // The field mask specifies the parts of the template to overwrite. - // - // Allowed fields: - // - // * `display_name` - // - // If absent or empty, all of the allowed fields above will be updated. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [DeleteTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplate]. -message DeleteTagTemplateRequest { - // Required. The name of the tag template to delete. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplate" - } - ]; - - // Required. Currently, this field must always be set to `true`. - // This confirms the deletion of any possible tags using this template. - // `force = false` will be supported in the future. - bool force = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [CreateTag][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTag]. -message CreateTagRequest { - // Required. The name of the resource to attach this tag to. Tags can be attached to - // Entries. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - // - // Note that this Tag and its child resources may not actually be stored in - // the location in this name. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Tag" - } - ]; - - // Required. The tag to create. - Tag tag = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [UpdateTag][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTag]. -message UpdateTagRequest { - // Required. The updated tag. The "name" field must be set. - Tag tag = 1 [(google.api.field_behavior) = REQUIRED]; - - // The fields to update on the Tag. If absent or empty, all modifiable fields - // are updated. Currently the only modifiable field is the field `fields`. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [DeleteTag][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTag]. -message DeleteTagRequest { - // Required. The name of the tag to delete. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Tag" - } - ]; -} - -// Request message for -// [CreateTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateField]. -message CreateTagTemplateFieldRequest { - // Required. The name of the project and the template location - // [region](https://cloud.google.com/data-catalog/docs/concepts/regions). - // - // Example: - // - // * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplate" - } - ]; - - // Required. The ID of the tag template field to create. - // Field ids can contain letters (both uppercase and lowercase), numbers - // (0-9), underscores (_) and dashes (-). Field IDs must be at least 1 - // character long and at most 128 characters long. Field IDs must also be - // unique within their template. - string tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The tag template field to create. - TagTemplateField tag_template_field = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [UpdateTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplateField]. -message UpdateTagTemplateFieldRequest { - // Required. The name of the tag template field. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplateField" - } - ]; - - // Required. The template to update. - TagTemplateField tag_template_field = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The field mask specifies the parts of the template to be updated. - // Allowed fields: - // - // * `display_name` - // * `type.enum_type` - // * `is_required` - // - // If `update_mask` is not set or empty, all of the allowed fields above will - // be updated. - // - // When updating an enum type, the provided values will be merged with the - // existing values. Therefore, enum values can only be added, existing enum - // values cannot be deleted nor renamed. Updating a template field from - // optional to required is NOT allowed. - google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request message for -// [RenameTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.RenameTagTemplateField]. -message RenameTagTemplateFieldRequest { - // Required. The name of the tag template. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplateField" - } - ]; - - // Required. The new ID of this tag template field. For example, `my_new_field`. - string new_tag_template_field_id = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [DeleteTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplateField]. -message DeleteTagTemplateFieldRequest { - // Required. The name of the tag template field to delete. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}/fields/{tag_template_field_id} - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/TagTemplateField" - } - ]; - - // Required. Currently, this field must always be set to `true`. - // This confirms the deletion of this field from any tags using this field. - // `force = false` will be supported in the future. - bool force = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Request message for -// [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. -message ListTagsRequest { - // Required. The name of the Data Catalog resource to list the tags of. The resource - // could be an [Entry][google.cloud.datacatalog.v1beta1.Entry] or an - // [EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup]. - // - // Examples: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Tag" - } - ]; - - // The maximum number of tags to return. Default is 10. Max limit is 1000. - int32 page_size = 2; - - // Token that specifies which page is requested. If empty, the first page is - // returned. - string page_token = 3; -} - -// Response message for -// [ListTags][google.cloud.datacatalog.v1beta1.DataCatalog.ListTags]. -message ListTagsResponse { - // [Tag][google.cloud.datacatalog.v1beta1.Tag] details. - repeated Tag tags = 1; - - // Token to retrieve the next page of results. It is set to empty if no items - // remain in results. - string next_page_token = 2; -} - -// Request message for -// [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. -message ListEntriesRequest { - // Required. The name of the entry group that contains the entries, which can - // be provided in URL format. Example: - // - // * projects/{project_id}/locations/{location}/entryGroups/{entry_group_id} - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/EntryGroup" - } - ]; - - // The maximum number of items to return. Default is 10. Max limit is 1000. - // Throws an invalid argument for `page_size > 1000`. - int32 page_size = 2; - - // Token that specifies which page is requested. If empty, the first page is - // returned. - string page_token = 3; - - // The fields to return for each Entry. If not set or empty, all - // fields are returned. - // For example, setting read_mask to contain only one path "name" will cause - // ListEntries to return a list of Entries with only "name" field. - google.protobuf.FieldMask read_mask = 4; -} - -// Response message for -// [ListEntries][google.cloud.datacatalog.v1beta1.DataCatalog.ListEntries]. -message ListEntriesResponse { - // Entry details. - repeated Entry entries = 1; - - // Token to retrieve the next page of results. It is set to empty if no items - // remain in results. - string next_page_token = 2; -} - -// Entry resources in Data Catalog can be of different types e.g. a BigQuery -// Table entry is of type `TABLE`. This enum describes all the possible types -// Data Catalog contains. -enum EntryType { - // Default unknown type. - ENTRY_TYPE_UNSPECIFIED = 0; - - // Output only. The type of entry that has a GoogleSQL schema, including - // logical views. - TABLE = 2; - - // Output only. The type of models. - // https://cloud.google.com/bigquery-ml/docs/bigqueryml-intro - MODEL = 5; - - // Output only. An entry type which is used for streaming entries. Example: - // Pub/Sub topic. - DATA_STREAM = 3; - - // An entry type which is a set of files or objects. Example: - // Cloud Storage fileset. - FILESET = 4; -} diff --git a/google/cloud/datacatalog_v1beta1/proto/gcs_fileset_spec.proto b/google/cloud/datacatalog_v1beta1/proto/gcs_fileset_spec.proto deleted file mode 100644 index c8ca9779..00000000 --- a/google/cloud/datacatalog_v1beta1/proto/gcs_fileset_spec.proto +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/cloud/datacatalog/v1beta1/timestamps.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Describes a Cloud Storage fileset entry. -message GcsFilesetSpec { - // Required. Patterns to identify a set of files in Google Cloud Storage. - // See [Cloud Storage - // documentation](https://cloud.google.com/storage/docs/gsutil/addlhelp/WildcardNames) - // for more information. Note that bucket wildcards are currently not - // supported. - // - // Examples of valid file_patterns: - // - // * `gs://bucket_name/dir/*`: matches all files within `bucket_name/dir` - // directory. - // * `gs://bucket_name/dir/**`: matches all files in `bucket_name/dir` - // spanning all subdirectories. - // * `gs://bucket_name/file*`: matches files prefixed by `file` in - // `bucket_name` - // * `gs://bucket_name/??.txt`: matches files with two characters followed by - // `.txt` in `bucket_name` - // * `gs://bucket_name/[aeiou].txt`: matches files that contain a single - // vowel character followed by `.txt` in - // `bucket_name` - // * `gs://bucket_name/[a-m].txt`: matches files that contain `a`, `b`, ... - // or `m` followed by `.txt` in `bucket_name` - // * `gs://bucket_name/a/*/b`: matches all files in `bucket_name` that match - // `a/*/b` pattern, such as `a/c/b`, `a/d/b` - // * `gs://another_bucket/a.txt`: matches `gs://another_bucket/a.txt` - // - // You can combine wildcards to provide more powerful matches, for example: - // - // * `gs://bucket_name/[a-m]??.j*g` - repeated string file_patterns = 1 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Sample files contained in this fileset, not all files contained in this - // fileset are represented here. - repeated GcsFileSpec sample_gcs_file_specs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Specifications of a single file in Cloud Storage. -message GcsFileSpec { - // Required. The full file path. Example: `gs://bucket_name/a/b.txt`. - string file_path = 1 [(google.api.field_behavior) = REQUIRED]; - - // Output only. Timestamps about the Cloud Storage file. - SystemTimestamps gcs_timestamps = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The size of the file, in bytes. - int64 size_bytes = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/google/cloud/datacatalog_v1beta1/proto/policytagmanager.proto b/google/cloud/datacatalog_v1beta1/proto/policytagmanager.proto deleted file mode 100644 index 5602bcf1..00000000 --- a/google/cloud/datacatalog_v1beta1/proto/policytagmanager.proto +++ /dev/null @@ -1,417 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/datacatalog/v1beta1/timestamps.proto"; -import "google/iam/v1/iam_policy.proto"; -import "google/iam/v1/policy.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_outer_classname = "PolicyTagManagerProto"; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// The policy tag manager API service allows clients to manage their taxonomies -// and policy tags. -service PolicyTagManager { - option (google.api.default_host) = "datacatalog.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a taxonomy in the specified project. - rpc CreateTaxonomy(CreateTaxonomyRequest) returns (Taxonomy) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/taxonomies" - body: "taxonomy" - }; - option (google.api.method_signature) = "parent,taxonomy"; - } - - // Deletes a taxonomy. This operation will also delete all - // policy tags in this taxonomy along with their associated policies. - rpc DeleteTaxonomy(DeleteTaxonomyRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/taxonomies/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates a taxonomy. - rpc UpdateTaxonomy(UpdateTaxonomyRequest) returns (Taxonomy) { - option (google.api.http) = { - patch: "/v1beta1/{taxonomy.name=projects/*/locations/*/taxonomies/*}" - body: "taxonomy" - }; - option (google.api.method_signature) = "taxonomy"; - } - - // Lists all taxonomies in a project in a particular location that the caller - // has permission to view. - rpc ListTaxonomies(ListTaxonomiesRequest) returns (ListTaxonomiesResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/taxonomies" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a taxonomy. - rpc GetTaxonomy(GetTaxonomyRequest) returns (Taxonomy) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/taxonomies/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a policy tag in the specified taxonomy. - rpc CreatePolicyTag(CreatePolicyTagRequest) returns (PolicyTag) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" - body: "policy_tag" - }; - option (google.api.method_signature) = "parent,policy_tag"; - } - - // Deletes a policy tag. Also deletes all of its descendant policy tags. - rpc DeletePolicyTag(DeletePolicyTagRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Updates a policy tag. - rpc UpdatePolicyTag(UpdatePolicyTagRequest) returns (PolicyTag) { - option (google.api.http) = { - patch: "/v1beta1/{policy_tag.name=projects/*/locations/*/taxonomies/*/policyTags/*}" - body: "policy_tag" - }; - option (google.api.method_signature) = "policy_tag"; - } - - // Lists all policy tags in a taxonomy. - rpc ListPolicyTags(ListPolicyTagsRequest) returns (ListPolicyTagsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/taxonomies/*}/policyTags" - }; - option (google.api.method_signature) = "parent"; - } - - // Gets a policy tag. - rpc GetPolicyTag(GetPolicyTagRequest) returns (PolicyTag) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/taxonomies/*/policyTags/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Gets the IAM policy for a taxonomy or a policy tag. - rpc GetIamPolicy(google.iam.v1.GetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:getIamPolicy" - body: "*" - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:getIamPolicy" - body: "*" - } - }; - } - - // Sets the IAM policy for a taxonomy or a policy tag. - rpc SetIamPolicy(google.iam.v1.SetIamPolicyRequest) returns (google.iam.v1.Policy) { - option (google.api.http) = { - post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:setIamPolicy" - body: "*" - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:setIamPolicy" - body: "*" - } - }; - } - - // Returns the permissions that a caller has on the specified taxonomy or - // policy tag. - rpc TestIamPermissions(google.iam.v1.TestIamPermissionsRequest) returns (google.iam.v1.TestIamPermissionsResponse) { - option (google.api.http) = { - post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*}:testIamPermissions" - body: "*" - additional_bindings { - post: "/v1beta1/{resource=projects/*/locations/*/taxonomies/*/policyTags/*}:testIamPermissions" - body: "*" - } - }; - } -} - -// A taxonomy is a collection of policy tags that classify data along a common -// axis. For instance a data *sensitivity* taxonomy could contain policy tags -// denoting PII such as age, zipcode, and SSN. A data *origin* taxonomy could -// contain policy tags to distinguish user data, employee data, partner data, -// public data. -message Taxonomy { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/Taxonomy" - pattern: "projects/{project}/locations/{location}/taxonomies/{taxonomy}" - }; - - // Defines policy types where policy tag can be used for. - enum PolicyType { - // Unspecified policy type. - POLICY_TYPE_UNSPECIFIED = 0; - - // Fine grained access control policy, which enables access control on - // tagged resources. - FINE_GRAINED_ACCESS_CONTROL = 1; - } - - // Output only. Resource name of this taxonomy, whose format is: - // "projects/{project_number}/locations/{location_id}/taxonomies/{id}". - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. User defined name of this taxonomy. It must: contain only unicode letters, - // numbers, underscores, dashes and spaces; not start or end with spaces; and - // be at most 200 bytes long when encoded in UTF-8. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Description of this taxonomy. It must: contain only unicode characters, - // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes - // long when encoded in UTF-8. If not set, defaults to an empty description. - string description = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A list of policy types that are activated for this taxonomy. If not set, - // defaults to an empty list. - repeated PolicyType activated_policy_types = 6 [(google.api.field_behavior) = OPTIONAL]; -} - -// Denotes one policy tag in a taxonomy (e.g. ssn). Policy Tags can be defined -// in a hierarchy. For example, consider the following hierarchy: -// Geolocation -> (LatLong, City, ZipCode). PolicyTag "Geolocation" -// contains three child policy tags: "LatLong", "City", and "ZipCode". -message PolicyTag { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/PolicyTag" - pattern: "projects/{project}/locations/{location}/taxonomies/{taxonomy}/policyTags/{policy_tag}" - }; - - // Output only. Resource name of this policy tag, whose format is: - // "projects/{project_number}/locations/{location_id}/taxonomies/{taxonomy_id}/policyTags/{id}". - string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. User defined name of this policy tag. It must: be unique within the parent - // taxonomy; contain only unicode letters, numbers, underscores, dashes and - // spaces; not start or end with spaces; and be at most 200 bytes long when - // encoded in UTF-8. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Description of this policy tag. It must: contain only unicode characters, - // tabs, newlines, carriage returns and page breaks; and be at most 2000 bytes - // long when encoded in UTF-8. If not set, defaults to an empty description. - // If not set, defaults to an empty description. - string description = 3; - - // Resource name of this policy tag's parent policy tag (e.g. for the - // "LatLong" policy tag in the example above, this field contains the - // resource name of the "Geolocation" policy tag). If empty, it means this - // policy tag is a top level policy tag (e.g. this field is empty for the - // "Geolocation" policy tag in the example above). If not set, defaults to an - // empty string. - string parent_policy_tag = 4; - - // Output only. Resource names of child policy tags of this policy tag. - repeated string child_policy_tags = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Request message for -// [CreateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreateTaxonomy]. -message CreateTaxonomyRequest { - // Required. Resource name of the project that the taxonomy will belong to. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // The taxonomy to be created. - Taxonomy taxonomy = 2; -} - -// Request message for -// [DeleteTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeleteTaxonomy]. -message DeleteTaxonomyRequest { - // Required. Resource name of the taxonomy to be deleted. All policy tags in - // this taxonomy will also be deleted. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Taxonomy" - } - ]; -} - -// Request message for -// [UpdateTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdateTaxonomy]. -message UpdateTaxonomyRequest { - // The taxonomy to update. Only description, display_name, and activated - // policy types can be updated. - Taxonomy taxonomy = 1; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - // If not set, defaults to all of the fields that are allowed to update. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. -message ListTaxonomiesRequest { - // Required. Resource name of the project to list the taxonomies of. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // The maximum number of items to return. Must be a value between 1 and 1000. - // If not set, defaults to 50. - int32 page_size = 2; - - // The next_page_token value returned from a previous list request, if any. If - // not set, defaults to an empty string. - string page_token = 3; -} - -// Response message for -// [ListTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListTaxonomies]. -message ListTaxonomiesResponse { - // Taxonomies that the project contains. - repeated Taxonomy taxonomies = 1; - - // Token used to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// Request message for -// [GetTaxonomy][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetTaxonomy]. -message GetTaxonomyRequest { - // Required. Resource name of the requested taxonomy. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Taxonomy" - } - ]; -} - -// Request message for -// [CreatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.CreatePolicyTag]. -message CreatePolicyTagRequest { - // Required. Resource name of the taxonomy that the policy tag will belong to. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/PolicyTag" - } - ]; - - // The policy tag to be created. - PolicyTag policy_tag = 2; -} - -// Request message for -// [DeletePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.DeletePolicyTag]. -message DeletePolicyTagRequest { - // Required. Resource name of the policy tag to be deleted. All of its descendant - // policy tags will also be deleted. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/PolicyTag" - } - ]; -} - -// Request message for -// [UpdatePolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.UpdatePolicyTag]. -message UpdatePolicyTagRequest { - // The policy tag to update. Only the description, display_name, and - // parent_policy_tag fields can be updated. - PolicyTag policy_tag = 1; - - // The update mask applies to the resource. Only display_name, description and - // parent_policy_tag can be updated and thus can be listed in the mask. If - // update_mask is not provided, all allowed fields (i.e. display_name, - // description and parent) will be updated. For more information including the - // `FieldMask` definition, see - // https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - // If not set, defaults to all of the fields that are allowed to update. - google.protobuf.FieldMask update_mask = 2; -} - -// Request message for -// [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. -message ListPolicyTagsRequest { - // Required. Resource name of the taxonomy to list the policy tags of. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/PolicyTag" - } - ]; - - // The maximum number of items to return. Must be a value between 1 and 1000. - // If not set, defaults to 50. - int32 page_size = 2; - - // The next_page_token value returned from a previous List request, if any. If - // not set, defaults to an empty string. - string page_token = 3; -} - -// Response message for -// [ListPolicyTags][google.cloud.datacatalog.v1beta1.PolicyTagManager.ListPolicyTags]. -message ListPolicyTagsResponse { - // The policy tags that are in the requested taxonomy. - repeated PolicyTag policy_tags = 1; - - // Token used to retrieve the next page of results, or empty if there are no - // more results in the list. - string next_page_token = 2; -} - -// Request message for -// [GetPolicyTag][google.cloud.datacatalog.v1beta1.PolicyTagManager.GetPolicyTag]. -message GetPolicyTagRequest { - // Required. Resource name of the requested policy tag. - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/PolicyTag" - } - ]; -} diff --git a/google/cloud/datacatalog_v1beta1/proto/policytagmanagerserialization.proto b/google/cloud/datacatalog_v1beta1/proto/policytagmanagerserialization.proto deleted file mode 100644 index b6e4fb32..00000000 --- a/google/cloud/datacatalog_v1beta1/proto/policytagmanagerserialization.proto +++ /dev/null @@ -1,157 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/datacatalog/v1beta1/policytagmanager.proto"; -import "google/iam/v1/policy.proto"; -import "google/api/client.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_outer_classname = "PolicyTagManagerSerializationProto"; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Policy tag manager serialization API service allows clients to manipulate -// their taxonomies and policy tags data with serialized format. -service PolicyTagManagerSerialization { - option (google.api.default_host) = "datacatalog.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Imports all taxonomies and their policy tags to a project as new - // taxonomies. - // - // This method provides a bulk taxonomy / policy tag creation using nested - // proto structure. - rpc ImportTaxonomies(ImportTaxonomiesRequest) returns (ImportTaxonomiesResponse) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/taxonomies:import" - body: "*" - }; - } - - // Exports all taxonomies and their policy tags in a project. - // - // This method generates SerializedTaxonomy protos with nested policy tags - // that can be used as an input for future ImportTaxonomies calls. - rpc ExportTaxonomies(ExportTaxonomiesRequest) returns (ExportTaxonomiesResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/taxonomies:export" - }; - } -} - -// Message capturing a taxonomy and its policy tag hierarchy as a nested proto. -// Used for taxonomy import/export and mutation. -message SerializedTaxonomy { - // Required. Display name of the taxonomy. Max 200 bytes when encoded in UTF-8. - string display_name = 1 [(google.api.field_behavior) = REQUIRED]; - - // Description of the serialized taxonomy. The length of the - // description is limited to 2000 bytes when encoded in UTF-8. If not set, - // defaults to an empty description. - string description = 2; - - // Top level policy tags associated with the taxonomy if any. - repeated SerializedPolicyTag policy_tags = 3; -} - -// Message representing one policy tag when exported as a nested proto. -message SerializedPolicyTag { - // Required. Display name of the policy tag. Max 200 bytes when encoded in UTF-8. - string display_name = 2 [(google.api.field_behavior) = REQUIRED]; - - // Description of the serialized policy tag. The length of the - // description is limited to 2000 bytes when encoded in UTF-8. If not set, - // defaults to an empty description. - string description = 3; - - // Children of the policy tag if any. - repeated SerializedPolicyTag child_policy_tags = 4; -} - -// Request message for -// [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. -message ImportTaxonomiesRequest { - // Required. Resource name of project that the newly created taxonomies will - // belong to. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // Required. Source taxonomies to be imported in a tree structure. - oneof source { - // Inline source used for taxonomies import - InlineSource inline_source = 2; - } -} - -// Inline source used for taxonomies import. -message InlineSource { - // Required. Taxonomies to be imported. - repeated SerializedTaxonomy taxonomies = 1 [(google.api.field_behavior) = REQUIRED]; -} - -// Response message for -// [ImportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ImportTaxonomies]. -message ImportTaxonomiesResponse { - // Taxonomies that were imported. - repeated Taxonomy taxonomies = 1; -} - -// Request message for -// [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. -message ExportTaxonomiesRequest { - // Required. Resource name of the project that taxonomies to be exported - // will share. - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - child_type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // Required. Resource names of the taxonomies to be exported. - repeated string taxonomies = 2 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Taxonomy" - } - ]; - - // Required. Taxonomies export destination. - oneof destination { - // Export taxonomies as serialized taxonomies. - bool serialized_taxonomies = 3; - } -} - -// Response message for -// [ExportTaxonomies][google.cloud.datacatalog.v1beta1.PolicyTagManagerSerialization.ExportTaxonomies]. -message ExportTaxonomiesResponse { - // List of taxonomies and policy tags in a tree structure. - repeated SerializedTaxonomy taxonomies = 1; -} diff --git a/google/cloud/datacatalog_v1beta1/proto/schema.proto b/google/cloud/datacatalog_v1beta1/proto/schema.proto deleted file mode 100644 index d8e69fd4..00000000 --- a/google/cloud/datacatalog_v1beta1/proto/schema.proto +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). -message Schema { - // Required. Schema of columns. A maximum of 10,000 columns and sub-columns can be - // specified. - repeated ColumnSchema columns = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Representation of a column within a schema. Columns could be nested inside -// other columns. -message ColumnSchema { - // Required. Name of the column. - string column = 6 [(google.api.field_behavior) = REQUIRED]; - - // Required. Type of the column. - string type = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. Description of the column. Default value is an empty string. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A column's mode indicates whether the values in this column are required, - // nullable, etc. Only `NULLABLE`, `REQUIRED` and `REPEATED` are supported. - // Default mode is `NULLABLE`. - string mode = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Schema of sub-columns. A column can have zero or more sub-columns. - repeated ColumnSchema subcolumns = 7 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/google/cloud/datacatalog_v1beta1/proto/search.proto b/google/cloud/datacatalog_v1beta1/proto/search.proto deleted file mode 100644 index c1f41412..00000000 --- a/google/cloud/datacatalog_v1beta1/proto/search.proto +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/cloud/datacatalog/v1beta1/common.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// A result that appears in the response of a search request. Each result -// captures details of one entry that matches the search. -message SearchCatalogResult { - // Type of the search result. This field can be used to determine which Get - // method to call to fetch the full resource. - SearchResultType search_result_type = 1; - - // Sub-type of the search result. This is a dot-delimited description of the - // resource's full type, and is the same as the value callers would provide in - // the "type" search facet. Examples: `entry.table`, `entry.dataStream`, - // `tagTemplate`. - string search_result_subtype = 2; - - // The relative resource name of the resource in URL format. - // Examples: - // - // * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}` - // * `projects/{project_id}/tagTemplates/{tag_template_id}` - string relative_resource_name = 3; - - // The full name of the cloud resource the entry belongs to. See: - // https://cloud.google.com/apis/design/resource_names#full_resource_name. - // Example: - // - // * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId` - string linked_resource = 4; -} - -// The different types of resources that can be returned in search. -enum SearchResultType { - // Default unknown type. - SEARCH_RESULT_TYPE_UNSPECIFIED = 0; - - // An [Entry][google.cloud.datacatalog.v1beta1.Entry]. - ENTRY = 1; - - // A [TagTemplate][google.cloud.datacatalog.v1beta1.TagTemplate]. - TAG_TEMPLATE = 2; - - // An [EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup]. - ENTRY_GROUP = 3; -} diff --git a/google/cloud/datacatalog_v1beta1/proto/table_spec.proto b/google/cloud/datacatalog_v1beta1/proto/table_spec.proto deleted file mode 100644 index c08f43ef..00000000 --- a/google/cloud/datacatalog_v1beta1/proto/table_spec.proto +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Describes a BigQuery table. -message BigQueryTableSpec { - // Output only. The table source type. - TableSourceType table_source_type = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. - oneof type_spec { - // Table view specification. This field should only be populated if - // `table_source_type` is `BIGQUERY_VIEW`. - ViewSpec view_spec = 2; - - // Spec of a BigQuery table. This field should only be populated if - // `table_source_type` is `BIGQUERY_TABLE`. - TableSpec table_spec = 3; - } -} - -// Table source type. -enum TableSourceType { - // Default unknown type. - TABLE_SOURCE_TYPE_UNSPECIFIED = 0; - - // Table view. - BIGQUERY_VIEW = 2; - - // BigQuery native table. - BIGQUERY_TABLE = 5; -} - -// Table view specification. -message ViewSpec { - // Output only. The query that defines the table view. - string view_query = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Normal BigQuery table spec. -message TableSpec { - // Output only. If the table is a dated shard, i.e., with name pattern `[prefix]YYYYMMDD`, - // `grouped_entry` is the Data Catalog resource name of the date sharded - // grouped entry, for example, - // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. - // Otherwise, `grouped_entry` is empty. - string grouped_entry = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; -} - -// Spec for a group of BigQuery tables with name pattern `[prefix]YYYYMMDD`. -// Context: -// https://cloud.google.com/bigquery/docs/partitioned-tables#partitioning_versus_sharding -message BigQueryDateShardedSpec { - // Output only. The Data Catalog resource name of the dataset entry the current table - // belongs to, for example, - // `projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}`. - string dataset = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.resource_reference) = { - type: "datacatalog.googleapis.com/Entry" - } - ]; - - // Output only. The table name prefix of the shards. The name of any given shard is - // `[table_prefix]YYYYMMDD`, for example, for shard `MyTable20180101`, the - // `table_prefix` is `MyTable`. - string table_prefix = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Total number of shards. - int64 shard_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/google/cloud/datacatalog_v1beta1/proto/tags.proto b/google/cloud/datacatalog_v1beta1/proto/tags.proto deleted file mode 100644 index c15fb218..00000000 --- a/google/cloud/datacatalog_v1beta1/proto/tags.proto +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Tags are used to attach custom metadata to Data Catalog resources. Tags -// conform to the specifications within their tag template. -// -// See [Data Catalog -// IAM](https://cloud.google.com/data-catalog/docs/concepts/iam) for information -// on the permissions needed to create or view tags. -message Tag { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/Tag" - pattern: "projects/{project}/locations/{location}/entryGroups/{entry_group}/entries/{entry}/tags/{tag}" - }; - - // The resource name of the tag in URL format. Example: - // - // * projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id} - // - // where `tag_id` is a system-generated identifier. - // Note that this Tag may not actually be stored in the location in this name. - string name = 1; - - // Required. The resource name of the tag template that this tag uses. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - // - // This field cannot be modified after creation. - string template = 2 [(google.api.field_behavior) = REQUIRED]; - - // Output only. The display name of the tag template. - string template_display_name = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The scope within the parent resource that this tag is attached to. If not - // provided, the tag is attached to the parent resource itself. - // Deleting the scope from the parent resource will delete all tags attached - // to that scope. These fields cannot be updated after creation. - oneof scope { - // Resources like Entry can have schemas associated with them. This scope - // allows users to attach tags to an individual column based on that schema. - // - // For attaching a tag to a nested column, use `.` to separate the column - // names. Example: - // - // * `outer_column.inner_column` - string column = 4; - } - - // Required. This maps the ID of a tag field to the value of and additional information - // about that field. Valid field IDs are defined by the tag's template. A tag - // must have at least 1 field and at most 500 fields. - map fields = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Contains the value and supporting information for a field within -// a [Tag][google.cloud.datacatalog.v1beta1.Tag]. -message TagField { - // Holds an enum value. - message EnumValue { - // The display name of the enum value. - string display_name = 1; - } - - // Output only. The display name of this field. - string display_name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Required. The value of this field. - oneof kind { - // Holds the value for a tag field with double type. - double double_value = 2; - - // Holds the value for a tag field with string type. - string string_value = 3; - - // Holds the value for a tag field with boolean type. - bool bool_value = 4; - - // Holds the value for a tag field with timestamp type. - google.protobuf.Timestamp timestamp_value = 5; - - // Holds the value for a tag field with enum type. This value must be - // one of the allowed values in the definition of this enum. - EnumValue enum_value = 6; - } - - // Output only. The order of this field with respect to other fields in this tag. It can be - // set in [Tag][google.cloud.datacatalog.v1beta1.TagTemplateField.order]. For - // example, a higher value can indicate a more important field. The value can - // be negative. Multiple fields can have the same order, and field orders - // within a tag do not have to be sequential. - int32 order = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A tag template defines a tag, which can have one or more typed fields. -// The template is used to create and attach the tag to GCP resources. -// [Tag template -// roles](https://cloud.google.com/iam/docs/understanding-roles#data-catalog-roles) -// provide permissions to create, edit, and use the template. See, for example, -// the [TagTemplate -// User](https://cloud.google.com/data-catalog/docs/how-to/template-user) role, -// which includes permission to use the tag template to tag resources. -message TagTemplate { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/TagTemplate" - pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}" - }; - - // The resource name of the tag template in URL format. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id} - // - // Note that this TagTemplate and its child resources may not actually be - // stored in the location in this name. - string name = 1; - - // The display name for this template. Defaults to an empty string. - string display_name = 2; - - // Required. Map of tag template field IDs to the settings for the field. - // This map is an exhaustive list of the allowed fields. This map must contain - // at least one field and at most 500 fields. - // - // The keys to this map are tag template field IDs. Field IDs can contain - // letters (both uppercase and lowercase), numbers (0-9) and underscores (_). - // Field IDs must be at least 1 character long and at most - // 64 characters long. Field IDs must start with a letter or underscore. - map fields = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The template for an individual field within a tag template. -message TagTemplateField { - option (google.api.resource) = { - type: "datacatalog.googleapis.com/TagTemplateField" - pattern: "projects/{project}/locations/{location}/tagTemplates/{tag_template}/fields/{field}" - }; - - // Output only. The resource name of the tag template field in URL format. Example: - // - // * projects/{project_id}/locations/{location}/tagTemplates/{tag_template}/fields/{field} - // - // Note that this TagTemplateField may not actually be stored in the location - // in this name. - string name = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The display name for this field. Defaults to an empty string. - string display_name = 1; - - // Required. The type of value this tag field can contain. - FieldType type = 2 [(google.api.field_behavior) = REQUIRED]; - - // Whether this is a required field. Defaults to false. - bool is_required = 3; - - // The order of this field with respect to other fields in this tag - // template. A higher value indicates a more important field. The value can - // be negative. Multiple fields can have the same order, and field orders - // within a tag do not have to be sequential. - int32 order = 5; -} - -message FieldType { - message EnumType { - message EnumValue { - // Required. The display name of the enum value. Must not be an empty string. - string display_name = 1 [(google.api.field_behavior) = REQUIRED]; - } - - // Required on create; optional on update. The set of allowed values for - // this enum. This set must not be empty, the display names of the values in - // this set must not be empty and the display names of the values must be - // case-insensitively unique within this set. Currently, enum values can - // only be added to the list of allowed values. Deletion and renaming of - // enum values are not supported. Can have up to 500 allowed values. - repeated EnumValue allowed_values = 1; - } - - enum PrimitiveType { - // This is the default invalid value for a type. - PRIMITIVE_TYPE_UNSPECIFIED = 0; - - // A double precision number. - DOUBLE = 1; - - // An UTF-8 string. - STRING = 2; - - // A boolean value. - BOOL = 3; - - // A timestamp. - TIMESTAMP = 4; - } - - // Required. - oneof type_decl { - // Represents primitive types - string, bool etc. - PrimitiveType primitive_type = 1; - - // Represents an enum type. - EnumType enum_type = 2; - } -} diff --git a/google/cloud/datacatalog_v1beta1/proto/timestamps.proto b/google/cloud/datacatalog_v1beta1/proto/timestamps.proto deleted file mode 100644 index dc49c75c..00000000 --- a/google/cloud/datacatalog_v1beta1/proto/timestamps.proto +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright 2020 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.datacatalog.v1beta1; - -import "google/api/field_behavior.proto"; -import "google/protobuf/timestamp.proto"; - -option cc_enable_arenas = true; -option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1"; -option go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog"; -option java_multiple_files = true; -option java_package = "com.google.cloud.datacatalog.v1beta1"; -option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1"; -option ruby_package = "Google::Cloud::DataCatalog::V1beta1"; - -// Timestamps about this resource according to a particular system. -message SystemTimestamps { - // The creation time of the resource within the given system. - google.protobuf.Timestamp create_time = 1; - - // The last-modified time of the resource within the given system. - google.protobuf.Timestamp update_time = 2; - - // Output only. The expiration time of the resource within the given system. - // Currently only apllicable to BigQuery resources. - google.protobuf.Timestamp expire_time = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; -} diff --git a/noxfile.py b/noxfile.py index 04c230d2..d896e7f7 100644 --- a/noxfile.py +++ b/noxfile.py @@ -179,7 +179,7 @@ def docs(session): """Build the docs for this library.""" session.install("-e", ".") - session.install("sphinx", "alabaster", "recommonmark") + session.install("sphinx==4.0.1", "alabaster", "recommonmark") shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( @@ -201,7 +201,9 @@ def docfx(session): """Build the docfx yaml files for this library.""" session.install("-e", ".") - session.install("sphinx", "alabaster", "recommonmark", "gcp-sphinx-docfx-yaml") + session.install( + "sphinx==4.0.1", "alabaster", "recommonmark", "gcp-sphinx-docfx-yaml" + ) shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( diff --git a/samples/snippets/noxfile.py b/samples/snippets/noxfile.py index 956cdf4f..5ff9e1db 100644 --- a/samples/snippets/noxfile.py +++ b/samples/snippets/noxfile.py @@ -50,7 +50,10 @@ # to use your own Cloud project. 'gcloud_project_env': 'GOOGLE_CLOUD_PROJECT', # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT', - + # If you need to use a specific version of pip, + # change pip_version_override to the string representation + # of the version number, for example, "20.2.4" + "pip_version_override": None, # A dictionary you want to inject into your test. Don't put any # secrets here. These values will override predefined values. 'envs': {}, @@ -170,6 +173,9 @@ def blacken(session: nox.sessions.Session) -> None: def _session_tests(session: nox.sessions.Session, post_install: Callable = None) -> None: + if TEST_CONFIG["pip_version_override"]: + pip_version = TEST_CONFIG["pip_version_override"] + session.install(f"pip=={pip_version}") """Runs py.test for a particular project.""" if os.path.exists("requirements.txt"): if os.path.exists("constraints.txt"): diff --git a/samples/snippets/requirements.txt b/samples/snippets/requirements.txt index 3a507e77..39ef14b2 100644 --- a/samples/snippets/requirements.txt +++ b/samples/snippets/requirements.txt @@ -1 +1 @@ -google-cloud-datacatalog==3.1.1 +google-cloud-datacatalog==3.2.0 diff --git a/setup.py b/setup.py index f5e45b3b..ef55deb3 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ name = "google-cloud-datacatalog" description = "Google Cloud Data Catalog API API client library" -version = "3.2.0" +version = "3.2.1" # Should be one of: # 'Development Status :: 3 - Alpha' # 'Development Status :: 4 - Beta' @@ -32,6 +32,7 @@ "grpc-google-iam-v1 >= 0.12.3, < 0.13dev", "libcst >= 0.2.5", "proto-plus >= 1.4.0", + "packaging >= 14.3", ] package_root = os.path.abspath(os.path.dirname(__file__)) diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt index 770a9840..8dd34015 100644 --- a/testing/constraints-3.6.txt +++ b/testing/constraints-3.6.txt @@ -10,3 +10,5 @@ grpc-google-iam-v1==0.12.3 libcst==0.2.5 proto-plus==1.4.0 google-auth==1.24.0 # TODO(busunkim): remove when google-auth>=1.25.0 is implicitly required through newer google-api-core +packaging==14.3 +google-auth==1.24.0 # TODO: remove when google-auth>=1.25.0 si transitively required through google-api-core