Regenerating public protos for Data Catalog to add new Custom Type Entry feature.

PiperOrigin-RevId: 293614782
This commit is contained in:
Google APIs 2020-02-06 09:56:54 -08:00 committed by Copybara-Service
parent 45d2a569ab
commit 4cdfe8278c
7 changed files with 220 additions and 63 deletions

View File

@ -12,6 +12,7 @@ load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
proto_library(
name = "datacatalog_proto",
srcs = [
"common.proto",
"datacatalog.proto",
"gcs_fileset_spec.proto",
"policytagmanager.proto",

View File

@ -0,0 +1,36 @@
// Copyright 2019 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 go_package = "google.golang.org/genproto/googleapis/cloud/datacatalog/v1beta1;datacatalog";
option java_multiple_files = true;
option java_package = "com.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;
}

View File

@ -21,6 +21,7 @@ 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";
@ -51,10 +52,10 @@ service DataCatalog {
// the complete resource, only the resource identifier and high level
// fields. Clients can subsequentally call `Get` methods.
//
// Note that searches do not have full recall. There may be results that match
// your query but are not returned, even in subsequent pages of results. These
// missing results may vary across repeated calls to search. Do not rely on
// this method if you need to guarantee full recall.
// 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](/data-catalog/docs/how-to/search-reference) for more information.
@ -66,11 +67,14 @@ service DataCatalog {
option (google.api.method_signature) = "scope,query";
}
// Alpha feature.
// Creates an EntryGroup.
//
// The user should enable the Data Catalog API in the project identified by
// the `parent` parameter (see [Data Catalog Resource Project]
// (/data-catalog/docs/concepts/resource-project) for more information).
//
// A maximum of 10,000 entry groups may be created per organization across all
// locations.
rpc CreateEntryGroup(CreateEntryGroupRequest) returns (EntryGroup) {
option (google.api.http) = {
post: "/v1beta1/{parent=projects/*/locations/*}/entryGroups"
@ -79,7 +83,19 @@ service DataCatalog {
option (google.api.method_signature) = "parent,entry_group_id,entry_group";
}
// Alpha feature.
// 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] (/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) = {
@ -89,7 +105,6 @@ service DataCatalog {
option (google.api.method_signature) = "name,read_mask";
}
// Alpha feature.
// Deletes an EntryGroup. Only entry groups that do not contain entries can be
// deleted. The user should enable the Data Catalog API in the project
// identified by the `name` parameter (see [Data Catalog Resource Project]
@ -101,11 +116,14 @@ service DataCatalog {
option (google.api.method_signature) = "name";
}
// Alpha feature.
// Creates an entry. Currently only entries of 'FILESET' type can be created.
// Creates an entry. Only entries of 'FILESET' type or user-specified type can
// be created.
//
// The user should enable the Data Catalog API in the project identified by
// the `parent` parameter (see [Data Catalog Resource Project]
// (/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"
@ -127,7 +145,6 @@ service DataCatalog {
option (google.api.method_signature) = "entry,update_mask";
}
// Alpha feature.
// Deletes an existing entry. Only entries created through
// [CreateEntry][google.cloud.datacatalog.v1beta1.DataCatalog.CreateEntry]
// method can be deleted.
@ -158,6 +175,14 @@ service DataCatalog {
};
}
// 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](/data-catalog/docs/concepts/resource-project) for more
@ -317,10 +342,6 @@ service DataCatalog {
post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*}:setIamPolicy"
body: "*"
}
additional_bindings {
post: "/v1beta1/{resource=projects/*/locations/*/entryGroups/*/entries/*}:setIamPolicy"
body: "*"
}
};
}
@ -444,9 +465,7 @@ message SearchCatalogRequest {
// Specifies the ordering of results, currently supported case-sensitive
// choices are:
//
// * `relevance`, only supports desecending
// * `last_access_timestamp [asc|desc]`, defaults to descending if not
// specified
// * `relevance`, only supports descending
// * `last_modified_timestamp [asc|desc]`, defaults to descending if not
// specified
//
@ -489,6 +508,17 @@ message CreateEntryGroupRequest {
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 {
@ -516,6 +546,9 @@ message DeleteEntryGroupRequest {
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
@ -620,7 +653,7 @@ message LookupEntryRequest {
// * ``pubsub.project_id.`topic.id.with.dots` ``
// * `bigquery.table.project_id.dataset_id.table_id`
// * `bigquery.dataset.project_id.dataset_id`
// * `datacatalog.project_id.location_id.entry_group_id.entry_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.
@ -653,7 +686,7 @@ message Entry {
type: "datacatalog.googleapis.com/EntryGroup"
}];
// Output only. The resource this metadata entry refers to.
// The resource this metadata entry refers to.
//
// For Google Cloud Platform resources, `linked_resource` is the [full name of
// the
@ -661,12 +694,43 @@ message Entry {
// For example, the `linked_resource` for a table resource from BigQuery is:
//
// * //bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId
string linked_resource = 9 [(google.api.field_behavior) = OUTPUT_ONLY];
//
// 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 Cloud 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.
@ -697,8 +761,10 @@ message Entry {
// Schema of the entry. An entry might not have any schema attached to it.
Schema schema = 5;
// Output only. Timestamps about the underlying Google Cloud Platform
// resource, not about this Data Catalog Entry.
// 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];
}
@ -735,13 +801,13 @@ message EntryGroup {
// Request message for
// [CreateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplate].
message CreateTagTemplateRequest {
// Required. The name of the project and the location this template is in.
// Required. The name of the project and the template location
// [region](/compute/docs/regions-zones/#available).
// NOTE: Currently, only the `us-central1 region` is supported.
//
// Example:
//
// * projects/{project_id}/locations/{location}
//
// TagTemplate and its child resources may not actually be stored in the
// location in this name.
// * projects/{project_id}/locations/us-central1
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@ -770,26 +836,6 @@ message GetTagTemplateRequest {
];
}
// 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. An entry type which is used for streaming entries. Example:
// Cloud Pub/Sub topic.
DATA_STREAM = 3;
// Alpha feature. An entry type which is a set of files or objects. Example:
// Cloud Storage fileset.
FILESET = 4;
}
// Request message for
// [UpdateTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.UpdateTagTemplate].
message UpdateTagTemplateRequest {
@ -806,6 +852,29 @@ message UpdateTagTemplateRequest {
google.protobuf.FieldMask update_mask = 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.
MODEL = 5;
// Output only. An entry type which is used for streaming entries. Example:
// Cloud Pub/Sub topic.
DATA_STREAM = 3;
// An entry type which is a set of files or objects. Example:
// Cloud Storage fileset.
FILESET = 4;
}
// Request message for
// [DeleteTagTemplate][google.cloud.datacatalog.v1beta1.DataCatalog.DeleteTagTemplate].
message DeleteTagTemplateRequest {
@ -874,12 +943,13 @@ message DeleteTagRequest {
// Request message for
// [CreateTagTemplateField][google.cloud.datacatalog.v1beta1.DataCatalog.CreateTagTemplateField].
message CreateTagTemplateFieldRequest {
// Required. The name of the project this template is in. Example:
// Required. The name of the project and the template location
// [region](/compute/docs/regions-zones/#available).
// NOTE: Currently, only the `us-central1 region` is supported.
//
// * projects/{project_id}/locations/{location}/tagTemplates/{tag_template_id}
// Example:
//
// Note that this TagTemplateField may not actually be stored in the location
// in this name.
// * projects/{project_id}/locations/us-central1/tagTemplates/{tag_template_id}
string parent = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
@ -997,3 +1067,43 @@ message ListTagsResponse {
// 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;
}

View File

@ -28,7 +28,7 @@ option java_package = "com.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](storage/docs/gsutil/addlhelp/WildcardNames) for
// Storage documentation](/storage/docs/gsutil/addlhelp/WildcardNames) for
// more information. Note that bucket wildcards are currently not supported.
//
// Examples of valid file_patterns:
@ -39,9 +39,20 @@ message GcsFilesetSpec {
// 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

View File

@ -204,14 +204,9 @@ message Taxonomy {
}
// Denotes one policy tag in a taxonomy (e.g. ssn). Policy Tags can be defined
// in a hierarchy. For example, consider the following hierachy:
// Geolocation
// |
// ------------------------------------
// | | |
// LatLong City ZipCode
// PolicyTag "Geolocation" contains three child policy tags: "LatLong",
// "City", and "ZipCode".
// 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"

View File

@ -18,6 +18,7 @@ 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;

View File

@ -108,9 +108,12 @@ message TagField {
}
}
// A tag template defines the schema of the tags used to attach to Data Catalog
// resources. It defines the mapping of accepted field names and types that can
// be used within the tag. The tag template also controls the access to the tag.
// 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](/iam/docs/understanding-roles#data-catalog-roles)
// provide permissions to create, edit, and use the template (see, for example,
// the [TagTemplate User](/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"