Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(snowflake): add proto definition of Snowflake task and stream (#6814)
h3n4lfee43b510c80
diff --git a/backend/store/instance.go b/backend/store/instance.goindex 2e4c368bea..1fe18464a0 100644--- a/backend/store/instance.go+++ b/backend/store/instance.go@@ -87,7 +87,7 @@ func (s *Store) composeInstance(ctx context.Context, instance *InstanceMessage)return composedInstance, nil}-// InstanceMessage is the mssage for instance.+// InstanceMessage is the message for instance.type InstanceMessage struct {ResourceID stringTitle string@@ -102,7 +102,7 @@ type InstanceMessage struct {EngineVersion string}-// UpdateInstanceMessage is the mssage for updating an instance.+// UpdateInstanceMessage is the message for updating an instance.type UpdateInstanceMessage struct {Title *stringExternalLink *stringdiff --git a/frontend/src/components/CreateDataSourceExample.vue b/frontend/src/components/CreateDataSourceExample.vueindex b5c34fd39e..22aec22846 100644--- a/frontend/src/components/CreateDataSourceExample.vue+++ b/frontend/src/components/CreateDataSourceExample.vue@@ -218,10 +218,10 @@ GRANT ROLE "ACCOUNTADMIN" TO USER bytebase;CREATE OR REPLACE ROLE BYTEBASE;--- If using non-enterprise edition, the following commands may encounter error likes 'Unsupported feature GRANT/REVOKE APPLY TAG ON ACCOUNT', you can skip those unsupported GRANTs.+-- If using non-enterprise edition, the following commands may encounter error likes 'Unsupported feature GRANT/REVOKE APPLY TAG', you can skip those unsupported GRANTs.-- Grant the least privileges required by Bytebase-GRANT CREATE DATABASE, IMPORT SHARE, APPLY MASKING POLICY, APPLY ROW ACCESS POLICY, APPLY TAG ON ACCOUNT TO ROLE BYTEBASE;+GRANT CREATE DATABASE, EXECUTE TASK, IMPORT SHARE, APPLY MASKING POLICY, APPLY ROW ACCESS POLICY, APPLY TAG ON ACCOUNT TO ROLE BYTEBASE;GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE TO ROLE BYTEBASE;@@ -239,6 +239,65 @@ GRANT ROLE "BYTEBASE" TO ROLE SYSADMIN;-- For each database to be managed by Bytebase, you need to grant the following privilegesGRANT ALL PRIVILEGES ON DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL SCHEMAS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE SCHEMAS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++-- Then, grant the required schema object privileges on the database to the Bytebase role+GRANT ALL PRIVILEGES ON ALL EVENT TABLES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE EVENT TABLES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL EXTERNAL TABLES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE EXTERNAL TABLES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL FILE FORMATS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE FILE FORMATS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE FUNCTIONS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL MATERIALIZED VIEWS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE MATERIALIZED VIEWS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL PROCEDURES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE PROCEDURES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL SEQUENCES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE SEQUENCES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL STAGES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE STAGES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL STREAMS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE STREAMS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL TABLES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE TABLES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL TASKS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE TASKS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL VIEWS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE VIEWS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++-- ALERT and POLICY are the features in Snowflake Enterprise Edition, you can skip those GRANTs if you are using standard edition.+GRANT ALL PRIVILEGES ON ALL ALERTS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE ALERTS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL PASSWORD POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE PASSWORD POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL ROW ACCESS POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE ROW ACCESS POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL MASKING POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE MASKING POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++GRANT ALL PRIVILEGES ON ALL SESSION POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;+GRANT ALL PRIVILEGES ON FUTURE SESSION POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;++-- PIPE are not allowed to be bulk granted, you need to grant them one by one.+GRANT ALL PRIVILEGES ON PIPE {{PIPE_NAME}} IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE;`;case Engine.POSTGRES:return "CREATE USER bytebase WITH ENCRYPTED PASSWORD 'YOUR_DB_PWD';\n\nALTER USER bytebase WITH SUPERUSER;";@@ -276,10 +335,10 @@ GRANT ROLE "ACCOUNTADMIN" TO USER bytebase;CREATE OR REPLACE ROLE BYTEBASE_READER;--- If using non-enterprise edition, the following commands may encounter error likes 'Unsupported feature GRANT/REVOKE APPLY TAG ON ACCOUNT', you can skip those unsupported GRANTs.+-- If using non-enterprise edition, the following commands may encounter error likes 'Unsupported feature GRANT/REVOKE APPLY TAG', you can skip those unsupported GRANTs.-- Grant the least privileges required by Bytebase-GRANT IMPORT SHARE, APPLY MASKING POLICY, APPLY ROW ACCESS POLICY, APPLY TAG ON ACCOUNT TO ROLE BYTEBASE_READER;+GRANT IMPORT SHARE TO ROLE BYTEBASE_READER;GRANT IMPORTED PRIVILEGES ON DATABASE SNOWFLAKE TO ROLE BYTEBASE_READER;@@ -297,6 +356,65 @@ GRANT ROLE "BYTEBASE_READER" TO ROLE SYSADMIN;-- For each database to be managed by Bytebase, you need to grant the following privilegesGRANT ALL PRIVILEGES ON DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL SCHEMAS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE SCHEMAS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++-- Then, grant the required schema object privileges on the database to the Bytebase role+GRANT ALL PRIVILEGES ON ALL EVENT TABLES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE EVENT TABLES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL EXTERNAL TABLES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE EXTERNAL TABLES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL FILE FORMATS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE FILE FORMATS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE FUNCTIONS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL MATERIALIZED VIEWS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE MATERIALIZED VIEWS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL PROCEDURES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE PROCEDURES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL SEQUENCES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE SEQUENCES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL STAGES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE STAGES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL STREAMS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE STREAMS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL TABLES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE TABLES IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL TASKS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE TASKS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL VIEWS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE VIEWS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++-- ALERT and POLICY are the features in Snowflake Enterprise Edition, you can skip those GRANTs if you are using standard edition.+GRANT ALL PRIVILEGES ON ALL ALERTS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE ALERTS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL PASSWORD POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE PASSWORD POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL ROW ACCESS POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE ROW ACCESS POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL MASKING POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE MASKING POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++GRANT ALL PRIVILEGES ON ALL SESSION POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;+GRANT ALL PRIVILEGES ON FUTURE SESSION POLICYS IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;++-- PIPE are not allowed to be bulk granted, you need to grant them one by one.+GRANT ALL PRIVILEGES ON PIPE {{PIPE_NAME}} IN DATABASE {{YOUR_DB_NAME}} TO ROLE BYTEBASE_READER;`;case Engine.POSTGRES:return "CREATE USER bytebase WITH ENCRYPTED PASSWORD 'YOUR_DB_PWD';\n\nALTER USER bytebase WITH SUPERUSER;";diff --git a/frontend/src/types/proto/store/database.ts b/frontend/src/types/proto/store/database.tsindex 09d5449217..9fa84042ba 100644--- a/frontend/src/types/proto/store/database.ts+++ b/frontend/src/types/proto/store/database.ts@@ -36,6 +36,166 @@ export interface SchemaMetadata {views: ViewMetadata[];/** The functions is the list of functions in a schema. */functions: FunctionMetadata[];+ /** The streams is the list of streams in a schema, currently, only used for Snowflake. */+ streams: StreamMetadata[];+ /** The routines is the list of routines in a schema. */+ tasks: TaskMetadata[];+}++export interface TaskMetadata {+ /** The name is the name of a task. */+ name: string;+ /**+ * The id is the snowflake-generated id of a task.+ * Example: 01ad32a0-1bb6-5e93-0000-000000000001+ */+ id: string;+ /** The owner of the task. */+ owner: string;+ /** The comment of the task. */+ comment: string;+ /** The warehouse of the task. */+ warehouse: string;+ /** The schedule interval of the task. */+ schedule: string;+ /** The predecessor tasks of the task. */+ predecessors: string[];+ /** The state of the task. */+ state: TaskMetadata_State;+ /** The condition of the task. */+ condition: string;+ /** The definition of the task. */+ definition: string;+}++export enum TaskMetadata_State {+ STATE_UNSPECIFIED = 0,+ STATE_STARTED = 1,+ STATE_SUSPENDED = 2,+ UNRECOGNIZED = -1,+}++export function taskMetadata_StateFromJSON(object: any): TaskMetadata_State {+ switch (object) {+ case 0:+ case "STATE_UNSPECIFIED":+ return TaskMetadata_State.STATE_UNSPECIFIED;+ case 1:+ case "STATE_STARTED":+ return TaskMetadata_State.STATE_STARTED;+ case 2:+ case "STATE_SUSPENDED":+ return TaskMetadata_State.STATE_SUSPENDED;+ case -1:+ case "UNRECOGNIZED":+ default:+ return TaskMetadata_State.UNRECOGNIZED;+ }+}++export function taskMetadata_StateToJSON(object: TaskMetadata_State): string {+ switch (object) {+ case TaskMetadata_State.STATE_UNSPECIFIED:+ return "STATE_UNSPECIFIED";+ case TaskMetadata_State.STATE_STARTED:+ return "STATE_STARTED";+ case TaskMetadata_State.STATE_SUSPENDED:+ return "STATE_SUSPENDED";+ case TaskMetadata_State.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export interface StreamMetadata {+ /** The name is the name of a stream. */+ name: string;+ /** The table_name is the name of the table/view that the stream is created on. */+ tableName: string;+ /** The owner of the stream. */+ owner: string;+ /** The comment of the stream. */+ comment: string;+ /** The type of the stream. */+ type: StreamMetadata_Type;+ /** Indicates whether the stream was last read before the `stale_after` time. */+ stale: boolean;+ /** The mode of the stream. */+ mode: StreamMetadata_Mode;+ /** The definition of the stream. */+ definition: string;+}++export enum StreamMetadata_Type {+ TYPE_UNSPECIFIED = 0,+ TYPE_DELTA = 1,+ UNRECOGNIZED = -1,+}++export function streamMetadata_TypeFromJSON(object: any): StreamMetadata_Type {+ switch (object) {+ case 0:+ case "TYPE_UNSPECIFIED":+ return StreamMetadata_Type.TYPE_UNSPECIFIED;+ case 1:+ case "TYPE_DELTA":+ return StreamMetadata_Type.TYPE_DELTA;+ case -1:+ case "UNRECOGNIZED":+ default:+ return StreamMetadata_Type.UNRECOGNIZED;+ }+}++export function streamMetadata_TypeToJSON(object: StreamMetadata_Type): string {+ switch (object) {+ case StreamMetadata_Type.TYPE_UNSPECIFIED:+ return "TYPE_UNSPECIFIED";+ case StreamMetadata_Type.TYPE_DELTA:+ return "TYPE_DELTA";+ case StreamMetadata_Type.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }+}++export enum StreamMetadata_Mode {+ MODE_UNSPECIFIED = 0,+ MODE_APPEND_ONLY = 1,+ MODE_INSERT_ONLY = 2,+ UNRECOGNIZED = -1,+}++export function streamMetadata_ModeFromJSON(object: any): StreamMetadata_Mode {+ switch (object) {+ case 0:+ case "MODE_UNSPECIFIED":+ return StreamMetadata_Mode.MODE_UNSPECIFIED;+ case 1:+ case "MODE_APPEND_ONLY":+ return StreamMetadata_Mode.MODE_APPEND_ONLY;+ case 2:+ case "MODE_INSERT_ONLY":+ return StreamMetadata_Mode.MODE_INSERT_ONLY;+ case -1:+ case "UNRECOGNIZED":+ default:+ return StreamMetadata_Mode.UNRECOGNIZED;+ }+}++export function streamMetadata_ModeToJSON(object: StreamMetadata_Mode): string {+ switch (object) {+ case StreamMetadata_Mode.MODE_UNSPECIFIED:+ return "MODE_UNSPECIFIED";+ case StreamMetadata_Mode.MODE_APPEND_ONLY:+ return "MODE_APPEND_ONLY";+ case StreamMetadata_Mode.MODE_INSERT_ONLY:+ return "MODE_INSERT_ONLY";+ case StreamMetadata_Mode.UNRECOGNIZED:+ default:+ return "UNRECOGNIZED";+ }}/** TableMetadata is the metadata for tables. */@@ -332,7 +492,7 @@ export const DatabaseMetadata = {};function createBaseSchemaMetadata(): SchemaMetadata {- return { name: "", tables: [], views: [], functions: [] };+ return { name: "", tables: [], views: [], functions: [], streams: [], tasks: [] };}export const SchemaMetadata = {@@ -349,6 +509,12 @@ export const SchemaMetadata = {for (const v of message.functions) {FunctionMetadata.encode(v!, writer.uint32(34).fork()).ldelim();}+ for (const v of message.streams) {+ StreamMetadata.encode(v!, writer.uint32(42).fork()).ldelim();+ }+ for (const v of message.tasks) {+ TaskMetadata.encode(v!, writer.uint32(50).fork()).ldelim();+ }return writer;},@@ -387,6 +553,20 @@ export const SchemaMetadata = {message.functions.push(FunctionMetadata.decode(reader, reader.uint32()));continue;+ case 5:+ if (tag !== 42) {+ break;+ }++ message.streams.push(StreamMetadata.decode(reader, reader.uint32()));+ continue;+ case 6:+ if (tag !== 50) {+ break;+ }++ message.tasks.push(TaskMetadata.decode(reader, reader.uint32()));+ continue;}if ((tag & 7) === 4 || tag === 0) {break;@@ -402,6 +582,8 @@ export const SchemaMetadata = {tables: Array.isArray(object?.tables) ? object.tables.map((e: any) => TableMetadata.fromJSON(e)) : [],views: Array.isArray(object?.views) ? object.views.map((e: any) => ViewMetadata.fromJSON(e)) : [],functions: Array.isArray(object?.functions) ? object.functions.map((e: any) => FunctionMetadata.fromJSON(e)) : [],+ streams: Array.isArray(object?.streams) ? object.streams.map((e: any) => StreamMetadata.fromJSON(e)) : [],+ tasks: Array.isArray(object?.tasks) ? object.tasks.map((e: any) => TaskMetadata.fromJSON(e)) : [],};},@@ -423,6 +605,16 @@ export const SchemaMetadata = {} else {obj.functions = [];}+ if (message.streams) {+ obj.streams = message.streams.map((e) => e ? StreamMetadata.toJSON(e) : undefined);+ } else {+ obj.streams = [];+ }+ if (message.tasks) {+ obj.tasks = message.tasks.map((e) => e ? TaskMetadata.toJSON(e) : undefined);+ } else {+ obj.tasks = [];+ }return obj;},@@ -436,6 +628,347 @@ export const SchemaMetadata = {message.tables = object.tables?.map((e) => TableMetadata.fromPartial(e)) || [];message.views = object.views?.map((e) => ViewMetadata.fromPartial(e)) || [];message.functions = object.functions?.map((e) => FunctionMetadata.fromPartial(e)) || [];+ message.streams = object.streams?.map((e) => StreamMetadata.fromPartial(e)) || [];+ message.tasks = object.tasks?.map((e) => TaskMetadata.fromPartial(e)) || [];+ return message;+ },+};++function createBaseTaskMetadata(): TaskMetadata {+ return {+ name: "",+ id: "",+ owner: "",+ comment: "",+ warehouse: "",+ schedule: "",+ predecessors: [],+ state: 0,+ condition: "",+ definition: "",+ };+}++export const TaskMetadata = {+ encode(message: TaskMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ if (message.id !== "") {+ writer.uint32(18).string(message.id);+ }+ if (message.owner !== "") {+ writer.uint32(26).string(message.owner);+ }+ if (message.comment !== "") {+ writer.uint32(34).string(message.comment);+ }+ if (message.warehouse !== "") {+ writer.uint32(42).string(message.warehouse);+ }+ if (message.schedule !== "") {+ writer.uint32(50).string(message.schedule);+ }+ for (const v of message.predecessors) {+ writer.uint32(58).string(v!);+ }+ if (message.state !== 0) {+ writer.uint32(64).int32(message.state);+ }+ if (message.condition !== "") {+ writer.uint32(74).string(message.condition);+ }+ if (message.definition !== "") {+ writer.uint32(82).string(message.definition);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): TaskMetadata {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseTaskMetadata();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.name = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.id = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.owner = reader.string();+ continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.comment = reader.string();+ continue;+ case 5:+ if (tag !== 42) {+ break;+ }++ message.warehouse = reader.string();+ continue;+ case 6:+ if (tag !== 50) {+ break;+ }++ message.schedule = reader.string();+ continue;+ case 7:+ if (tag !== 58) {+ break;+ }++ message.predecessors.push(reader.string());+ continue;+ case 8:+ if (tag !== 64) {+ break;+ }++ message.state = reader.int32() as any;+ continue;+ case 9:+ if (tag !== 74) {+ break;+ }++ message.condition = reader.string();+ continue;+ case 10:+ if (tag !== 82) {+ break;+ }++ message.definition = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): TaskMetadata {+ return {+ name: isSet(object.name) ? String(object.name) : "",+ id: isSet(object.id) ? String(object.id) : "",+ owner: isSet(object.owner) ? String(object.owner) : "",+ comment: isSet(object.comment) ? String(object.comment) : "",+ warehouse: isSet(object.warehouse) ? String(object.warehouse) : "",+ schedule: isSet(object.schedule) ? String(object.schedule) : "",+ predecessors: Array.isArray(object?.predecessors) ? object.predecessors.map((e: any) => String(e)) : [],+ state: isSet(object.state) ? taskMetadata_StateFromJSON(object.state) : 0,+ condition: isSet(object.condition) ? String(object.condition) : "",+ definition: isSet(object.definition) ? String(object.definition) : "",+ };+ },++ toJSON(message: TaskMetadata): unknown {+ const obj: any = {};+ message.name !== undefined && (obj.name = message.name);+ message.id !== undefined && (obj.id = message.id);+ message.owner !== undefined && (obj.owner = message.owner);+ message.comment !== undefined && (obj.comment = message.comment);+ message.warehouse !== undefined && (obj.warehouse = message.warehouse);+ message.schedule !== undefined && (obj.schedule = message.schedule);+ if (message.predecessors) {+ obj.predecessors = message.predecessors.map((e) => e);+ } else {+ obj.predecessors = [];+ }+ message.state !== undefined && (obj.state = taskMetadata_StateToJSON(message.state));+ message.condition !== undefined && (obj.condition = message.condition);+ message.definition !== undefined && (obj.definition = message.definition);+ return obj;+ },++ create(base?: DeepPartial<TaskMetadata>): TaskMetadata {+ return TaskMetadata.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<TaskMetadata>): TaskMetadata {+ const message = createBaseTaskMetadata();+ message.name = object.name ?? "";+ message.id = object.id ?? "";+ message.owner = object.owner ?? "";+ message.comment = object.comment ?? "";+ message.warehouse = object.warehouse ?? "";+ message.schedule = object.schedule ?? "";+ message.predecessors = object.predecessors?.map((e) => e) || [];+ message.state = object.state ?? 0;+ message.condition = object.condition ?? "";+ message.definition = object.definition ?? "";+ return message;+ },+};++function createBaseStreamMetadata(): StreamMetadata {+ return { name: "", tableName: "", owner: "", comment: "", type: 0, stale: false, mode: 0, definition: "" };+}++export const StreamMetadata = {+ encode(message: StreamMetadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {+ if (message.name !== "") {+ writer.uint32(10).string(message.name);+ }+ if (message.tableName !== "") {+ writer.uint32(18).string(message.tableName);+ }+ if (message.owner !== "") {+ writer.uint32(26).string(message.owner);+ }+ if (message.comment !== "") {+ writer.uint32(34).string(message.comment);+ }+ if (message.type !== 0) {+ writer.uint32(40).int32(message.type);+ }+ if (message.stale === true) {+ writer.uint32(48).bool(message.stale);+ }+ if (message.mode !== 0) {+ writer.uint32(56).int32(message.mode);+ }+ if (message.definition !== "") {+ writer.uint32(66).string(message.definition);+ }+ return writer;+ },++ decode(input: _m0.Reader | Uint8Array, length?: number): StreamMetadata {+ const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);+ let end = length === undefined ? reader.len : reader.pos + length;+ const message = createBaseStreamMetadata();+ while (reader.pos < end) {+ const tag = reader.uint32();+ switch (tag >>> 3) {+ case 1:+ if (tag !== 10) {+ break;+ }++ message.name = reader.string();+ continue;+ case 2:+ if (tag !== 18) {+ break;+ }++ message.tableName = reader.string();+ continue;+ case 3:+ if (tag !== 26) {+ break;+ }++ message.owner = reader.string();+ continue;+ case 4:+ if (tag !== 34) {+ break;+ }++ message.comment = reader.string();+ continue;+ case 5:+ if (tag !== 40) {+ break;+ }++ message.type = reader.int32() as any;+ continue;+ case 6:+ if (tag !== 48) {+ break;+ }++ message.stale = reader.bool();+ continue;+ case 7:+ if (tag !== 56) {+ break;+ }++ message.mode = reader.int32() as any;+ continue;+ case 8:+ if (tag !== 66) {+ break;+ }++ message.definition = reader.string();+ continue;+ }+ if ((tag & 7) === 4 || tag === 0) {+ break;+ }+ reader.skipType(tag & 7);+ }+ return message;+ },++ fromJSON(object: any): StreamMetadata {+ return {+ name: isSet(object.name) ? String(object.name) : "",+ tableName: isSet(object.tableName) ? String(object.tableName) : "",+ owner: isSet(object.owner) ? String(object.owner) : "",+ comment: isSet(object.comment) ? String(object.comment) : "",+ type: isSet(object.type) ? streamMetadata_TypeFromJSON(object.type) : 0,+ stale: isSet(object.stale) ? Boolean(object.stale) : false,+ mode: isSet(object.mode) ? streamMetadata_ModeFromJSON(object.mode) : 0,+ definition: isSet(object.definition) ? String(object.definition) : "",+ };+ },++ toJSON(message: StreamMetadata): unknown {+ const obj: any = {};+ message.name !== undefined && (obj.name = message.name);+ message.tableName !== undefined && (obj.tableName = message.tableName);+ message.owner !== undefined && (obj.owner = message.owner);+ message.comment !== undefined && (obj.comment = message.comment);+ message.type !== undefined && (obj.type = streamMetadata_TypeToJSON(message.type));+ message.stale !== undefined && (obj.stale = message.stale);+ message.mode !== undefined && (obj.mode = streamMetadata_ModeToJSON(message.mode));+ message.definition !== undefined && (obj.definition = message.definition);+ return obj;+ },++ create(base?: DeepPartial<StreamMetadata>): StreamMetadata {+ return StreamMetadata.fromPartial(base ?? {});+ },++ fromPartial(object: DeepPartial<StreamMetadata>): StreamMetadata {+ const message = createBaseStreamMetadata();+ message.name = object.name ?? "";+ message.tableName = object.tableName ?? "";+ message.owner = object.owner ?? "";+ message.comment = object.comment ?? "";+ message.type = object.type ?? 0;+ message.stale = object.stale ?? false;+ message.mode = object.mode ?? 0;+ message.definition = object.definition ?? "";return message;},};diff --git a/proto/gen/grpc-doc/store/README.md b/proto/gen/grpc-doc/store/README.mdindex 3a9b19798b..a6dedc303a 100644--- a/proto/gen/grpc-doc/store/README.md+++ b/proto/gen/grpc-doc/store/README.md@@ -46,9 +46,15 @@- [SchemaMetadata](#bytebase-store-SchemaMetadata)- [SecretItem](#bytebase-store-SecretItem)- [Secrets](#bytebase-store-Secrets)+ - [StreamMetadata](#bytebase-store-StreamMetadata)- [TableMetadata](#bytebase-store-TableMetadata)+ - [TaskMetadata](#bytebase-store-TaskMetadata)- [ViewMetadata](#bytebase-store-ViewMetadata)+ - [StreamMetadata.Mode](#bytebase-store-StreamMetadata-Mode)+ - [StreamMetadata.Type](#bytebase-store-StreamMetadata-Type)+ - [TaskMetadata.State](#bytebase-store-TaskMetadata-State)+- [store/idp.proto](#store_idp-proto)- [FieldMapping](#bytebase-store-FieldMapping)- [IdentityProviderConfig](#bytebase-store-IdentityProviderConfig)@@ -696,6 +702,8 @@ This is the concept of schema in Postgres, but it's a no-op for MySQL.| tables | [TableMetadata](#bytebase-store-TableMetadata) | repeated | The tables is the list of tables in a schema. || views | [ViewMetadata](#bytebase-store-ViewMetadata) | repeated | The views is the list of views in a schema. || functions | [FunctionMetadata](#bytebase-store-FunctionMetadata) | repeated | The functions is the list of functions in a schema. |+| streams | [StreamMetadata](#bytebase-store-StreamMetadata) | repeated | The streams is the list of streams in a schema, currently, only used for Snowflake. |+| tasks | [TaskMetadata](#bytebase-store-TaskMetadata) | repeated | The routines is the list of routines in a schema. |@@ -734,6 +742,28 @@ This is the concept of schema in Postgres, but it's a no-op for MySQL.+<a name="bytebase-store-StreamMetadata"></a>++### StreamMetadata++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name is the name of a stream. |+| table_name | [string](#string) | | The table_name is the name of the table/view that the stream is created on. |+| owner | [string](#string) | | The owner of the stream. |+| comment | [string](#string) | | The comment of the stream. |+| type | [StreamMetadata.Type](#bytebase-store-StreamMetadata-Type) | | The type of the stream. |+| stale | [bool](#bool) | | Indicates whether the stream was last read before the `stale_after` time. |+| mode | [StreamMetadata.Mode](#bytebase-store-StreamMetadata-Mode) | | The mode of the stream. |+| definition | [string](#string) | | The definition of the stream. |++++++<a name="bytebase-store-TableMetadata"></a>### TableMetadata@@ -760,6 +790,30 @@ TableMetadata is the metadata for tables.+<a name="bytebase-store-TaskMetadata"></a>++### TaskMetadata++++| Field | Type | Label | Description |+| ----- | ---- | ----- | ----------- |+| name | [string](#string) | | The name is the name of a task. |+| id | [string](#string) | | The id is the snowflake-generated id of a task. Example: 01ad32a0-1bb6-5e93-0000-000000000001 |+| owner | [string](#string) | | The owner of the task. |+| comment | [string](#string) | | The comment of the task. |+| warehouse | [string](#string) | | The warehouse of the task. |+| schedule | [string](#string) | | The schedule interval of the task. |+| predecessors | [string](#string) | repeated | The predecessor tasks of the task. |+| state | [TaskMetadata.State](#bytebase-store-TaskMetadata-State) | | The state of the task. |+| condition | [string](#string) | | The condition of the task. |+| definition | [string](#string) | | The definition of the task. |++++++<a name="bytebase-store-ViewMetadata"></a>### ViewMetadata@@ -779,6 +833,44 @@ ViewMetadata is the metadata for views.++<a name="bytebase-store-StreamMetadata-Mode"></a>++### StreamMetadata.Mode+++| Name | Number | Description |+| ---- | ------ | ----------- |+| MODE_UNSPECIFIED | 0 | |+| MODE_APPEND_ONLY | 1 | |+| MODE_INSERT_ONLY | 2 | |++++<a name="bytebase-store-StreamMetadata-Type"></a>++### StreamMetadata.Type+++| Name | Number | Description |+| ---- | ------ | ----------- |+| TYPE_UNSPECIFIED | 0 | |+| TYPE_DELTA | 1 | |++++<a name="bytebase-store-TaskMetadata-State"></a>++### TaskMetadata.State+++| Name | Number | Description |+| ---- | ------ | ----------- |+| STATE_UNSPECIFIED | 0 | |+| STATE_STARTED | 1 | |+| STATE_SUSPENDED | 2 | |++diff --git a/proto/generated-go/store/database.pb.go b/proto/generated-go/store/database.pb.goindex aaef25a432..5dd79ebc65 100644--- a/proto/generated-go/store/database.pb.go+++ b/proto/generated-go/store/database.pb.go@@ -21,6 +21,150 @@ const (_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20))+type TaskMetadata_State int32++const (+ TaskMetadata_STATE_UNSPECIFIED TaskMetadata_State = 0+ TaskMetadata_STATE_STARTED TaskMetadata_State = 1+ TaskMetadata_STATE_SUSPENDED TaskMetadata_State = 2+)++// Enum value maps for TaskMetadata_State.+var (+ TaskMetadata_State_name = map[int32]string{+ 0: "STATE_UNSPECIFIED",+ 1: "STATE_STARTED",+ 2: "STATE_SUSPENDED",+ }+ TaskMetadata_State_value = map[string]int32{+ "STATE_UNSPECIFIED": 0,+ "STATE_STARTED": 1,+ "STATE_SUSPENDED": 2,+ }+)++func (x TaskMetadata_State) Enum() *TaskMetadata_State {+ p := new(TaskMetadata_State)+ *p = x+ return p+}++func (x TaskMetadata_State) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (TaskMetadata_State) Descriptor() protoreflect.EnumDescriptor {+ return file_store_database_proto_enumTypes[0].Descriptor()+}++func (TaskMetadata_State) Type() protoreflect.EnumType {+ return &file_store_database_proto_enumTypes[0]+}++func (x TaskMetadata_State) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use TaskMetadata_State.Descriptor instead.+func (TaskMetadata_State) EnumDescriptor() ([]byte, []int) {+ return file_store_database_proto_rawDescGZIP(), []int{2, 0}+}++type StreamMetadata_Type int32++const (+ StreamMetadata_TYPE_UNSPECIFIED StreamMetadata_Type = 0+ StreamMetadata_TYPE_DELTA StreamMetadata_Type = 1+)++// Enum value maps for StreamMetadata_Type.+var (+ StreamMetadata_Type_name = map[int32]string{+ 0: "TYPE_UNSPECIFIED",+ 1: "TYPE_DELTA",+ }+ StreamMetadata_Type_value = map[string]int32{+ "TYPE_UNSPECIFIED": 0,+ "TYPE_DELTA": 1,+ }+)++func (x StreamMetadata_Type) Enum() *StreamMetadata_Type {+ p := new(StreamMetadata_Type)+ *p = x+ return p+}++func (x StreamMetadata_Type) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (StreamMetadata_Type) Descriptor() protoreflect.EnumDescriptor {+ return file_store_database_proto_enumTypes[1].Descriptor()+}++func (StreamMetadata_Type) Type() protoreflect.EnumType {+ return &file_store_database_proto_enumTypes[1]+}++func (x StreamMetadata_Type) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use StreamMetadata_Type.Descriptor instead.+func (StreamMetadata_Type) EnumDescriptor() ([]byte, []int) {+ return file_store_database_proto_rawDescGZIP(), []int{3, 0}+}++type StreamMetadata_Mode int32++const (+ StreamMetadata_MODE_UNSPECIFIED StreamMetadata_Mode = 0+ StreamMetadata_MODE_APPEND_ONLY StreamMetadata_Mode = 1+ StreamMetadata_MODE_INSERT_ONLY StreamMetadata_Mode = 2+)++// Enum value maps for StreamMetadata_Mode.+var (+ StreamMetadata_Mode_name = map[int32]string{+ 0: "MODE_UNSPECIFIED",+ 1: "MODE_APPEND_ONLY",+ 2: "MODE_INSERT_ONLY",+ }+ StreamMetadata_Mode_value = map[string]int32{+ "MODE_UNSPECIFIED": 0,+ "MODE_APPEND_ONLY": 1,+ "MODE_INSERT_ONLY": 2,+ }+)++func (x StreamMetadata_Mode) Enum() *StreamMetadata_Mode {+ p := new(StreamMetadata_Mode)+ *p = x+ return p+}++func (x StreamMetadata_Mode) String() string {+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))+}++func (StreamMetadata_Mode) Descriptor() protoreflect.EnumDescriptor {+ return file_store_database_proto_enumTypes[2].Descriptor()+}++func (StreamMetadata_Mode) Type() protoreflect.EnumType {+ return &file_store_database_proto_enumTypes[2]+}++func (x StreamMetadata_Mode) Number() protoreflect.EnumNumber {+ return protoreflect.EnumNumber(x)+}++// Deprecated: Use StreamMetadata_Mode.Descriptor instead.+func (StreamMetadata_Mode) EnumDescriptor() ([]byte, []int) {+ return file_store_database_proto_rawDescGZIP(), []int{3, 1}+}+// DatabaseMetadata is the metadata for databases.type DatabaseMetadata struct {state protoimpl.MessageState@@ -130,6 +274,10 @@ type SchemaMetadata struct {Views []*ViewMetadata `protobuf:"bytes,3,rep,name=views,proto3" json:"views,omitempty"`// The functions is the list of functions in a schema.Functions []*FunctionMetadata `protobuf:"bytes,4,rep,name=functions,proto3" json:"functions,omitempty"`+ // The streams is the list of streams in a schema, currently, only used for Snowflake.+ Streams []*StreamMetadata `protobuf:"bytes,5,rep,name=streams,proto3" json:"streams,omitempty"`+ // The routines is the list of routines in a schema.+ Tasks []*TaskMetadata `protobuf:"bytes,6,rep,name=tasks,proto3" json:"tasks,omitempty"`}func (x *SchemaMetadata) Reset() {@@ -192,6 +340,261 @@ func (x *SchemaMetadata) GetFunctions() []*FunctionMetadata {return nil}+func (x *SchemaMetadata) GetStreams() []*StreamMetadata {+ if x != nil {+ return x.Streams+ }+ return nil+}++func (x *SchemaMetadata) GetTasks() []*TaskMetadata {+ if x != nil {+ return x.Tasks+ }+ return nil+}++type TaskMetadata struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name is the name of a task.+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // The id is the snowflake-generated id of a task.+ // Example: 01ad32a0-1bb6-5e93-0000-000000000001+ Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"`+ // The owner of the task.+ Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`+ // The comment of the task.+ Comment string `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"`+ // The warehouse of the task.+ Warehouse string `protobuf:"bytes,5,opt,name=warehouse,proto3" json:"warehouse,omitempty"`+ // The schedule interval of the task.+ Schedule string `protobuf:"bytes,6,opt,name=schedule,proto3" json:"schedule,omitempty"`+ // The predecessor tasks of the task.+ Predecessors []string `protobuf:"bytes,7,rep,name=predecessors,proto3" json:"predecessors,omitempty"`+ // The state of the task.+ State TaskMetadata_State `protobuf:"varint,8,opt,name=state,proto3,enum=bytebase.store.TaskMetadata_State" json:"state,omitempty"`+ // The condition of the task.+ Condition string `protobuf:"bytes,9,opt,name=condition,proto3" json:"condition,omitempty"`+ // The definition of the task.+ Definition string `protobuf:"bytes,10,opt,name=definition,proto3" json:"definition,omitempty"`+}++func (x *TaskMetadata) Reset() {+ *x = TaskMetadata{}+ if protoimpl.UnsafeEnabled {+ mi := &file_store_database_proto_msgTypes[2]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *TaskMetadata) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*TaskMetadata) ProtoMessage() {}++func (x *TaskMetadata) ProtoReflect() protoreflect.Message {+ mi := &file_store_database_proto_msgTypes[2]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use TaskMetadata.ProtoReflect.Descriptor instead.+func (*TaskMetadata) Descriptor() ([]byte, []int) {+ return file_store_database_proto_rawDescGZIP(), []int{2}+}++func (x *TaskMetadata) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *TaskMetadata) GetId() string {+ if x != nil {+ return x.Id+ }+ return ""+}++func (x *TaskMetadata) GetOwner() string {+ if x != nil {+ return x.Owner+ }+ return ""+}++func (x *TaskMetadata) GetComment() string {+ if x != nil {+ return x.Comment+ }+ return ""+}++func (x *TaskMetadata) GetWarehouse() string {+ if x != nil {+ return x.Warehouse+ }+ return ""+}++func (x *TaskMetadata) GetSchedule() string {+ if x != nil {+ return x.Schedule+ }+ return ""+}++func (x *TaskMetadata) GetPredecessors() []string {+ if x != nil {+ return x.Predecessors+ }+ return nil+}++func (x *TaskMetadata) GetState() TaskMetadata_State {+ if x != nil {+ return x.State+ }+ return TaskMetadata_STATE_UNSPECIFIED+}++func (x *TaskMetadata) GetCondition() string {+ if x != nil {+ return x.Condition+ }+ return ""+}++func (x *TaskMetadata) GetDefinition() string {+ if x != nil {+ return x.Definition+ }+ return ""+}++type StreamMetadata struct {+ state protoimpl.MessageState+ sizeCache protoimpl.SizeCache+ unknownFields protoimpl.UnknownFields++ // The name is the name of a stream.+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`+ // The table_name is the name of the table/view that the stream is created on.+ TableName string `protobuf:"bytes,2,opt,name=table_name,json=tableName,proto3" json:"table_name,omitempty"`+ // The owner of the stream.+ Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`+ // The comment of the stream.+ Comment string `protobuf:"bytes,4,opt,name=comment,proto3" json:"comment,omitempty"`+ // The type of the stream.+ Type StreamMetadata_Type `protobuf:"varint,5,opt,name=type,proto3,enum=bytebase.store.StreamMetadata_Type" json:"type,omitempty"`+ // Indicates whether the stream was last read before the `stale_after` time.+ Stale bool `protobuf:"varint,6,opt,name=stale,proto3" json:"stale,omitempty"`+ // The mode of the stream.+ Mode StreamMetadata_Mode `protobuf:"varint,7,opt,name=mode,proto3,enum=bytebase.store.StreamMetadata_Mode" json:"mode,omitempty"`+ // The definition of the stream.+ Definition string `protobuf:"bytes,8,opt,name=definition,proto3" json:"definition,omitempty"`+}++func (x *StreamMetadata) Reset() {+ *x = StreamMetadata{}+ if protoimpl.UnsafeEnabled {+ mi := &file_store_database_proto_msgTypes[3]+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ ms.StoreMessageInfo(mi)+ }+}++func (x *StreamMetadata) String() string {+ return protoimpl.X.MessageStringOf(x)+}++func (*StreamMetadata) ProtoMessage() {}++func (x *StreamMetadata) ProtoReflect() protoreflect.Message {+ mi := &file_store_database_proto_msgTypes[3]+ if protoimpl.UnsafeEnabled && x != nil {+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))+ if ms.LoadMessageInfo() == nil {+ ms.StoreMessageInfo(mi)+ }+ return ms+ }+ return mi.MessageOf(x)+}++// Deprecated: Use StreamMetadata.ProtoReflect.Descriptor instead.+func (*StreamMetadata) Descriptor() ([]byte, []int) {+ return file_store_database_proto_rawDescGZIP(), []int{3}+}++func (x *StreamMetadata) GetName() string {+ if x != nil {+ return x.Name+ }+ return ""+}++func (x *StreamMetadata) GetTableName() string {+ if x != nil {+ return x.TableName+ }+ return ""+}++func (x *StreamMetadata) GetOwner() string {+ if x != nil {+ return x.Owner+ }+ return ""+}++func (x *StreamMetadata) GetComment() string {+ if x != nil {+ return x.Comment+ }+ return ""+}++func (x *StreamMetadata) GetType() StreamMetadata_Type {+ if x != nil {+ return x.Type+ }+ return StreamMetadata_TYPE_UNSPECIFIED+}++func (x *StreamMetadata) GetStale() bool {+ if x != nil {+ return x.Stale+ }+ return false+}++func (x *StreamMetadata) GetMode() StreamMetadata_Mode {+ if x != nil {+ return x.Mode+ }+ return StreamMetadata_MODE_UNSPECIFIED+}++func (x *StreamMetadata) GetDefinition() string {+ if x != nil {+ return x.Definition+ }+ return ""+}+// TableMetadata is the metadata for tables.type TableMetadata struct {state protoimpl.MessageState@@ -227,7 +630,7 @@ type TableMetadata struct {func (x *TableMetadata) Reset() {*x = TableMetadata{}if protoimpl.UnsafeEnabled {- mi := &file_store_database_proto_msgTypes[2]+ mi := &file_store_database_proto_msgTypes[4]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -240,7 +643,7 @@ func (x *TableMetadata) String() string {func (*TableMetadata) ProtoMessage() {}func (x *TableMetadata) ProtoReflect() protoreflect.Message {- mi := &file_store_database_proto_msgTypes[2]+ mi := &file_store_database_proto_msgTypes[4]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -253,7 +656,7 @@ func (x *TableMetadata) ProtoReflect() protoreflect.Message {// Deprecated: Use TableMetadata.ProtoReflect.Descriptor instead.func (*TableMetadata) Descriptor() ([]byte, []int) {- return file_store_database_proto_rawDescGZIP(), []int{2}+ return file_store_database_proto_rawDescGZIP(), []int{4}}func (x *TableMetadata) GetName() string {@@ -367,7 +770,7 @@ type ColumnMetadata struct {func (x *ColumnMetadata) Reset() {*x = ColumnMetadata{}if protoimpl.UnsafeEnabled {- mi := &file_store_database_proto_msgTypes[3]+ mi := &file_store_database_proto_msgTypes[5]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -380,7 +783,7 @@ func (x *ColumnMetadata) String() string {func (*ColumnMetadata) ProtoMessage() {}func (x *ColumnMetadata) ProtoReflect() protoreflect.Message {- mi := &file_store_database_proto_msgTypes[3]+ mi := &file_store_database_proto_msgTypes[5]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -393,7 +796,7 @@ func (x *ColumnMetadata) ProtoReflect() protoreflect.Message {// Deprecated: Use ColumnMetadata.ProtoReflect.Descriptor instead.func (*ColumnMetadata) Descriptor() ([]byte, []int) {- return file_store_database_proto_rawDescGZIP(), []int{3}+ return file_store_database_proto_rawDescGZIP(), []int{5}}func (x *ColumnMetadata) GetName() string {@@ -471,7 +874,7 @@ type ViewMetadata struct {func (x *ViewMetadata) Reset() {*x = ViewMetadata{}if protoimpl.UnsafeEnabled {- mi := &file_store_database_proto_msgTypes[4]+ mi := &file_store_database_proto_msgTypes[6]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -484,7 +887,7 @@ func (x *ViewMetadata) String() string {func (*ViewMetadata) ProtoMessage() {}func (x *ViewMetadata) ProtoReflect() protoreflect.Message {- mi := &file_store_database_proto_msgTypes[4]+ mi := &file_store_database_proto_msgTypes[6]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -497,7 +900,7 @@ func (x *ViewMetadata) ProtoReflect() protoreflect.Message {// Deprecated: Use ViewMetadata.ProtoReflect.Descriptor instead.func (*ViewMetadata) Descriptor() ([]byte, []int) {- return file_store_database_proto_rawDescGZIP(), []int{4}+ return file_store_database_proto_rawDescGZIP(), []int{6}}func (x *ViewMetadata) GetName() string {@@ -545,7 +948,7 @@ type DependentColumn struct {func (x *DependentColumn) Reset() {*x = DependentColumn{}if protoimpl.UnsafeEnabled {- mi := &file_store_database_proto_msgTypes[5]+ mi := &file_store_database_proto_msgTypes[7]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -558,7 +961,7 @@ func (x *DependentColumn) String() string {func (*DependentColumn) ProtoMessage() {}func (x *DependentColumn) ProtoReflect() protoreflect.Message {- mi := &file_store_database_proto_msgTypes[5]+ mi := &file_store_database_proto_msgTypes[7]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -571,7 +974,7 @@ func (x *DependentColumn) ProtoReflect() protoreflect.Message {// Deprecated: Use DependentColumn.ProtoReflect.Descriptor instead.func (*DependentColumn) Descriptor() ([]byte, []int) {- return file_store_database_proto_rawDescGZIP(), []int{5}+ return file_store_database_proto_rawDescGZIP(), []int{7}}func (x *DependentColumn) GetSchema() string {@@ -610,7 +1013,7 @@ type FunctionMetadata struct {func (x *FunctionMetadata) Reset() {*x = FunctionMetadata{}if protoimpl.UnsafeEnabled {- mi := &file_store_database_proto_msgTypes[6]+ mi := &file_store_database_proto_msgTypes[8]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -623,7 +1026,7 @@ func (x *FunctionMetadata) String() string {func (*FunctionMetadata) ProtoMessage() {}func (x *FunctionMetadata) ProtoReflect() protoreflect.Message {- mi := &file_store_database_proto_msgTypes[6]+ mi := &file_store_database_proto_msgTypes[8]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -636,7 +1039,7 @@ func (x *FunctionMetadata) ProtoReflect() protoreflect.Message {// Deprecated: Use FunctionMetadata.ProtoReflect.Descriptor instead.func (*FunctionMetadata) Descriptor() ([]byte, []int) {- return file_store_database_proto_rawDescGZIP(), []int{6}+ return file_store_database_proto_rawDescGZIP(), []int{8}}func (x *FunctionMetadata) GetName() string {@@ -679,7 +1082,7 @@ type IndexMetadata struct {func (x *IndexMetadata) Reset() {*x = IndexMetadata{}if protoimpl.UnsafeEnabled {- mi := &file_store_database_proto_msgTypes[7]+ mi := &file_store_database_proto_msgTypes[9]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -692,7 +1095,7 @@ func (x *IndexMetadata) String() string {func (*IndexMetadata) ProtoMessage() {}func (x *IndexMetadata) ProtoReflect() protoreflect.Message {- mi := &file_store_database_proto_msgTypes[7]+ mi := &file_store_database_proto_msgTypes[9]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -705,7 +1108,7 @@ func (x *IndexMetadata) ProtoReflect() protoreflect.Message {// Deprecated: Use IndexMetadata.ProtoReflect.Descriptor instead.func (*IndexMetadata) Descriptor() ([]byte, []int) {- return file_store_database_proto_rawDescGZIP(), []int{7}+ return file_store_database_proto_rawDescGZIP(), []int{9}}func (x *IndexMetadata) GetName() string {@@ -776,7 +1179,7 @@ type ExtensionMetadata struct {func (x *ExtensionMetadata) Reset() {*x = ExtensionMetadata{}if protoimpl.UnsafeEnabled {- mi := &file_store_database_proto_msgTypes[8]+ mi := &file_store_database_proto_msgTypes[10]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -789,7 +1192,7 @@ func (x *ExtensionMetadata) String() string {func (*ExtensionMetadata) ProtoMessage() {}func (x *ExtensionMetadata) ProtoReflect() protoreflect.Message {- mi := &file_store_database_proto_msgTypes[8]+ mi := &file_store_database_proto_msgTypes[10]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -802,7 +1205,7 @@ func (x *ExtensionMetadata) ProtoReflect() protoreflect.Message {// Deprecated: Use ExtensionMetadata.ProtoReflect.Descriptor instead.func (*ExtensionMetadata) Descriptor() ([]byte, []int) {- return file_store_database_proto_rawDescGZIP(), []int{8}+ return file_store_database_proto_rawDescGZIP(), []int{10}}func (x *ExtensionMetadata) GetName() string {@@ -863,7 +1266,7 @@ type ForeignKeyMetadata struct {func (x *ForeignKeyMetadata) Reset() {*x = ForeignKeyMetadata{}if protoimpl.UnsafeEnabled {- mi := &file_store_database_proto_msgTypes[9]+ mi := &file_store_database_proto_msgTypes[11]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -876,7 +1279,7 @@ func (x *ForeignKeyMetadata) String() string {func (*ForeignKeyMetadata) ProtoMessage() {}func (x *ForeignKeyMetadata) ProtoReflect() protoreflect.Message {- mi := &file_store_database_proto_msgTypes[9]+ mi := &file_store_database_proto_msgTypes[11]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -889,7 +1292,7 @@ func (x *ForeignKeyMetadata) ProtoReflect() protoreflect.Message {// Deprecated: Use ForeignKeyMetadata.ProtoReflect.Descriptor instead.func (*ForeignKeyMetadata) Descriptor() ([]byte, []int) {- return file_store_database_proto_rawDescGZIP(), []int{9}+ return file_store_database_proto_rawDescGZIP(), []int{11}}func (x *ForeignKeyMetadata) GetName() string {@@ -963,7 +1366,7 @@ type InstanceRoleMetadata struct {func (x *InstanceRoleMetadata) Reset() {*x = InstanceRoleMetadata{}if protoimpl.UnsafeEnabled {- mi := &file_store_database_proto_msgTypes[10]+ mi := &file_store_database_proto_msgTypes[12]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -976,7 +1379,7 @@ func (x *InstanceRoleMetadata) String() string {func (*InstanceRoleMetadata) ProtoMessage() {}func (x *InstanceRoleMetadata) ProtoReflect() protoreflect.Message {- mi := &file_store_database_proto_msgTypes[10]+ mi := &file_store_database_proto_msgTypes[12]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -989,7 +1392,7 @@ func (x *InstanceRoleMetadata) ProtoReflect() protoreflect.Message {// Deprecated: Use InstanceRoleMetadata.ProtoReflect.Descriptor instead.func (*InstanceRoleMetadata) Descriptor() ([]byte, []int) {- return file_store_database_proto_rawDescGZIP(), []int{10}+ return file_store_database_proto_rawDescGZIP(), []int{12}}func (x *InstanceRoleMetadata) GetName() string {@@ -1018,7 +1421,7 @@ type Secrets struct {func (x *Secrets) Reset() {*x = Secrets{}if protoimpl.UnsafeEnabled {- mi := &file_store_database_proto_msgTypes[11]+ mi := &file_store_database_proto_msgTypes[13]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1031,7 +1434,7 @@ func (x *Secrets) String() string {func (*Secrets) ProtoMessage() {}func (x *Secrets) ProtoReflect() protoreflect.Message {- mi := &file_store_database_proto_msgTypes[11]+ mi := &file_store_database_proto_msgTypes[13]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1044,7 +1447,7 @@ func (x *Secrets) ProtoReflect() protoreflect.Message {// Deprecated: Use Secrets.ProtoReflect.Descriptor instead.func (*Secrets) Descriptor() ([]byte, []int) {- return file_store_database_proto_rawDescGZIP(), []int{11}+ return file_store_database_proto_rawDescGZIP(), []int{13}}func (x *Secrets) GetItems() []*SecretItem {@@ -1070,7 +1473,7 @@ type SecretItem struct {func (x *SecretItem) Reset() {*x = SecretItem{}if protoimpl.UnsafeEnabled {- mi := &file_store_database_proto_msgTypes[12]+ mi := &file_store_database_proto_msgTypes[14]ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))ms.StoreMessageInfo(mi)}@@ -1083,7 +1486,7 @@ func (x *SecretItem) String() string {func (*SecretItem) ProtoMessage() {}func (x *SecretItem) ProtoReflect() protoreflect.Message {- mi := &file_store_database_proto_msgTypes[12]+ mi := &file_store_database_proto_msgTypes[14]if protoimpl.UnsafeEnabled && x != nil {ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))if ms.LoadMessageInfo() == nil {@@ -1096,7 +1499,7 @@ func (x *SecretItem) ProtoReflect() protoreflect.Message {// Deprecated: Use SecretItem.ProtoReflect.Descriptor instead.func (*SecretItem) Descriptor() ([]byte, []int) {- return file_store_database_proto_rawDescGZIP(), []int{12}+ return file_store_database_proto_rawDescGZIP(), []int{14}}func (x *SecretItem) GetName() string {@@ -1143,7 +1546,7 @@ var file_store_database_proto_rawDesc = []byte{0x65, 0x2e, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64,0x61, 0x74, 0x61, 0x52, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12,0x1c, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x68, 0x61, 0x72, 0x65, 0x18, 0x06, 0x20, 0x01,- 0x28, 0x08, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x68, 0x61, 0x72, 0x65, 0x22, 0xcf, 0x01,+ 0x28, 0x08, 0x52, 0x09, 0x64, 0x61, 0x74, 0x61, 0x73, 0x68, 0x61, 0x72, 0x65, 0x22, 0xbd, 0x02,0x0a, 0x0e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x02,@@ -1156,127 +1559,184 @@ var file_store_database_proto_rawDesc = []byte{0x3e, 0x0a, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03,0x28, 0x0b, 0x32, 0x20, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,0x6f, 0x72, 0x65, 0x2e, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61,- 0x64, 0x61, 0x74, 0x61, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22,- 0xca, 0x03, 0x0a, 0x0d, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,- 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,- 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73,- 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73,- 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4d, 0x65,- 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12,- 0x37, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,- 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,- 0x65, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52,- 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69,- 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65,- 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20,- 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b,- 0x0a, 0x09, 0x72, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28,- 0x03, 0x52, 0x08, 0x72, 0x6f, 0x77, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64,- 0x61, 0x74, 0x61, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08,- 0x64, 0x61, 0x74, 0x61, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65,- 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x69, 0x6e,- 0x64, 0x65, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f,- 0x66, 0x72, 0x65, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61,- 0x46, 0x72, 0x65, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x6f,- 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x72,- 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63,- 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f,- 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0c, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e,- 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x79,- 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x46, 0x6f, 0x72,- 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52,- 0x0b, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x85, 0x02, 0x0a,- 0x0e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12,- 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,- 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18,- 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12,- 0x36, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,- 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,- 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07,- 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61,- 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61,- 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,- 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x72, 0x61,- 0x63, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,- 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x53, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09,- 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,- 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,- 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d,- 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xaa, 0x01, 0x0a, 0x0c, 0x56, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74,+ 0x64, 0x61, 0x74, 0x61, 0x52, 0x09, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,+ 0x38, 0x0a, 0x07, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b,+ 0x32, 0x1e, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72,+ 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,+ 0x52, 0x07, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x12, 0x32, 0x0a, 0x05, 0x74, 0x61, 0x73,+ 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62,+ 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65,+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x80, 0x03,+ 0x0a, 0x0c, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12,+ 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,+ 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,+ 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d,+ 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65,+ 0x6e, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65, 0x18,+ 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x77, 0x61, 0x72, 0x65, 0x68, 0x6f, 0x75, 0x73, 0x65,+ 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x22, 0x0a, 0x0c,+ 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03,+ 0x28, 0x09, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x64, 0x65, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73,+ 0x12, 0x38, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32,+ 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65,+ 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x53, 0x74,+ 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f,+ 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63,+ 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x69,+ 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65,+ 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x05, 0x53, 0x74, 0x61, 0x74,+ 0x65, 0x12, 0x15, 0x0a, 0x11, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,+ 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x53, 0x54, 0x41, 0x54,+ 0x45, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x13, 0x0a, 0x0f, 0x53,+ 0x54, 0x41, 0x54, 0x45, 0x5f, 0x53, 0x55, 0x53, 0x50, 0x45, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x02,+ 0x22, 0x93, 0x03, 0x0a, 0x0e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64,+ 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x62, 0x6c, 0x65,+ 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x61, 0x62,+ 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18,+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07,+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63,+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05,+ 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e,+ 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x61,+ 0x64, 0x61, 0x74, 0x61, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,+ 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05,+ 0x73, 0x74, 0x61, 0x6c, 0x65, 0x12, 0x37, 0x0a, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x18, 0x07, 0x20,+ 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73,+ 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x4d, 0x65, 0x74, 0x61, 0x64,+ 0x61, 0x74, 0x61, 0x2e, 0x4d, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x6d, 0x6f, 0x64, 0x65, 0x12, 0x1e,+ 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c,+ 0x0a, 0x04, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,+ 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a,+ 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x54, 0x41, 0x10, 0x01, 0x22, 0x48, 0x0a, 0x04,+ 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x55, 0x4e, 0x53,+ 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f,+ 0x44, 0x45, 0x5f, 0x41, 0x50, 0x50, 0x45, 0x4e, 0x44, 0x5f, 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x01,+ 0x12, 0x14, 0x0a, 0x10, 0x4d, 0x4f, 0x44, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x45, 0x52, 0x54, 0x5f,+ 0x4f, 0x4e, 0x4c, 0x59, 0x10, 0x02, 0x22, 0xca, 0x03, 0x0a, 0x0d, 0x54, 0x61, 0x62, 0x6c, 0x65,+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x07,+ 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e,+ 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x43,+ 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x07, 0x63,+ 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x37, 0x0a, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65,+ 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61,+ 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x65,+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x07, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x12,+ 0x16, 0x0a, 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,+ 0x06, 0x65, 0x6e, 0x67, 0x69, 0x6e, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61,+ 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x6c,+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x72, 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x75,+ 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x72, 0x6f, 0x77, 0x43, 0x6f, 0x75,+ 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18,+ 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x53, 0x69, 0x7a, 0x65, 0x12,+ 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x08, 0x20,+ 0x01, 0x28, 0x03, 0x52, 0x09, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1b,+ 0x0a, 0x09, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28,+ 0x03, 0x52, 0x08, 0x64, 0x61, 0x74, 0x61, 0x46, 0x72, 0x65, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63,+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20,+ 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f,+ 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x0b, 0x20,+ 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0c,+ 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x0c, 0x20, 0x03,+ 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,+ 0x6f, 0x72, 0x65, 0x2e, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x4d, 0x65,+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0b, 0x66, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b,+ 0x65, 0x79, 0x73, 0x22, 0x85, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x4d, 0x65,+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x6f,+ 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x70, 0x6f,+ 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x0a, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c,+ 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67,+ 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x07, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1a,+ 0x0a, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,+ 0x52, 0x08, 0x6e, 0x75, 0x6c, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79,+ 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x23,+ 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x74, 0x18,+ 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72,+ 0x53, 0x65, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,+ 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x6f, 0x6c, 0x6c, 0x61, 0x74, 0x69, 0x6f,+ 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0xaa, 0x01, 0x0a, 0x0c,+ 0x56, 0x69, 0x65, 0x77, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04,+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,+ 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,+ 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28,+ 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x11, 0x64, 0x65,+ 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18,+ 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65,+ 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74,+ 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52, 0x10, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e,+ 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x22, 0x57, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x65,+ 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73,+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68,+ 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c,+ 0x75, 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d,+ 0x6e, 0x22, 0x46, 0x0a, 0x10, 0x46, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74,0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x66,0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64,- 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d,- 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d,- 0x65, 0x6e, 0x74, 0x12, 0x4c, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74,- 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f,- 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e,- 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x52,- 0x10, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e,- 0x73, 0x22, 0x57, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x43, 0x6f,- 0x6c, 0x75, 0x6d, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x14, 0x0a, 0x05,- 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x61, 0x62,- 0x6c, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x03, 0x20, 0x01,- 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x22, 0x46, 0x0a, 0x10, 0x46, 0x75,- 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12,- 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,- 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e,- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69,- 0x6f, 0x6e, 0x22, 0xbf, 0x01, 0x0a, 0x0d, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x4d, 0x65, 0x74, 0x61,- 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,- 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x72,- 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x65,- 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79,- 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16,- 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06,- 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72,- 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79,- 0x12, 0x18, 0x0a, 0x07, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28,- 0x08, 0x52, 0x07, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f,- 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d,- 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x7b, 0x0a, 0x11, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,- 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,- 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a,- 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73,- 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,- 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,- 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04,- 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,- 0x6e, 0x22, 0xa2, 0x02, 0x0a, 0x12, 0x46, 0x6f, 0x72, 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79,- 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,- 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07,- 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63,- 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65,- 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28,- 0x09, 0x52, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x53, 0x63, 0x68,- 0x65, 0x6d, 0x61, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,- 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72,- 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2d,- 0x0a, 0x12, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6c,- 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x72, 0x65, 0x66, 0x65,- 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x1b, 0x0a,- 0x09, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,- 0x52, 0x08, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6e,- 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f,- 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68,- 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x74,- 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x22, 0x40, 0x0a, 0x14, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e,- 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12,- 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,- 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28,- 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x22, 0x3b, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x72,- 0x65, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03,- 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74,- 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05,- 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x58, 0x0a, 0x0a, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x49,- 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,- 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65,- 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x0a,- 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01,- 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42,- 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f,- 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,+ 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xbf, 0x01, 0x0a, 0x0d, 0x49, 0x6e,+ 0x64, 0x65, 0x78, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e,+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,+ 0x20, 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02,+ 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,+ 0x73, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,+ 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x18,+ 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x12, 0x18, 0x0a,+ 0x07, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,+ 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x69, 0x73, 0x69, 0x62,+ 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x76, 0x69, 0x73, 0x69, 0x62, 0x6c,+ 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x7b, 0x0a, 0x11, 0x45,+ 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,+ 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,+ 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02,+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07,+ 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76,+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa2, 0x02, 0x0a, 0x12, 0x46, 0x6f, 0x72,+ 0x65, 0x69, 0x67, 0x6e, 0x4b, 0x65, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12,+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,+ 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x02,+ 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x2b, 0x0a,+ 0x11, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x73, 0x63, 0x68, 0x65,+ 0x6d, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65,+ 0x6e, 0x63, 0x65, 0x64, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65,+ 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04,+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64,+ 0x54, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,+ 0x63, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28,+ 0x09, 0x52, 0x11, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x64, 0x43, 0x6f, 0x6c,+ 0x75, 0x6d, 0x6e, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x74,+ 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74,+ 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6f, 0x6e, 0x5f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x18, 0x07,+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x1d,+ 0x0a, 0x0a, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x08, 0x20, 0x01,+ 0x28, 0x09, 0x52, 0x09, 0x6d, 0x61, 0x74, 0x63, 0x68, 0x54, 0x79, 0x70, 0x65, 0x22, 0x40, 0x0a,+ 0x14, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x4d, 0x65, 0x74,+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x67, 0x72, 0x61,+ 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x22,+ 0x3b, 0x0a, 0x07, 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x05, 0x69, 0x74,+ 0x65, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62, 0x79, 0x74, 0x65,+ 0x62, 0x61, 0x73, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x53, 0x65, 0x63, 0x72, 0x65,+ 0x74, 0x49, 0x74, 0x65, 0x6d, 0x52, 0x05, 0x69, 0x74, 0x65, 0x6d, 0x73, 0x22, 0x58, 0x0a, 0x0a,+ 0x53, 0x65, 0x63, 0x72, 0x65, 0x74, 0x49, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14,+ 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,+ 0x61, 0x6c, 0x75, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,+ 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,+ 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x14, 0x5a, 0x12, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61,+ 0x74, 0x65, 0x64, 0x2d, 0x67, 0x6f, 0x2f, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72,+ 0x6f, 0x74, 0x6f, 0x33,}var (@@ -1291,40 +1751,51 @@ func file_store_database_proto_rawDescGZIP() []byte {return file_store_database_proto_rawDescData}-var file_store_database_proto_msgTypes = make([]protoimpl.MessageInfo, 13)+var file_store_database_proto_enumTypes = make([]protoimpl.EnumInfo, 3)+var file_store_database_proto_msgTypes = make([]protoimpl.MessageInfo, 15)var file_store_database_proto_goTypes = []interface{}{- (*DatabaseMetadata)(nil), // 0: bytebase.store.DatabaseMetadata- (*SchemaMetadata)(nil), // 1: bytebase.store.SchemaMetadata- (*TableMetadata)(nil), // 2: bytebase.store.TableMetadata- (*ColumnMetadata)(nil), // 3: bytebase.store.ColumnMetadata- (*ViewMetadata)(nil), // 4: bytebase.store.ViewMetadata- (*DependentColumn)(nil), // 5: bytebase.store.DependentColumn- (*FunctionMetadata)(nil), // 6: bytebase.store.FunctionMetadata- (*IndexMetadata)(nil), // 7: bytebase.store.IndexMetadata- (*ExtensionMetadata)(nil), // 8: bytebase.store.ExtensionMetadata- (*ForeignKeyMetadata)(nil), // 9: bytebase.store.ForeignKeyMetadata- (*InstanceRoleMetadata)(nil), // 10: bytebase.store.InstanceRoleMetadata- (*Secrets)(nil), // 11: bytebase.store.Secrets- (*SecretItem)(nil), // 12: bytebase.store.SecretItem- (*wrapperspb.StringValue)(nil), // 13: google.protobuf.StringValue+ (TaskMetadata_State)(0), // 0: bytebase.store.TaskMetadata.State+ (StreamMetadata_Type)(0), // 1: bytebase.store.StreamMetadata.Type+ (StreamMetadata_Mode)(0), // 2: bytebase.store.StreamMetadata.Mode+ (*DatabaseMetadata)(nil), // 3: bytebase.store.DatabaseMetadata+ (*SchemaMetadata)(nil), // 4: bytebase.store.SchemaMetadata+ (*TaskMetadata)(nil), // 5: bytebase.store.TaskMetadata+ (*StreamMetadata)(nil), // 6: bytebase.store.StreamMetadata+ (*TableMetadata)(nil), // 7: bytebase.store.TableMetadata+ (*ColumnMetadata)(nil), // 8: bytebase.store.ColumnMetadata+ (*ViewMetadata)(nil), // 9: bytebase.store.ViewMetadata+ (*DependentColumn)(nil), // 10: bytebase.store.DependentColumn+ (*FunctionMetadata)(nil), // 11: bytebase.store.FunctionMetadata+ (*IndexMetadata)(nil), // 12: bytebase.store.IndexMetadata+ (*ExtensionMetadata)(nil), // 13: bytebase.store.ExtensionMetadata+ (*ForeignKeyMetadata)(nil), // 14: bytebase.store.ForeignKeyMetadata+ (*InstanceRoleMetadata)(nil), // 15: bytebase.store.InstanceRoleMetadata+ (*Secrets)(nil), // 16: bytebase.store.Secrets+ (*SecretItem)(nil), // 17: bytebase.store.SecretItem+ (*wrapperspb.StringValue)(nil), // 18: google.protobuf.StringValue}var file_store_database_proto_depIdxs = []int32{- 1, // 0: bytebase.store.DatabaseMetadata.schemas:type_name -> bytebase.store.SchemaMetadata- 8, // 1: bytebase.store.DatabaseMetadata.extensions:type_name -> bytebase.store.ExtensionMetadata- 2, // 2: bytebase.store.SchemaMetadata.tables:type_name -> bytebase.store.TableMetadata- 4, // 3: bytebase.store.SchemaMetadata.views:type_name -> bytebase.store.ViewMetadata- 6, // 4: bytebase.store.SchemaMetadata.functions:type_name -> bytebase.store.FunctionMetadata- 3, // 5: bytebase.store.TableMetadata.columns:type_name -> bytebase.store.ColumnMetadata- 7, // 6: bytebase.store.TableMetadata.indexes:type_name -> bytebase.store.IndexMetadata- 9, // 7: bytebase.store.TableMetadata.foreign_keys:type_name -> bytebase.store.ForeignKeyMetadata- 13, // 8: bytebase.store.ColumnMetadata.default:type_name -> google.protobuf.StringValue- 5, // 9: bytebase.store.ViewMetadata.dependent_columns:type_name -> bytebase.store.DependentColumn- 12, // 10: bytebase.store.Secrets.items:type_name -> bytebase.store.SecretItem- 11, // [11:11] is the sub-list for method output_type- 11, // [11:11] is the sub-list for method input_type- 11, // [11:11] is the sub-list for extension type_name- 11, // [11:11] is the sub-list for extension extendee- 0, // [0:11] is the sub-list for field type_name+ 4, // 0: bytebase.store.DatabaseMetadata.schemas:type_name -> bytebase.store.SchemaMetadata+ 13, // 1: bytebase.store.DatabaseMetadata.extensions:type_name -> bytebase.store.ExtensionMetadata+ 7, // 2: bytebase.store.SchemaMetadata.tables:type_name -> bytebase.store.TableMetadata+ 9, // 3: bytebase.store.SchemaMetadata.views:type_name -> bytebase.store.ViewMetadata+ 11, // 4: bytebase.store.SchemaMetadata.functions:type_name -> bytebase.store.FunctionMetadata+ 6, // 5: bytebase.store.SchemaMetadata.streams:type_name -> bytebase.store.StreamMetadata+ 5, // 6: bytebase.store.SchemaMetadata.tasks:type_name -> bytebase.store.TaskMetadata+ 0, // 7: bytebase.store.TaskMetadata.state:type_name -> bytebase.store.TaskMetadata.State+ 1, // 8: bytebase.store.StreamMetadata.type:type_name -> bytebase.store.StreamMetadata.Type+ 2, // 9: bytebase.store.StreamMetadata.mode:type_name -> bytebase.store.StreamMetadata.Mode+ 8, // 10: bytebase.store.TableMetadata.columns:type_name -> bytebase.store.ColumnMetadata+ 12, // 11: bytebase.store.TableMetadata.indexes:type_name -> bytebase.store.IndexMetadata+ 14, // 12: bytebase.store.TableMetadata.foreign_keys:type_name -> bytebase.store.ForeignKeyMetadata+ 18, // 13: bytebase.store.ColumnMetadata.default:type_name -> google.protobuf.StringValue+ 10, // 14: bytebase.store.ViewMetadata.dependent_columns:type_name -> bytebase.store.DependentColumn+ 17, // 15: bytebase.store.Secrets.items:type_name -> bytebase.store.SecretItem+ 16, // [16:16] is the sub-list for method output_type+ 16, // [16:16] is the sub-list for method input_type+ 16, // [16:16] is the sub-list for extension type_name+ 16, // [16:16] is the sub-list for extension extendee+ 0, // [0:16] is the sub-list for field type_name}func init() { file_store_database_proto_init() }@@ -1358,7 +1829,7 @@ func file_store_database_proto_init() {}}file_store_database_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*TableMetadata); i {+ switch v := v.(*TaskMetadata); i {case 0:return &v.statecase 1:@@ -1370,7 +1841,7 @@ func file_store_database_proto_init() {}}file_store_database_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*ColumnMetadata); i {+ switch v := v.(*StreamMetadata); i {case 0:return &v.statecase 1:@@ -1382,7 +1853,7 @@ func file_store_database_proto_init() {}}file_store_database_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*ViewMetadata); i {+ switch v := v.(*TableMetadata); i {case 0:return &v.statecase 1:@@ -1394,7 +1865,7 @@ func file_store_database_proto_init() {}}file_store_database_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*DependentColumn); i {+ switch v := v.(*ColumnMetadata); i {case 0:return &v.statecase 1:@@ -1406,7 +1877,7 @@ func file_store_database_proto_init() {}}file_store_database_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*FunctionMetadata); i {+ switch v := v.(*ViewMetadata); i {case 0:return &v.statecase 1:@@ -1418,7 +1889,7 @@ func file_store_database_proto_init() {}}file_store_database_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*IndexMetadata); i {+ switch v := v.(*DependentColumn); i {case 0:return &v.statecase 1:@@ -1430,7 +1901,7 @@ func file_store_database_proto_init() {}}file_store_database_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*ExtensionMetadata); i {+ switch v := v.(*FunctionMetadata); i {case 0:return &v.statecase 1:@@ -1442,7 +1913,7 @@ func file_store_database_proto_init() {}}file_store_database_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*ForeignKeyMetadata); i {+ switch v := v.(*IndexMetadata); i {case 0:return &v.statecase 1:@@ -1454,7 +1925,7 @@ func file_store_database_proto_init() {}}file_store_database_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*InstanceRoleMetadata); i {+ switch v := v.(*ExtensionMetadata); i {case 0:return &v.statecase 1:@@ -1466,7 +1937,7 @@ func file_store_database_proto_init() {}}file_store_database_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {- switch v := v.(*Secrets); i {+ switch v := v.(*ForeignKeyMetadata); i {case 0:return &v.statecase 1:@@ -1478,6 +1949,30 @@ func file_store_database_proto_init() {}}file_store_database_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*InstanceRoleMetadata); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_store_database_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {+ switch v := v.(*Secrets); i {+ case 0:+ return &v.state+ case 1:+ return &v.sizeCache+ case 2:+ return &v.unknownFields+ default:+ return nil+ }+ }+ file_store_database_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {switch v := v.(*SecretItem); i {case 0:return &v.state@@ -1495,13 +1990,14 @@ func file_store_database_proto_init() {File: protoimpl.DescBuilder{GoPackagePath: reflect.TypeOf(x{}).PkgPath(),RawDescriptor: file_store_database_proto_rawDesc,- NumEnums: 0,- NumMessages: 13,+ NumEnums: 3,+ NumMessages: 15,NumExtensions: 0,NumServices: 0,},GoTypes: file_store_database_proto_goTypes,DependencyIndexes: file_store_database_proto_depIdxs,+ EnumInfos: file_store_database_proto_enumTypes,MessageInfos: file_store_database_proto_msgTypes,}.Build()File_store_database_proto = out.Filediff --git a/proto/store/database.proto b/proto/store/database.protoindex fcda865bf6..8f4dd5f9d0 100644--- a/proto/store/database.proto+++ b/proto/store/database.proto@@ -41,6 +41,85 @@ message SchemaMetadata {// The functions is the list of functions in a schema.repeated FunctionMetadata functions = 4;++ // The streams is the list of streams in a schema, currently, only used for Snowflake.+ repeated StreamMetadata streams = 5;++ // The routines is the list of routines in a schema.+ repeated TaskMetadata tasks = 6;+}++message TaskMetadata {+ // The name is the name of a task.+ string name = 1;++ // The id is the snowflake-generated id of a task.+ // Example: 01ad32a0-1bb6-5e93-0000-000000000001+ string id = 2;++ // The owner of the task.+ string owner = 3;++ // The comment of the task.+ string comment = 4;++ // The warehouse of the task.+ string warehouse = 5;++ // The schedule interval of the task.+ string schedule = 6;++ // The predecessor tasks of the task.+ repeated string predecessors = 7;++ enum State {+ STATE_UNSPECIFIED = 0;+ STATE_STARTED = 1;+ STATE_SUSPENDED = 2;+ }+ // The state of the task.+ State state = 8;++ // The condition of the task.+ string condition = 9;++ // The definition of the task.+ string definition = 10;+}++message StreamMetadata {+ // The name is the name of a stream.+ string name = 1;++ // The table_name is the name of the table/view that the stream is created on.+ string table_name = 2;++ // The owner of the stream.+ string owner = 3;++ // The comment of the stream.+ string comment = 4;++ enum Type {+ TYPE_UNSPECIFIED = 0;+ TYPE_DELTA = 1;+ }+ // The type of the stream.+ Type type = 5;++ // Indicates whether the stream was last read before the `stale_after` time.+ bool stale = 6;++ enum Mode {+ MODE_UNSPECIFIED = 0;+ MODE_APPEND_ONLY = 1;+ MODE_INSERT_ONLY = 2;+ }+ // The mode of the stream.+ Mode mode = 7;++ // The definition of the stream.+ string definition = 8;}// TableMetadata is the metadata for tables.