Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add protos as an artifact to library (via synth). (#8018)
- Loading branch information
1 parent
af317d1
commit 1ee3ec5
Showing
5 changed files
with
272 additions
and
3 deletions.
There are no files selected for viewing
129 changes: 129 additions & 0 deletions
129
datacatalog/google/cloud/datacatalog_v1beta1/proto/datacatalog.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
// 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; | ||
|
||
import "google/api/annotations.proto"; | ||
import "google/cloud/datacatalog/v1beta1/schema.proto"; | ||
import "google/cloud/datacatalog/v1beta1/table_spec.proto"; | ||
import "google/cloud/datacatalog/v1beta1/timestamps.proto"; | ||
|
||
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"; | ||
|
||
// Cloud Data Catalog is a service that allows clients to discover, | ||
// manage, and understand their Google Cloud data resources. | ||
service DataCatalog { | ||
// 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 | ||
// Cloud Data Catalog Entry. | ||
rpc LookupEntry(LookupEntryRequest) returns (Entry) { | ||
option (google.api.http) = { | ||
get: "/v1beta1/entries:lookup" | ||
}; | ||
} | ||
} | ||
|
||
// Request message for | ||
// [LookupEntry][google.cloud.datacatalog.v1beta1.DataCatalog.LookupEntry]. | ||
message LookupEntryRequest { | ||
// 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: | ||
// 1. cloud_pubsub.project_id.topic_id | ||
// 2. bigquery.project_id.dataset_id.table_id | ||
// 3. datacatalog.project_id.location_id.entry_group_id.entry_id | ||
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. 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. | ||
message Entry { | ||
// Output only. The Data Catalog resource name of the entry in URL format. For | ||
// example, | ||
// "projects/{project_id}/locations/{location}/entryGroups/{entry_group_id}/entries/{entry_id}". | ||
string name = 1; | ||
|
||
// The full name of the cloud resource the entry belongs to. See: | ||
// https://cloud.google.com/apis/design/resource_names#full_resource_name | ||
// | ||
// Data Catalog supports resources from select Google Cloud Platform systems. | ||
// `linked_resource` is the full name of the Google Cloud Platform resource. | ||
// 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; | ||
|
||
// Type of entry. | ||
EntryType type = 2; | ||
|
||
// Type specification information. | ||
oneof type_spec { | ||
// Specification that applies to a BigQuery table. This is only valid on | ||
// entries of type TABLE. | ||
BigQueryTableSpec bigquery_table_spec = 12; | ||
} | ||
|
||
// Display information such as title and description. | ||
// A short name to identify the entry, for example, | ||
// "Analytics Data - Jan 2011". | ||
string display_name = 3; | ||
|
||
// Entry description, which can consist of several sentences or paragraphs | ||
// that describe entry contents. | ||
string description = 4; | ||
|
||
// Schema of the entry. | ||
Schema schema = 5; | ||
|
||
// Timestamps about the underlying Google Cloud Platform resource -- not about | ||
// this Data Catalog Entry. | ||
SystemTimestamps source_system_timestamps = 7; | ||
} | ||
|
||
// Entry resources in Cloud Data Catalog can be of different types e.g. BigQuery | ||
// Table entry is of type 'TABLE'. This enum describes all the possible types | ||
// Cloud Data Catalog contains. | ||
enum EntryType { | ||
// Default unknown type | ||
ENTRY_TYPE_UNSPECIFIED = 0; | ||
// The type of entry that has a GoogleSQL schema, including logical views. | ||
TABLE = 2; | ||
// An entry type which is used for streaming entries. Example - Pub/Sub. | ||
DATA_STREAM = 3; | ||
} |
51 changes: 51 additions & 0 deletions
51
datacatalog/google/cloud/datacatalog_v1beta1/proto/schema.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// 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"; | ||
|
||
// Represents a schema (e.g. BigQuery, GoogleSQL, Avro schema). | ||
message Schema { | ||
// Schema of columns. A maximum of 10,000 columns and sub-columns can be | ||
// specified. | ||
repeated ColumnSchema columns = 2; | ||
} | ||
|
||
// Representation of a column within a schema. Columns could be nested inside | ||
// other columns. | ||
message ColumnSchema { | ||
// Required. Name of the column. | ||
string column = 6; | ||
|
||
// Required. Type of the column. | ||
string type = 1; | ||
|
||
// Description of the column. | ||
string description = 2; | ||
|
||
// 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; | ||
|
||
// Schema of sub-columns. | ||
repeated ColumnSchema subcolumns = 7; | ||
} |
51 changes: 51 additions & 0 deletions
51
datacatalog/google/cloud/datacatalog_v1beta1/proto/table_spec.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// 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"; | ||
|
||
// Describes a BigQuery table. | ||
message BigQueryTableSpec { | ||
// The table source type. | ||
TableSourceType table_source_type = 1; | ||
|
||
// Table view specification. This field should only be populated if | ||
// table_source_type is BIGQUERY_VIEW. | ||
ViewSpec view_spec = 2; | ||
} | ||
|
||
// 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 { | ||
// The query that defines the table view. | ||
string view_query = 1; | ||
} |
38 changes: 38 additions & 0 deletions
38
datacatalog/google/cloud/datacatalog_v1beta1/proto/timestamps.proto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// 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; | ||
|
||
import "google/protobuf/timestamp.proto"; | ||
|
||
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"; | ||
|
||
// Timestamps about this resource according to a particular system. | ||
message SystemTimestamps { | ||
// Output only. The creation time of the resource within the given system. | ||
google.protobuf.Timestamp create_time = 1; | ||
|
||
// Output only. 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. | ||
google.protobuf.Timestamp expire_time = 3; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters