1// Copyright 2020 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.cloud.datacatalog.v1beta1;
18
19import "google/cloud/datacatalog/v1beta1/common.proto";
20
21option cc_enable_arenas = true;
22option csharp_namespace = "Google.Cloud.DataCatalog.V1Beta1";
23option go_package = "cloud.google.com/go/datacatalog/apiv1beta1/datacatalogpb;datacatalogpb";
24option java_multiple_files = true;
25option java_package = "com.google.cloud.datacatalog.v1beta1";
26option php_namespace = "Google\\Cloud\\DataCatalog\\V1beta1";
27option ruby_package = "Google::Cloud::DataCatalog::V1beta1";
28
29// A result that appears in the response of a search request. Each result
30// captures details of one entry that matches the search.
31message SearchCatalogResult {
32  // Type of the search result. This field can be used to determine which Get
33  // method to call to fetch the full resource.
34  SearchResultType search_result_type = 1;
35
36  // Sub-type of the search result. This is a dot-delimited description of the
37  // resource's full type, and is the same as the value callers would provide in
38  // the "type" search facet.  Examples: `entry.table`, `entry.dataStream`,
39  // `tagTemplate`.
40  string search_result_subtype = 2;
41
42  // The relative resource name of the resource in URL format.
43  // Examples:
44  //
45  //  * `projects/{project_id}/locations/{location_id}/entryGroups/{entry_group_id}/entries/{entry_id}`
46  //  * `projects/{project_id}/tagTemplates/{tag_template_id}`
47  string relative_resource_name = 3;
48
49  // The full name of the cloud resource the entry belongs to. See:
50  // https://cloud.google.com/apis/design/resource_names#full_resource_name.
51  // Example:
52  //
53  //  * `//bigquery.googleapis.com/projects/projectId/datasets/datasetId/tables/tableId`
54  string linked_resource = 4;
55}
56
57// The different types of resources that can be returned in search.
58enum SearchResultType {
59  // Default unknown type.
60  SEARCH_RESULT_TYPE_UNSPECIFIED = 0;
61
62  // An [Entry][google.cloud.datacatalog.v1beta1.Entry].
63  ENTRY = 1;
64
65  // A [TagTemplate][google.cloud.datacatalog.v1beta1.TagTemplate].
66  TAG_TEMPLATE = 2;
67
68  // An [EntryGroup][google.cloud.datacatalog.v1beta1.EntryGroup].
69  ENTRY_GROUP = 3;
70}
71