Skip to content

Commit

Permalink
feat: Add methods and messages related to starring feature
Browse files Browse the repository at this point in the history
feat: Add methods and messages related to business context feature
docs: Updates copyright message

PiperOrigin-RevId: 427140868
  • Loading branch information
Google APIs authored and Copybara-Service committed Feb 8, 2022
1 parent c507c8d commit 0f56b69
Show file tree
Hide file tree
Showing 13 changed files with 228 additions and 83 deletions.
2 changes: 1 addition & 1 deletion google/cloud/datacatalog/v1/bigquery.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
11 changes: 10 additions & 1 deletion google/cloud/datacatalog/v1/common.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -26,6 +26,15 @@ option java_package = "com.google.cloud.datacatalog.v1";
option php_namespace = "Google\\Cloud\\DataCatalog\\V1";
option ruby_package = "Google::Cloud::DataCatalog::V1";

// Entry metadata relevant only to the user and private to them.
message PersonalDetails {
// True if the entry is starred by the user; false otherwise.
bool starred = 1;

// Set if the entry is starred; unset otherwise.
google.protobuf.Timestamp star_time = 2;
}

// This enum lists all the systems that Data Catalog integrates with.
enum IntegratedSystem {
// Default unknown system.
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/datacatalog/v1/data_source.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
207 changes: 182 additions & 25 deletions google/cloud/datacatalog/v1/datacatalog.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -237,6 +237,30 @@ service DataCatalog {
option (google.api.method_signature) = "parent";
}

// Modifies entry overview, part of the business context of an
// [Entry][google.cloud.datacatalog.v1.Entry].
//
// To call this method, you must have the `datacatalog.entries.updateOverview`
// IAM permission on the corresponding project.
rpc ModifyEntryOverview(ModifyEntryOverviewRequest) returns (EntryOverview) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryOverview"
body: "*"
};
}

// Modifies contacts, part of the business context of an
// [Entry][google.cloud.datacatalog.v1.Entry].
//
// To call this method, you must have the `datacatalog.entries.updateContacts`
// IAM permission on the corresponding project.
rpc ModifyEntryContacts(ModifyEntryContactsRequest) returns (Contacts) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:modifyEntryContacts"
body: "*"
};
}

// Creates a tag template.
//
// You must enable the Data Catalog API in the project identified by the
Expand Down Expand Up @@ -406,6 +430,8 @@ service DataCatalog {
}

// Lists tags assigned to an [Entry][google.cloud.datacatalog.v1.Entry].
// The [columns][google.cloud.datacatalog.v1.Tag.column] in the response are
// lowercased.
rpc ListTags(ListTagsRequest) returns (ListTagsResponse) {
option (google.api.http) = {
get: "/v1/{parent=projects/*/locations/*/entryGroups/*/entries/*}/tags"
Expand All @@ -416,6 +442,26 @@ service DataCatalog {
option (google.api.method_signature) = "parent";
}

// Marks an [Entry][google.cloud.datacatalog.v1.Entry] as starred by
// the current user. Starring information is private to each user.
rpc StarEntry(StarEntryRequest) returns (StarEntryResponse) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:star"
body: "*"
};
option (google.api.method_signature) = "name";
}

// Marks an [Entry][google.cloud.datacatalog.v1.Entry] as NOT starred by
// the current user. Starring information is private to each user.
rpc UnstarEntry(UnstarEntryRequest) returns (UnstarEntryResponse) {
option (google.api.http) = {
post: "/v1/{name=projects/*/locations/*/entryGroups/*/entries/*}:unstar"
body: "*"
};
option (google.api.method_signature) = "name";
}

// Sets an access control policy for a resource. Replaces any existing
// policy.
//
Expand Down Expand Up @@ -549,16 +595,17 @@ message SearchCatalogRequest {
// value of this parameter.
repeated string restricted_locations = 16 [(google.api.field_behavior) = OPTIONAL];

// Optional. If `true`, include [public tag
// templates][google.cloud.datacatalog.v1.TagTemplate.is_publicly_readable]
// in the search results. By default, they are included only if you have
// explicit permissions on them to view them. For example, if you are the
// owner.
// Optional. If `true`, search only among starred entries.
//
// Other scope fields, for example, `include_org_ids`,
// still restrict the returned public tag templates and at least one of
// them is required.
bool include_public_tag_templates = 19 [(google.api.field_behavior) = OPTIONAL];
// By default, all results are returned, starred or not.
bool starred_only = 18 [(google.api.field_behavior) = OPTIONAL];

// Optional. This field is deprecated. The search mechanism for public and private tag
// templates is the same.
bool include_public_tag_templates = 19 [
deprecated = true,
(google.api.field_behavior) = OPTIONAL
];
}

// Required. The scope of this search request.
Expand Down Expand Up @@ -605,6 +652,7 @@ message SearchCatalogRequest {
//
// * `relevance` that can only be descending
// * `last_modified_timestamp [asc|desc]` with descending (`desc`) as default
// * `default` that can only be descending
//
// If this parameter is omitted, it defaults to the descending `relevance`.
string order_by = 5;
Expand Down Expand Up @@ -1037,6 +1085,9 @@ message Entry {
// Default value is an empty string.
string description = 4;

// Business Context of the entry. Not supported for BigQuery datasets.
BusinessContext business_context = 37;

// Schema of the entry. An entry might not have any schema attached to it.
Schema schema = 5;

Expand All @@ -1060,6 +1111,9 @@ message Entry {

// Output only. Physical location of the entry.
DataSource data_source = 20 [(google.api.field_behavior) = OUTPUT_ONLY];

// Output only. Additional information related to the entry. Private to the current user.
PersonalDetails personal_details = 26 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Specification that applies to a table resource. Valid only
Expand Down Expand Up @@ -1091,6 +1145,18 @@ message DataSourceConnectionSpec {
// Specification that applies to a routine. Valid only for
// entries with the `ROUTINE` type.
message RoutineSpec {
// The fine-grained type of the routine.
enum RoutineType {
// Unspecified type.
ROUTINE_TYPE_UNSPECIFIED = 0;

// Non-builtin permanent scalar function.
SCALAR_FUNCTION = 1;

// Stored procedure.
PROCEDURE = 2;
}

// Input or output argument of a function or stored procedure.
message Argument {
// The input or output mode of the argument.
Expand Down Expand Up @@ -1120,18 +1186,6 @@ message RoutineSpec {
string type = 3;
}

// The fine-grained type of the routine.
enum RoutineType {
// Unspecified type.
ROUTINE_TYPE_UNSPECIFIED = 0;

// Non-builtin permanent scalar function.
SCALAR_FUNCTION = 1;

// Stored procedure.
PROCEDURE = 2;
}

// The type of the routine.
RoutineType routine_type = 1;

Expand Down Expand Up @@ -1159,6 +1213,43 @@ message RoutineSpec {
}
}

// Business Context of the entry.
message BusinessContext {
// Entry overview fields for rich text descriptions of entries.
EntryOverview entry_overview = 1;

// Contact people for the entry.
Contacts contacts = 2;
}

// Entry overview fields for rich text descriptions of entries.
message EntryOverview {
// Entry overview with support for rich text.
//
// The overview must only contain Unicode characters, and should be
// formatted using HTML.
// The maximum length is 10 MiB as this value holds HTML descriptions
// including encoded images. The maximum length of the text without images
// is 100 KiB.
string overview = 1;
}

// Contact people for the entry.
message Contacts {
// A contact person for the entry.
message Person {
// Designation of the person, for example, Data Steward.
string designation = 1;

// Email of the person in the format of `john.doe@example.com`,
// `<john.doe@example.com>`, or `John Doe<john.doe@example.com>`.
string email = 2;
}

// The list of contact people for the entry.
repeated Person people = 1;
}

// Entry group metadata.
//
// An `EntryGroup` resource represents a logical grouping of zero or more
Expand Down Expand Up @@ -1237,9 +1328,7 @@ message UpdateTagTemplateRequest {
// request body, their values are emptied.
//
// Note: Updating the `is_publicly_readable` field may require up to 12
// hours to take effect in search results. Additionally, it also requires
// the `tagTemplates.getIamPolicy` and `tagTemplates.setIamPolicy`
// permissions.
// hours to take effect in search results.
google.protobuf.FieldMask update_mask = 2;
}

Expand Down Expand Up @@ -1488,6 +1577,74 @@ message ListEntriesResponse {
string next_page_token = 2;
}

// Request message for
// [StarEntry][google.cloud.datacatalog.v1.DataCatalog.StarEntry].
message StarEntryRequest {
// Required. The name of the entry to mark as starred.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datacatalog.googleapis.com/Entry"
}
];
}

// Response message for
// [StarEntry][google.cloud.datacatalog.v1.DataCatalog.StarEntry].
// Empty for now
message StarEntryResponse {

}

// Request message for
// [UnstarEntry][google.cloud.datacatalog.v1.DataCatalog.UnstarEntry].
message UnstarEntryRequest {
// Required. The name of the entry to mark as **not** starred.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datacatalog.googleapis.com/Entry"
}
];
}

// Response message for
// [UnstarEntry][google.cloud.datacatalog.v1.DataCatalog.UnstarEntry].
// Empty for now
message UnstarEntryResponse {

}

// Request message for
// [ModifyEntryOverview][google.cloud.datacatalog.v1.DataCatalog.ModifyEntryOverview].
message ModifyEntryOverviewRequest {
// Required. The full resource name of the entry.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datacatalog.googleapis.com/Entry"
}
];

// Required. The new value for the Entry Overview.
EntryOverview entry_overview = 2 [(google.api.field_behavior) = REQUIRED];
}

// Request message for
// [ModifyEntryContacts][google.cloud.datacatalog.v1.DataCatalog.ModifyEntryContacts].
message ModifyEntryContactsRequest {
// Required. The full resource name of the entry.
string name = 1 [
(google.api.field_behavior) = REQUIRED,
(google.api.resource_reference) = {
type: "datacatalog.googleapis.com/Entry"
}
];

// Required. The new value for the Contacts.
Contacts contacts = 2 [(google.api.field_behavior) = REQUIRED];
}

// The enum field that lists all the types of entry resources in Data
// Catalog. For example, a BigQuery table entry has the `TABLE` type.
enum EntryType {
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/datacatalog/v1/gcs_fileset_spec.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/datacatalog/v1/policytagmanager.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -17,11 +17,11 @@ 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/policytagmanager.proto";
import "google/iam/v1/policy.proto";
import "google/api/client.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.DataCatalog.V1";
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/datacatalog/v1/schema.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/datacatalog/v1/search.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/datacatalog/v1/table_spec.proto
@@ -1,4 +1,4 @@
// Copyright 2021 Google LLC
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down

0 comments on commit 0f56b69

Please sign in to comment.